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.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
14 · 3.4k · 19 current installs · 22 all-time installs
byBuddy Hadry@buddyh
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description align with requirements and instructions. The only required binary is alexacli and the SKILL.md shows exactly the CLI commands the skill will run; no unrelated credentials, binaries, or config paths are requested.
Instruction Scope
Instructions stay within the Alexa-control scope (auth, list devices, speak, command, play URL, ask/askplus). They reference a local config file (~/.alexa-cli/config.json) and an interactive browser-based auth flow; these are expected but allow high-impact operations (announcements, locks, unlocks, playing external audio). Verify you are comfortable with an agent having the ability to perform those actions.
Install Mechanism
Install options are a third-party Homebrew tap (buddyh/tap/alexacli) or a Go module from github.com/buddyh/alexa-cli. Both are typical but are third-party sources; they will install/compile code on the host. No obscure shorteners or direct arbitrary downloads are used.
Credentials
No required environment variables or unrelated credentials are requested. An optional ALEXA_REFRESH_TOKEN is declared, which is reasonable for non-interactive use. The metadata and instructions do not request other secrets.
Persistence & Privilege
Skill is not force-included (always:false) and does not request system-wide changes. However, allowing autonomous invocation (the platform default) means an agent using this skill could perform impactful actions on your smart home; consider whether you want the agent to act without manual confirmation.
Assessment
This skill appears to do what it says: it runs the alexacli CLI to control your Echo devices. Before installing, consider: 1) Review the Homebrew tap and GitHub repo (buddyh/alexa-cli) yourself to ensure you trust the source. 2) Installing via brew or go will place/compile a binary on disk — prefer manual install if you want to inspect code first. 3) The skill enables high-impact actions (announcements, playing remote audio, locking/unlocking); if you allow autonomous agent invocation, the agent could run those commands without further confirmation. 4) Auth tokens are stored at ~/.alexa-cli/config.json and are valid ~14 days; treat them as sensitive and prefer secure storage. If you want a lower-risk setup: install and authenticate alexacli yourself, then only enable the skill when you need it (or avoid granting the agent autonomous invocation).

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.3.0
Download zip
alexavk972xx8fm5p51dcqstbaza30z97yj47yechovk972xx8fm5p51dcqstbaza30z97yj47yhome automationvk972xx8fm5p51dcqstbaza30z97yj47ylatestvk9746wrafn01qy4jx8xm9q0ve5810erfsmart homevk972xx8fm5p51dcqstbaza30z97yj47ytext to speechvk972xx8fm5p51dcqstbaza30z97yj47yttsvk972xx8fm5p51dcqstbaza30z97yj47y

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

🔊 Clawdis
Binsalexacli

Install

Install alexacli (brew)
Bins: alexacli
brew install buddyh/tap/alexacli
Install alexa-cli (go)
Bins: alexacli
go install github.com/buddyh/alexa-cli/cmd/alexa@latest

SKILL.md

Alexa CLI

Use alexacli to control Amazon Echo devices and smart home via the unofficial Alexa API.

Authentication

# Browser login (recommended)
alexacli auth

# Non-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.

Devices

alexacli devices
alexacli devices --json

Text-to-Speech

# 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

Voice Commands (Smart Home Control)

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 Bedroom

# Thermostats
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

Ask (Get Response Back)

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

Alexa+ (LLM Conversations)

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"

Audio Playback

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.

History

alexacli history
alexacli history --limit 5
alexacli history --json

Command Reference

CommandDescription
alexacli devicesList all Echo devices
alexacli speak <text> -d <device>Text-to-speech on device
alexacli speak <text> --announceAnnounce to all devices
alexacli command <text> -d <device>Voice command (smart home, music, etc.)
alexacli ask <text> -d <device>Send command, get response back
alexacli conversationsList Alexa+ conversation IDs
alexacli fragments <id>View Alexa+ conversation history
alexacli askplus -d <device> <text>Alexa+ LLM conversation
alexacli play --url <url> -d <device>Play MP3 via SSML
alexacli authBrowser login or manual token
alexacli auth status [--verify]Show auth status
alexacli auth logoutRemove credentials
alexacli historyView recent voice activity

Notes

  • Uses Amazon's unofficial API (same as Alexa app)
  • Refresh token valid ~14 days, re-run alexacli auth if expired
  • Device names support partial, case-insensitive matching
  • For AI/agentic use, alexacli command with natural language is preferred
  • Add --verbose or -v to any command for debug output

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…