Commands
Reference documentation for all Sazabi CLI commands.
Complete reference for all Sazabi CLI commands. Run any command with --help
to see available options.
Global flags
These flags work with all commands:
| Flag | Description |
|---|---|
--profile | Use a specific named profile |
--json | Output as JSON (available on all subcommands) |
--help | Show help for the command |
--version | Show CLI version (root command only) |
auth
Manage authentication credentials.
auth login
Authenticate via browser using OAuth device flow.
sazabi auth loginOpens your default browser to complete authentication. After logging in, your credentials are stored locally for future commands.
| Option | Description |
|---|---|
--api-base-url | Override public API URL |
--auth-base-url | Override auth API URL |
--web-base-url | Override web app URL |
auth save
Save an existing bearer token or API key to the active profile.
sazabi auth save <token>| Argument | Description |
|---|---|
<token> | Bearer token or secret key to save |
| Option | Description |
|---|---|
--api-base-url | Override API base URL |
--web-base-url | Override web app URL |
auth logout
Remove saved credentials from the active profile.
sazabi auth logoutauth whoami
Display current authentication context and active selections.
sazabi auth whoamiShows:
- Credential type (user token, secret key, or partner key)
- Authenticated user or key name
- Active organization and project
- Source of each credential (flag, environment, or settings)
| Option | Description |
|---|---|
--api-base-url | Override API base URL |
profiles
Manage named CLI profiles for multi-environment configuration.
profiles list
List all configured profiles.
sazabi profiles listprofiles use
Set the active profile.
sazabi profiles use <name>| Argument | Description |
|---|---|
<name> | Profile name |
profiles create
Create a new empty profile.
sazabi profiles create <name>| Argument | Description |
|---|---|
<name> | Profile name |
profiles delete
Delete a profile. Cannot delete the active profile.
sazabi profiles delete <name>| Argument | Description |
|---|---|
<name> | Profile name |
organizations
Manage organizations.
organizations list
List organizations available to the current credential.
sazabi organizations list| Option | Description |
|---|---|
--token | Override authentication token |
--api-base-url | Override API base URL |
organizations use
Set the active organization for future commands.
sazabi organizations use <organization-id>| Argument | Description |
|---|---|
<organization-id> | Organization ID |
organizations rename
Rename the active organization.
sazabi organizations rename <name>| Argument | Description |
|---|---|
<name> | New organization name |
| Option | Description |
|---|---|
--organization-id | Override organization |
projects
Manage projects.
projects list
List projects in the active organization.
sazabi projects list| Option | Description |
|---|---|
--organization-id | Override organization |
--token | Override authentication token |
--api-base-url | Override API base URL |
projects use
Set the active project for future commands.
sazabi projects use <project-id>| Argument | Description |
|---|---|
<project-id> | Project ID |
members
Manage organization members.
members list
List members in the active organization.
sazabi members list| Option | Description |
|---|---|
--organization-id | Override organization |
--token | Override authentication token |
--api-base-url | Override API base URL |
members update-role
Update a member's organization role.
sazabi members update-role <user-id> --role <role>| Argument | Description |
|---|---|
<user-id> | User ID |
| Option | Description |
|---|---|
--role | New role: admin or member |
--organization-id | Override organization |
members remove
Remove a member from the active organization.
sazabi members remove <user-id>| Argument | Description |
|---|---|
<user-id> | User ID |
public-keys
Manage public API keys. Public keys are project-scoped and used for log ingestion.
public-keys list
List public keys in the active project.
sazabi public-keys list| Option | Description |
|---|---|
--project-id | Override project |
--limit | Max keys to return (default: 50, max: 100) |
--cursor | Pagination cursor |
public-keys get
Get details for a specific public key.
sazabi public-keys get <key-id>| Argument | Description |
|---|---|
<key-id> | Public key ID |
public-keys create
Create a new public key.
sazabi public-keys create <name>| Argument | Description |
|---|---|
<name> | Key name |
| Option | Description |
|---|---|
--project-id | Override project |
--expires-at | ISO timestamp when key should expire |
public-keys update
Update a public key.
sazabi public-keys update <key-id> --name "New name"| Argument | Description |
|---|---|
<key-id> | Public key ID |
| Option | Description |
|---|---|
--name | New key name |
--expires-at | New expiration timestamp |
--clear-expires-at | Remove expiration |
public-keys delete
Delete a public key.
sazabi public-keys delete <key-id>| Argument | Description |
|---|---|
<key-id> | Public key ID |
secret-keys
Manage secret API keys. Secret keys are organization-scoped and provide full API access.
secret-keys list
List secret keys in the organization.
sazabi secret-keys list| Option | Description |
|---|---|
--limit | Max keys to return (default: 50, max: 100) |
--cursor | Pagination cursor |
secret-keys get
Get details for a specific secret key.
sazabi secret-keys get <key-id>secret-keys create
Create a new secret key.
sazabi secret-keys create <name>| Argument | Description |
|---|---|
<name> | Key name |
| Option | Description |
|---|---|
--expires-at | ISO timestamp when key should expire |
secret-keys update
Update a secret key.
sazabi secret-keys update <key-id> --name "New name"| Option | Description |
|---|---|
--name | New key name |
--expires-at | New expiration timestamp |
--clear-expires-at | Remove expiration |
secret-keys delete
Delete a secret key.
sazabi secret-keys delete <key-id>logs
Stream and forward logs.
logs tail
Stream logs from the current project in real-time via WebSocket.
sazabi logs tail| Option | Description |
|---|---|
--severities | Filter by comma-separated severities (ERROR,WARN) |
--services | Filter by comma-separated service names |
--environments | Filter by comma-separated environments |
--search | Filter by search term (case-insensitive) |
--trace-id | Filter by trace ID |
--duration | Duration to tail in seconds (default: unlimited) |
--region | Override project region |
--tail-base-url | Override tail WebSocket URL |
Examples:
# Tail all logs
sazabi logs tail
# Tail only errors and warnings
sazabi logs tail --severities ERROR,WARN
# Tail specific services
sazabi logs tail --services api,worker
# Tail with search filter
sazabi logs tail --search "database"
# Output as JSON (for piping)
sazabi logs tail --jsonlogs forward
Forward plaintext logs from stdin or file to the current project.
# From stdin
echo "Log message" | sazabi logs forward
# From file
sazabi logs forward --file app.log
# Follow file (like tail -f)
sazabi logs forward --file app.log --follow| Option | Description |
|---|---|
--file, -f | Read from file instead of stdin |
--follow | Follow file for new lines (like tail -f) |
--batch-size | Lines to batch before sending (default: 100) |
--public-key | Use specific public key (skip auto-create) |
--region | Override project region |
--intake-base-url | Override intake URL |
threads
Manage agent threads.
threads list
List threads from the current project.
sazabi threads list| Option | Description |
|---|---|
--limit | Max threads to return (default: 20, max: 100) |
--cursor | Pagination cursor |
--status | Filter by status: regular or archived |
threads get
Get a thread with its messages.
sazabi threads get <thread-id>| Argument | Description |
|---|---|
<thread-id> | Thread ID |
threads search
Search threads in the current project.
sazabi threads search <query>| Argument | Description |
|---|---|
<query> | Search query |
| Option | Description |
|---|---|
--limit | Max results (default: 20, max: 100) |
--page | Page number for pagination (default: 1) |
--status | Filter by status: regular or archived |
messages
Send, list, and search messages.
messages send
Send a message to a thread. Creates a new thread if --thread-id is omitted.
sazabi messages send <message>| Argument | Description |
|---|---|
<message> | Message text |
| Option | Description |
|---|---|
--thread-id, -t | Thread ID (creates new thread if omitted) |
--wait | Wait for assistant response and print it |
--timeout | Timeout in seconds for --wait (default: none) |
Examples:
# Start a new thread
sazabi messages send "What errors are happening in production?"
# Continue existing thread
sazabi messages send "Show me the stack traces" --thread-id abc123
# Wait for response
sazabi messages send "Hello" --wait
# Wait with timeout
sazabi messages send "Hello" --wait --timeout 120messages list
List messages in a thread.
sazabi messages list <thread-id>| Argument | Description |
|---|---|
<thread-id> | Thread ID |
| Option | Description |
|---|---|
--limit | Max messages to return (default: 50, max: 100) |
--cursor | Pagination cursor |
messages search
Search messages in the current project.
sazabi messages search <query>| Argument | Description |
|---|---|
<query> | Search query |
| Option | Description |
|---|---|
--limit | Max results (default: 20, max: 100) |
--page | Page number (default: 1) |
--thread-id | Filter to specific thread |
--role | Filter by role: user or assistant |
runs
Inspect deferred agent runs.
runs get
Get a deferred run by run ID. Use this to poll for completion when a message send returns before the response is ready.
sazabi runs get <run-id>| Argument | Description |
|---|---|
<run-id> | Run ID |
| Option | Description |
|---|---|
--wait | Wait for terminal status and print result |
--timeout | Timeout in seconds for --wait (default: none) |
Examples:
# Check current status
sazabi runs get run_abc123
# Wait for completion
sazabi runs get run_abc123 --wait
# Wait with timeout
sazabi runs get run_abc123 --wait --timeout 60data-sources
Manage data source connections and streams.
data-sources types
List supported data source types.
sazabi data-sources typesdata-sources connections list
List data source connections.
sazabi data-sources connections list| Option | Description |
|---|---|
--type | Filter by data source type |
--project-id | Override project |
data-sources connections get
Get details for a specific connection.
sazabi data-sources connections get <connection-id>data-sources connections create
Create a data source connection.
sazabi data-sources connections create --type fly_io --metadata '{"apiToken":"..."}'| Option | Description |
|---|---|
--type | Data source type (required) |
--metadata | JSON metadata object (required) |
--display-name | Human-readable name |
--project-id | Override project |
data-sources streams list
List streams for a connection.
sazabi data-sources streams list --connection-id <id>| Option | Description |
|---|---|
--connection-id | Connection ID (required) |
data-sources streams get
Get stream details and provisioning status.
sazabi data-sources streams get <stream-id>data-sources streams create
Create a stream for a connection.
sazabi data-sources streams create --connection-id <id> --display-name "my-app"| Option | Description |
|---|---|
--connection-id | Connection ID (required) |
--display-name | Resource name (required) |
--config | JSON stream configuration |
data-sources skill
Show the agent setup skill for a data source type.
sazabi data-sources skill --type gcp| Option | Description |
|---|---|
--type | Data source type (required) |
settings
Manage global CLI settings stored in ~/.sazabi/settings.json.
settings view
Show current CLI settings and file location.
sazabi settings viewsettings set
Set a global configuration value.
sazabi settings set <key> <value>| Argument | Description |
|---|---|
<key> | Setting key |
<value> | Setting value |
Available keys:
| Key | Description |
|---|---|
apiBaseUrl | Override public API base URL |
authBaseUrl | Override auth API base URL |
webBaseUrl | Override web app base URL |
intakeBaseUrl | Override intake base URL |
tailBaseUrl | Override tail WebSocket base URL |
apiDomain | Domain shortcut for API |
webDomain | Domain shortcut for web app |
intakeDomain | Domain shortcut for intake |
tailDomain | Domain shortcut for tail |
forwardPublicKey | Default public key for log forwarding |
Example:
sazabi settings set apiBaseUrl https://api.sazabi.devsettings unset
Clear a global configuration value.
sazabi settings unset <key>completions
Generate shell completion scripts for tab completion.
completions zsh
Output zsh completion script.
# Add to ~/.zshrc
eval "$(sazabi completions zsh)"completions bash
Output bash completion script.
# Add to ~/.bashrc
eval "$(sazabi completions bash)"Output formatting
All commands support --json for machine-readable output.
Human-readable output
By default, the CLI formats output for terminal readability with tables, colors, and progress indicators:
sazabi projects list
Projects
ID Name Region Active
11111111-1111-4111-8111-111111111111 production-api us-east yes
22222222-2222-4222-8222-222222222222 staging-api us-eastJSON output
Use --json for scripting and automation. JSON output includes all fields and
is stable across CLI versions:
sazabi projects list --json{
"projects": [
{
"id": "11111111-1111-4111-8111-111111111111",
"name": "production-api",
"region": "us-east"
}
]
}Error output
Errors in JSON mode include an error field:
{
"error": "Organization not found"
}Environment variables
Configure the CLI with environment variables:
| Variable | Description |
|---|---|
SAZABI_PROFILE | Override active profile |
SAZABI_TOKEN | Override authentication token |
SAZABI_PROJECT_ID | Override active project |
Environment variables take precedence over settings file values but are overridden by command-line flags.
Exit codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Error (invalid arguments, API error) |