ashh is a single-file Node script with no external dependencies. It talks to the same token-authed /api/v1/* API the browser extension and future mobile/desktop clients use. Pipe-friendly — stdin becomes the message body, SSE replies stream to stdout — so it slots cleanly into shell scripts, cron jobs, and CI.
Install
One-shot installer (Linux / macOS / WSL):
curl -fsSL https://ashh.ai/install-cli.sh | shInstalls to /usr/local/bin/ashh when run as root, otherwise ~/.local/bin/ashh. Requires Node 20 or newer on PATH. The installer prints the next steps when it finishes.
To install at a specific location or use a non-default server:
curl -fsSL https://ashh.ai/install-cli.sh | sh -s -- --dir ~/bin
curl -fsSL https://ashh.ai/install-cli.sh | sh -s -- --server https://custom.example.comTo uninstall:
curl -fsSL https://ashh.ai/install-cli.sh | sh -s -- --uninstallOr download the script directly without piping to sh:
curl -fsSL https://ashh.ai/cli -o ~/.local/bin/ashh
chmod +x ~/.local/bin/ashhConfigure
Mint an API token at Settings → API tokens. Required scopes for full CLI use: chat:write, files:write, bots:read.
ashh config set token lk_live_...
ashh config set bot <bot-id> # the default bot for 'ashh chat'Config lives in $XDG_CONFIG_HOME/ashh/config.json (defaults to ~/.config/ashh/config.json) with file mode 0600.
Per-invocation overrides via environment variables — useful for CI / scripts that shouldn't touch the on-disk config:
ASHH_TOKEN=lk_live_... # overrides config token
ASHH_BOT=<bot-id> # overrides config bot
ASHH_BASE_URL=https://... # overrides config base URL (defaults to https://ashh.ai)Commands
ashh chat
Send a message to a bot. SSE response streams to stdout.
ashh chat "Hello" # uses default bot
ashh chat --bot <slug> "What is RAG?"
cat README.md | ashh chat # pipe stdin as the message body
ashh chat --json "Hi" | jq # raw SSE events as JSON linesFlags: --bot <slug-or-id> overrides default · --session <id> continues an existing conversation · --json emits the raw SSE event stream instead of stripping to plain text.
ashh upload
Upload a file to your account (for use as attachmentIds in chat).
ashh upload ./invoice.pdf
ashh upload ./screenshot.png --json | jq -r .idReturns the file id, mime type, size, and SHA-256 by default. --json emits the raw response.
ashh bots
List the bots your token can see.
ashh bots
ashh bots --json | jq '.bots[] | {id, name, modelId}'ashh config
Get / set / list / clear config keys.
ashh config # print current config (token redacted)
ashh config set <key> <value>
ashh config unset <key>
ashh config clear # nuke the on-disk config entirelyashh version · ashh help
Self-explanatory.
Common recipes
Chain through other Unix tools
# Summarize a directory of files
for f in docs/*.md; do
echo "$f:" && cat "$f" | ashh chat "Summarize in one paragraph"
doneUpload + reference in a chat
ID=$(ashh upload ./report.pdf --json | jq -r .id)
ashh chat --attach "$ID" "Pull the key figures from this report"Cron-grade non-interactive use
ASHH_TOKEN=$(cat /etc/ashh/token) \
ASHH_BOT=cmos1l4xy00031… \
ashh chat --json "Status check?" >> /var/log/ashh-cron.logExit codes
0— success1— bad usage / argument error2— auth failure (token missing or rejected)3— HTTP error from the server (non-2xx, non-401)4— network error (DNS, timeout, TLS)
Updating
Re-run the installer — it overwrites the binary in place.
curl -fsSL https://ashh.ai/install-cli.sh | shSecurity
- The CLI uses Node's built-in
fetchonly; no external dependencies. - Config is written with mode
0600— readable only by your user. - Tokens scope what the CLI can do. Revoke a token at Settings → API tokens any time; CLI calls start returning 401 immediately.
- HTTPS only when talking to
https://ashh.ai(or any self-hosted server over TLS).
Need help?
Email hi@ashh.ai or open the chat on this page.
