| name | alexa-remote |
| description | Control Alexa devices via CLI - set alarms, play music, flash briefings, smart home commands. Use when asked to set an alarm, play something on Echo, control smart home devices, or send voice commands to Alexa. |
Alexa Remote Control
Control Amazon Echo devices via shell commands using alexa-remote-control.
Setup
1. Clone the repo
git clone https://github.com/adn77/alexa-remote-control.git
cd alexa-remote-control
2. Get a refresh token
The script needs a refresh token from Amazon. Use alexa-cookie-cli:
npx alexa-cookie-cli
This opens a browser for Amazon login. After authentication, copy the refreshToken (starts with Atnr|...).
3. Create a wrapper script
Create alexa-alarm.sh (or similar) with credentials:
#!/bin/bash
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
TIME="${1:-7:00 am}"
DEVICE="${2:-Bedroom Echo Show}"
export REFRESH_TOKEN='Atnr|YOUR_TOKEN_HERE'
export AMAZON='amazon.co.uk'
ALEXA=
-d -e