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, o…
Buddy Hadry
@buddyh
What This Skill Does
Command-line interface to control Amazon Alexa devices and smart home systems. Send text-to-speech announcements, execute voice commands (lights, thermostats, locks, music), query Alexa for responses, and interact with Alexa+ LLM conversations across Echo devices.
Replaces manually speaking to each Echo device or using the Alexa app for smart home control by enabling scripted, remote, and bulk operations via terminal.
When to Use It
- Announce a message on all Echo devices from a CI/CD pipeline
- Turn off lights or adjust thermostat without speaking
- Send a voice command to Alexa and capture the text response
- Query Alexa for weather, calendar, or timers from a script
- Play an MP3 audio file through a specific Echo device
- Interact with Alexa+ LLM conversations programmatically
Install
$ openclaw skills install @buddyh/alexa-cliAlexa 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
| Command | Description |
|---|---|
alexacli devices | List all Echo devices |
alexacli speak <text> -d <device> | Text-to-speech on device |
alexacli speak <text> --announce | Announce 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 conversations | List 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 auth | Browser login or manual token |
alexacli auth status [--verify] | Show auth status |
alexacli auth logout | Remove credentials |
alexacli history | View recent voice activity |
Notes
- Uses Amazon's unofficial API (same as Alexa app)
- Refresh token valid ~14 days, re-run
alexacli authif expired - Device names support partial, case-insensitive matching
- For AI/agentic use,
alexacli commandwith natural language is preferred - Add
--verboseor-vto any command for debug output
Top skills in this category
Wechat Article Search
@wuchubuzai2018搜索微信公众号文章技能。通过微信搜索获取文章列表,覆盖科技/AI、社会热点、财经、教育、职场等各类中文资讯;可按关键词检索并返回标题、概要、发布时间、来源公众号与链接。当用户需要查找微信公众号文章、整理参考资料或快速获取文章信息时使用此技能。
Figma
@hith3shRead files, manage comments, extract design tokens, download images, and create webhooks in Figma via the Figma REST API. Use this skill when users want to i...
Social Media Scheduler
@1kalinPlan, draft, and organize social media content across platforms. Create content calendars, write platform-optimized posts, and maintain consistent posting schedules.
Cinematic Script Writer
@praveenspeaksCreate professional cinematic scripts for AI video generation with character consistency and cinematography knowledge. Use when the user wants to write a cinematic script, create story contexts with characters, generate image prompts for AI video tools (Midjourney, Sora, Veo), or needs cinematography guidance (camera angles, lighting, color grading). Also use for character consistency sheets, voice profiles, anachronism detection, and saving scripts to Google Drive.
Generate Instagram marketing content from product URLs. Extract product information and create engaging Instagram posts with image suggestions, captions, and hashtags optimized for engagement. Use when user provides a product URL from e-commerce sites like Amazon, Shopify, Taobao, etc. and wants Instagram marketing content such as Image/text post ideas, engaging captions with CTAs, hashtag strategy, or Story/reels content suggestions.
@insight68Generate Instagram marketing content from product URLs. Extract product information and create engaging Instagram posts with image suggestions, captions, and hashtags optimized for engagement. Use when user provides a product URL from e-commerce sites like Amazon, Shopify, Taobao, etc. and wants Instagram marketing content such as Image/text post ideas, engaging captions with CTAs, hashtag strategy, or Story/reels content suggestions.