Control Amazon Echo/Alexa devices via the `alexacli` CLI. Use when the user asks to speak/announce on Echo devices, send voice commands to Alexa, control smart home devices, list Alexa devices, or trigger routines.
Install
npx skillscat add buddyh/agent-skills/alexa-cli Install via the SkillsCat registry.
This skill provides a command-line interface for controlling Amazon Echo and Alexa devices, enabling text-to-speech announcements, voice command execution, smart home device management, and routine triggering. It solves the problem of programmatically interacting with Alexa devices without requiring the mobile app or physical voice commands. Developers should use it when building agents that need to send announcements to specific or all Echo devices, query device status, or automate smart home actions through Alexa's ecosystem.
Alexa CLI
Control Echo devices via the alexacli command.
Requirements
Install from: https://github.com/buddyh/alexa-cli
brew install buddyh/tap/alexacli
# or
go install github.com/buddyh/alexa-cli/cmd/alexa@latestCommands
# List devices
alexacli devices
# Text-to-speech
alexacli speak "Hello" -d Kitchen # Specific device
alexacli speak "Dinner is ready!" --announce # ALL devices
# Voice commands (smart home, music, etc.)
alexacli command "turn off the lights" -d Kitchen
alexacli command "set thermostat to 72" -d Kitchen
alexacli command "play jazz" -d "Living Room"
alexacli command "set timer 10 minutes" -d Office
# Ask and get response back
alexacli ask "what's the temperature" -d Kitchen
alexacli ask "what's on my calendar" -d Kitchen
# History
alexacli history
alexacli history --limit 5
# Routines (WIP)
alexacli routine list
alexacli routine run "Good Night"
# Smart home direct control (WIP)
alexacli sh list
alexacli sh on "Kitchen Light"
alexacli sh off "All Lights"JSON Output
All commands support --json:
alexacli devices --json
alexacli ask "what time is it" -d Kitchen --jsonNotes
- Device names support partial, case-insensitive matching
commandis preferred for smart home - natural language is more flexibleaskretrieves Alexa's actual response (useful for queries)- Uses unofficial Amazon API (same as Alexa app)