Alexa CLI
Control Amazon Alexa devices and smart home via the `alexacli` CLI. Use when a user asks to speak/announce on Echo devices, control lights/thermostats/locks, send voice commands, or query Alexa.
Control Amazon Alexa devices and smart home via the `alexacli` CLI. Use when a user asks to speak/announce on Echo devices, control lights/thermostats/locks, send voice commands, or query Alexa.
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Use
alexacli to control Amazon Echo devices and smart home via the unofficial Alexa API.
# Browser login (recommended) alexacli authNon-US accounts
alexacli auth --domain amazon.de alexacli auth --domain amazon.co.uk
Check auth status
alexacli auth status alexacli auth status --verify # validate token against API
Remove credentials
alexacli auth logout
Token is valid ~14 days. Configuration stored in
~/.alexa-cli/config.json.
alexacli devices alexacli devices --json
# Speak on a specific device alexacli speak "Hello world" -d "Kitchen Echo"Announce to ALL devices
alexacli speak "Dinner is ready!" --announce
Device name matching is flexible
alexacli speak "Build complete" -d Kitchen
Send any command as if you spoke it to Alexa:
# Lights, switches, plugs alexacli command "turn off the living room lights" -d Kitchen alexacli command "dim the bedroom lights to 50 percent" -d BedroomThermostats
alexacli command "set thermostat to 72 degrees" -d Bedroom alexacli command "what's the temperature inside" -d Kitchen
Locks
alexacli command "lock the front door" -d Kitchen
Music
alexacli command "play jazz music" -d "Living Room" alexacli command "stop" -d "Living Room"
Questions
alexacli command "what's the weather" -d Kitchen
Timers
alexacli command "set a timer for 10 minutes" -d Kitchen
Send a command and capture Alexa's text response:
alexacli ask "what's the thermostat set to" -d Kitchen # Output: The thermostat is set to 68 degrees.alexacli ask "what's on my calendar today" -d Kitchen --json
Interact with Amazon's LLM-powered assistant:
# Quick start - auto-selects conversation alexacli askplus -d "Echo Show" "What's the capital of France?"Multi-turn retains context
alexacli askplus -d "Echo Show" "What about Germany?"
List conversations
alexacli conversations
View conversation history
alexacli fragments "amzn1.conversation.xxx"
Play MP3 audio through Echo devices:
alexacli play --url "https://example.com/audio.mp3" -d "Echo Show"
Requirements: MP3 at 48kbps, 22050Hz sample rate, HTTPS URL.
alexacli history alexacli history --limit 5 alexacli history --json
| Command | Description |
|---|---|
| List all Echo devices |
| Text-to-speech on device |
| Announce to all devices |
| Voice command (smart home, music, etc.) |
| Send command, get response back |
| List Alexa+ conversation IDs |
| View Alexa+ conversation history |
| Alexa+ LLM conversation |
| Play MP3 via SSML |
| Browser login or manual token |
| Show auth status |
| Remove credentials |
| View recent voice activity |
alexacli auth if expiredalexacli command with natural language is preferred--verbose or -v to any command for debug outputNo automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.