Sazabi
CLI

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:

FlagDescription
--profileUse a specific named profile
--jsonOutput as JSON (available on all subcommands)
--helpShow help for the command
--versionShow CLI version (root command only)

auth

Manage authentication credentials.

auth login

Authenticate via browser using OAuth device flow.

sazabi auth login

Opens your default browser to complete authentication. After logging in, your credentials are stored locally for future commands.

OptionDescription
--api-base-urlOverride public API URL
--auth-base-urlOverride auth API URL
--web-base-urlOverride web app URL

auth save

Save an existing bearer token or API key to the active profile.

sazabi auth save <token>
ArgumentDescription
<token>Bearer token or secret key to save
OptionDescription
--api-base-urlOverride API base URL
--web-base-urlOverride web app URL

auth logout

Remove saved credentials from the active profile.

sazabi auth logout

auth whoami

Display current authentication context and active selections.

sazabi auth whoami

Shows:

  • 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)
OptionDescription
--api-base-urlOverride API base URL

profiles

Manage named CLI profiles for multi-environment configuration.

profiles list

List all configured profiles.

sazabi profiles list

profiles use

Set the active profile.

sazabi profiles use <name>
ArgumentDescription
<name>Profile name

profiles create

Create a new empty profile.

sazabi profiles create <name>
ArgumentDescription
<name>Profile name

profiles delete

Delete a profile. Cannot delete the active profile.

sazabi profiles delete <name>
ArgumentDescription
<name>Profile name

organizations

Manage organizations.

organizations list

List organizations available to the current credential.

sazabi organizations list
OptionDescription
--tokenOverride authentication token
--api-base-urlOverride API base URL

organizations use

Set the active organization for future commands.

sazabi organizations use <organization-id>
ArgumentDescription
<organization-id>Organization ID

organizations rename

Rename the active organization.

sazabi organizations rename <name>
ArgumentDescription
<name>New organization name
OptionDescription
--organization-idOverride organization

projects

Manage projects.

projects list

List projects in the active organization.

sazabi projects list
OptionDescription
--organization-idOverride organization
--tokenOverride authentication token
--api-base-urlOverride API base URL

projects use

Set the active project for future commands.

sazabi projects use <project-id>
ArgumentDescription
<project-id>Project ID

members

Manage organization members.

members list

List members in the active organization.

sazabi members list
OptionDescription
--organization-idOverride organization
--tokenOverride authentication token
--api-base-urlOverride API base URL

members update-role

Update a member's organization role.

sazabi members update-role <user-id> --role <role>
ArgumentDescription
<user-id>User ID
OptionDescription
--roleNew role: admin or member
--organization-idOverride organization

members remove

Remove a member from the active organization.

sazabi members remove <user-id>
ArgumentDescription
<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
OptionDescription
--project-idOverride project
--limitMax keys to return (default: 50, max: 100)
--cursorPagination cursor

public-keys get

Get details for a specific public key.

sazabi public-keys get <key-id>
ArgumentDescription
<key-id>Public key ID

public-keys create

Create a new public key.

sazabi public-keys create <name>
ArgumentDescription
<name>Key name
OptionDescription
--project-idOverride project
--expires-atISO timestamp when key should expire

public-keys update

Update a public key.

sazabi public-keys update <key-id> --name "New name"
ArgumentDescription
<key-id>Public key ID
OptionDescription
--nameNew key name
--expires-atNew expiration timestamp
--clear-expires-atRemove expiration

public-keys delete

Delete a public key.

sazabi public-keys delete <key-id>
ArgumentDescription
<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
OptionDescription
--limitMax keys to return (default: 50, max: 100)
--cursorPagination 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>
ArgumentDescription
<name>Key name
OptionDescription
--expires-atISO timestamp when key should expire

secret-keys update

Update a secret key.

sazabi secret-keys update <key-id> --name "New name"
OptionDescription
--nameNew key name
--expires-atNew expiration timestamp
--clear-expires-atRemove 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
OptionDescription
--severitiesFilter by comma-separated severities (ERROR,WARN)
--servicesFilter by comma-separated service names
--environmentsFilter by comma-separated environments
--searchFilter by search term (case-insensitive)
--trace-idFilter by trace ID
--durationDuration to tail in seconds (default: unlimited)
--regionOverride project region
--tail-base-urlOverride 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 --json

logs 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
OptionDescription
--file, -fRead from file instead of stdin
--followFollow file for new lines (like tail -f)
--batch-sizeLines to batch before sending (default: 100)
--public-keyUse specific public key (skip auto-create)
--regionOverride project region
--intake-base-urlOverride intake URL

threads

Manage agent threads.

threads list

List threads from the current project.

sazabi threads list
OptionDescription
--limitMax threads to return (default: 20, max: 100)
--cursorPagination cursor
--statusFilter by status: regular or archived

threads get

Get a thread with its messages.

sazabi threads get <thread-id>
ArgumentDescription
<thread-id>Thread ID

Search threads in the current project.

sazabi threads search <query>
ArgumentDescription
<query>Search query
OptionDescription
--limitMax results (default: 20, max: 100)
--pagePage number for pagination (default: 1)
--statusFilter 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>
ArgumentDescription
<message>Message text
OptionDescription
--thread-id, -tThread ID (creates new thread if omitted)
--waitWait for assistant response and print it
--timeoutTimeout 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 120

messages list

List messages in a thread.

sazabi messages list <thread-id>
ArgumentDescription
<thread-id>Thread ID
OptionDescription
--limitMax messages to return (default: 50, max: 100)
--cursorPagination cursor

Search messages in the current project.

sazabi messages search <query>
ArgumentDescription
<query>Search query
OptionDescription
--limitMax results (default: 20, max: 100)
--pagePage number (default: 1)
--thread-idFilter to specific thread
--roleFilter 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>
ArgumentDescription
<run-id>Run ID
OptionDescription
--waitWait for terminal status and print result
--timeoutTimeout 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 60

data-sources

Manage data source connections and streams.

data-sources types

List supported data source types.

sazabi data-sources types

data-sources connections list

List data source connections.

sazabi data-sources connections list
OptionDescription
--typeFilter by data source type
--project-idOverride 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":"..."}'
OptionDescription
--typeData source type (required)
--metadataJSON metadata object (required)
--display-nameHuman-readable name
--project-idOverride project

data-sources streams list

List streams for a connection.

sazabi data-sources streams list --connection-id <id>
OptionDescription
--connection-idConnection 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"
OptionDescription
--connection-idConnection ID (required)
--display-nameResource name (required)
--configJSON stream configuration

data-sources skill

Show the agent setup skill for a data source type.

sazabi data-sources skill --type gcp
OptionDescription
--typeData source type (required)

settings

Manage global CLI settings stored in ~/.sazabi/settings.json.

settings view

Show current CLI settings and file location.

sazabi settings view

settings set

Set a global configuration value.

sazabi settings set <key> <value>
ArgumentDescription
<key>Setting key
<value>Setting value

Available keys:

KeyDescription
apiBaseUrlOverride public API base URL
authBaseUrlOverride auth API base URL
webBaseUrlOverride web app base URL
intakeBaseUrlOverride intake base URL
tailBaseUrlOverride tail WebSocket base URL
apiDomainDomain shortcut for API
webDomainDomain shortcut for web app
intakeDomainDomain shortcut for intake
tailDomainDomain shortcut for tail
forwardPublicKeyDefault public key for log forwarding

Example:

sazabi settings set apiBaseUrl https://api.sazabi.dev

settings 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-east

JSON 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:

VariableDescription
SAZABI_PROFILEOverride active profile
SAZABI_TOKENOverride authentication token
SAZABI_PROJECT_IDOverride active project

Environment variables take precedence over settings file values but are overridden by command-line flags.

Exit codes

CodeDescription
0Success
1Error (invalid arguments, API error)

Next steps