Skip to main content

Overview

Sanka CLI is a thin command-line wrapper around Sanka’s public APIs. Business logic stays on the server; the CLI handles token storage and refresh, profile and config, building requests for CRM and workflow endpoints, table or JSON output, and optional polling for long-running workflow runs.

Install

From GitHub (recommended until the first PyPI release):
uv tool install "git+https://github.com/sankaHQ/sanka-cli.git"
Bootstrap script:
curl -fsSL https://raw.githubusercontent.com/sankaHQ/sanka-cli/main/scripts/install.sh | sh
The script tries PyPI first and falls back to the GitHub repo if the package is not published yet.After the first PyPI release:
uv tool install sanka-cli
Homebrew (published tap: sankaHQ/homebrew-cli):
brew tap sankaHQ/cli
brew install sankaHQ/cli/sanka
For local development from a checkout:
uv tool install .

Authenticate

Create a Developer API access token and refresh token in Sanka, then save them locally (tokens are stored in the system keychain when available):
sanka auth login --access-token "<ACCESS_TOKEN>" --refresh-token "<REFRESH_TOKEN>"
Check the active profile and session:
sanka auth status
Clear stored tokens for a profile:
sanka auth logout

Profiles

List configured profiles and switch the active profile:
sanka profiles list
sanka profiles use prod

CRM records

The CLI exposes companies, contacts, deals, and tickets with list, get, create, update, and delete. Pass JSON inline or from a file with @path/to/file.json.
sanka companies list
sanka companies get <company-id>
sanka contacts get <contact-id>
sanka deals create --data @deal.json
sanka tickets delete <ticket-id>
get, update, and delete accept --external-id when resolving by external id.

Workflows

sanka workflows list
sanka workflows get <workflow-ref>
sanka workflows run <workflow-ref>
sanka workflows run <workflow-ref> --wait
Use --wait to poll until the run finishes (with --poll-interval and --timeout as needed).

AI helpers

sanka ai score company <record-id>
sanka ai score deal <record-id> --score-model-id <score-model-id>
sanka ai enrich company <record-id> --force-refresh
sanka ai enrich company --seed-name "Acme" --seed-url "https://acme.example" --dry-run
When using seed fields instead of a record id, --dry-run is required.

Global options and output

Top-level options:
  • --profile — profile name
  • --base-url — override API base URL for the command
  • --output table|json — output format
By default the CLI uses table output on a TTY and JSON otherwise. Override per command:
sanka --output json companies list

Environment overrides

These override stored profile values without persisting them:
  • SANKA_PROFILE
  • SANKA_BASE_URL (default API base is https://api.sanka.com when not set in config)
  • SANKA_ACCESS_TOKEN
  • SANKA_REFRESH_TOKEN

Source and docs