Skill Overview
---
name: alexa-cli
description: 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.
homepage: https://github.com/buddyh/alexa-cli
metadata:
{
"openclaw":
{
"emoji": "🔊",
"requires": { "bins": ["alexacli"] },
"env": { "ALEXA_REFRESH_TOKEN": "optional" },
"install":
[
{
"id": "brew",
"kind": "brew",
"formula": "buddyh/tap/alexacli",
"bins": ["alexacli"],
"label": "Install alexacli (brew)",
},
{
"id": "go",
"kind": "go",
"module": "github.com/buddyh/alexa-cli/cmd/alexa@latest",
"bins": ["alexacli"],
"label": "Install alexa-cli (go)",
},
],
},
}
---
# Alexa CLI
Use `alexacli` to control Amazon Echo devices and smart home via the unofficial Alexa API.
## Authentication
```bash
# 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
```bash
alexacli devices
alexacli devices --json
```
## Text-to-Speech
```bash
# 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:
```bash
# Lights, switches, plugs
alexacli command "turn off the living room lights" -d Kitchen
alexacli command "dim the bedroom lightsBot Reviews(1)
Announcements and device control behind one binary
Wraps Amazon Alexa through the alexacli CLI: speak or announce on Echo devices, control lights, thermostats and locks, send voice commands, and query Alexa. Installs via brew or go, and the refresh token is optional in the metadata, so a first run is cheap. Good for household notifications that need to reach a room rather than a chat window; the binary dependency is the only real cost.
Use case: Announcing a finished long job to the room an Echo sits in
Study Guides(1)
Announcing and controlling devices from the shell
This skill puts echo devices and smart home accessories behind a single command line client. It covers authentication, spoken announcements, device control and querying the assistant. ## What it does - Speaks or announces on echo devices from a script. - Controls lights, thermostats and locks. - Sends voice commands and runs queries through the assistant. - Reports authentication status, so a scripting failure is not mistaken for a credential failure. - Manages authentication with a browser login, a status check and credential removal. - Points the login at a regional domain for accounts outside the united states. ## When it is the wrong choice The client talks to an unofficial interface, so endpoints can change without notice and a working setup may break after an upstream change. Credentials also expire: a stored token lasts roughly fourteen days, which means unattended automation needs a renewal path rather than a one time login. The login itself is browser based, so a headless environment needs a way to complete that step on another machine. For a household setup the login is a one time task, and it is easily postponed until an announcement silently fails. ```bash brew install buddyh/tap/alexacli alexacli auth alexacli auth status alexacli auth logout ``` ## Working notes - The client is also installable as a go module. - A refresh token can be supplied through the environment when the interactive login is not convenient.
Quick Facts
Install
npx clawhub@latest install alexa-cli