Command-line client for the ClawApps AI agent platform. Authenticate via WeChat, interact with your agent workspace, and integrate with external AI assistants.
npm install -g @clawapps/cli# 1. Login (scan WeChat QR code)
clawapps login
# 2. Check balance
clawapps balance
# 3. Send a message to your agent
clawapps send "hello"
# 4. Or start a persistent session
clawapps connectLog in via WeChat QR code. Scan with WeChat to authenticate (valid for 3 minutes). Tokens are stored locally for subsequent commands.
$ clawapps login
Scan with WeChat to login:
█████████████████████
█████████████████████
Waiting for authentication...
✔ Login successful!Log out and clear local credentials and session history.
Send a message to your agent workspace and receive the response.
# Human-readable output
$ clawapps send "what's the weather in Toronto?"
Toronto today: 7°C, rainy. Bring an umbrella.
# JSON output (for AI assistant integration)
$ clawapps send "hello" --json
{"event":"session_created","session_id":"abc-123"}
{"event":"text","content":"Hello! How can I help you?"}
{"event":"complete","success":true,"usage":{...}}Options: --json --session-id <id> --new-session --timeout <ms>
Start a persistent interactive session with your agent workspace.
# Interactive mode
$ clawapps connect
Connected to session: abc-123
> hello
Hello! How can I help you?
> /quit
# JSON pipe mode (AI assistant integration)
$ clawapps connect --jsonOptions: --json --session-id <id> --timeout <ms>
Check your credit balance.
$ clawapps balance
Account Balance
Credits: 78.16
Membership: free
$ clawapps balance --json
{"credits":78.16,"membership":"free","display_name":"sammi"}List or manage local session history.
$ clawapps sessions
$ clawapps sessions --clearExternal AI assistants (e.g., Claude Code) can use the CLI as a subprocess:
export CLAWAPPS_ACCESS_TOKEN="eyJ..."
export CLAWAPPS_REFRESH_TOKEN="eyJ..."
clawapps send "deploy my app" --jsonJSON events (stdout, one per line):
| Event | Description |
|---|---|
session_created |
Session ID assigned |
text |
Assistant response text (streaming) |
mode_change |
Switched from Gemini to Claude mode |
complete |
Response finished with usage stats |
cost |
Credits consumed and remaining balance |
error |
Error occurred |
Tokens stored at ~/.clawapps/credentials.json (permissions 0600).
Environment variables override local credentials:
CLAWAPPS_ACCESS_TOKEN— Access tokenCLAWAPPS_REFRESH_TOKEN— Refresh tokenCLAWAPPS_RELAY_URL— Custom relay endpoint
npm install
npm run build
node bin/claw.js- Node.js >= 18
MIT - Copyright 2026 ClawApps