SDKs
CLI
Install and use the Assisters CLI
Installation
npm install -g @assisters-dev/cliOr with Homebrew:
brew install assisters-dev/tap/assistersAuthentication
assisters auth login
# Prompts for your API key; stores in ~/.assisters/config.json
# Or set via environment variable
export ASSISTERS_API_KEY=your_api_keyQuick Start
# Chat completion
assisters chat "What is the capital of France?"
# Pipe input
echo "Summarise this text" | assisters chat --stdinAvailable Commands
| Command | Description |
|---|---|
assisters auth login | Save your API key |
assisters auth logout | Remove stored credentials |
assisters chat <prompt> | Send a chat message and print the reply |
assisters chat --stream <prompt> | Stream the reply token-by-token |
assisters chat --model <model> <prompt> | Use a specific model |
assisters chat --system <msg> <prompt> | Add a system message |
assisters embed <text> | Print embedding vector as JSON |
assisters moderate <text> | Check text for policy violations |
assisters rerank --query <q> <doc1> [doc2...] | Rerank documents |
assisters models | List available models |
assisters transcribe <audio-file> | Transcribe an audio file |
assisters config set <key> <value> | Set a config value (e.g. model) |
assisters config get <key> | Get a config value |
Flags
| Flag | Description |
|---|---|
--model <model> | Override default model |
--max-tokens <n> | Maximum tokens in response |
--temperature <f> | Sampling temperature (0–2) |
--stream | Stream output |
--json | Output raw JSON response |
--stdin | Read prompt from stdin |
--system <msg> | System message |
Examples
# Streaming chat
assisters chat --stream "Write a haiku about the sea"
# Embed and save
assisters embed "Hello world" --json > embedding.json
# Rerank documents
assisters rerank --query "best pizza" "margherita" "pepperoni" "sushi"
# Transcribe audio
assisters transcribe recording.mp3 --language en
# Use in a script
SUMMARY=$(assisters chat "Summarise: $(cat report.txt)" --json | jq -r '.choices[0].message.content')Error Handling
Non-zero exit codes are returned on failure:
| Code | Meaning |
|---|---|
0 | Success |
1 | API error (4xx/5xx) |
2 | Network or timeout error |
3 | Invalid arguments |
Use --json to get structured error output:
assisters chat "Hello" --json 2>&1 | jq '.error'