Skip to main content

Sanka CLI

Thin command-line wrapper for Sanka's public CRM and AI API.

The CLI keeps business logic on the server. It handles:

  • Developer API token auth and refresh
  • local profile and config management
  • request construction for CRM, workflow, and AI endpoints
  • table or JSON output
  • polling for long-running workflow runs

Install

From PyPI:

uv tool install sanka-cli

Bootstrap script from a pinned release tag:

curl -fsSLO https://raw.githubusercontent.com/sankaHQ/sanka-cli/v0.1.3/scripts/install.sh
sh install.sh

From a pinned GitHub release tag:

uv tool install "git+https://github.com/sankaHQ/sanka-cli.git@v0.1.3"

Homebrew support is published through sankaHQ/homebrew-cli. Install with:

brew tap sankaHQ/cli
brew install sankaHQ/cli/sanka

If you previously installed sanka from the old sankaHQ/tap tap (sankaHQ/homebrew-tap), remove that formula and untap it first:

brew uninstall sanka
brew untap sankaHQ/tap
brew tap sankaHQ/cli
brew install sankaHQ/cli/sanka

Authenticate

Create a Developer API Token in Sanka, then save it locally. Login verifies the token against the API and prints the workspace and user it belongs to; a rejected token is not saved. If the API is unreachable, the token is saved with a warning so offline setup still works.

sanka auth login --access-token "<ACCESS_TOKEN>"

Migration commands

sanka also fronts the Sanka migration engine: scan, plan, validate, apply, verify, status, migrate, connect, research, and assess are delegated to the sanka-migrate package. PyPI installs of sanka-cli 0.1.7+ bundle the engine, so the commands just work — no API token needed for local migration runs:

uv tool install sanka-cli
sanka scan .

The Homebrew formula stays lean and does not bundle the engine; add it with uv tool install sanka-migrate and sanka delegates to it on PATH.

Check the active profile:

sanka auth status

Command Areas

CRM records:

sanka companies list
sanka contacts get <contact-id>
sanka deals create --data @deal.json
sanka tickets delete <ticket-id>

Workflow automation:

sanka workflows list
sanka workflows run <workflow-ref>
sanka workflows run <workflow-ref> --wait

Custom Code — write a workflow action in JavaScript or Python, keep it in your own repository, and push versions to Sanka:

sanka code init --slug enrich-company --runtime node
sanka code create
sanka code push --activate -m "add tier logic"

Your repository is the source of truth. Versions are immutable and content-addressed, so pushing unchanged code returns the version that already exists — safe to run on every CI merge. Rolling back is a pointer move, not a redeploy:

sanka code versions enrich-company
sanka code rollback enrich-company          # or: deploy --version 4

pull writes a deployed version back to disk and diff reports whether your working directory matches what is live. diff exits non-zero when they differ, which makes it usable as a CI drift check:

sanka code pull enrich-company --dir ./functions/enrich
sanka code diff --dir ./functions/enrich

Secrets are per-function and never readable back — list shows only a masked suffix:

sanka code secrets set enrich-company CLEARBIT_API_KEY   # prompts, no echo
sanka code secrets list enrich-company

Files are excluded from a push by .sankaignore; .git, node_modules, __pycache__, .venv, build output, and .env are excluded by default.

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

Output Modes

The CLI defaults to table output on a TTY and JSON otherwise. Override this per command when needed:

sanka --output json companies list

Environment Overrides

  • SANKA_PROFILE
  • SANKA_BASE_URL
  • SANKA_ACCESS_TOKEN

These override stored profile values without persisting them.

Docs

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sanka_cli-0.1.7.tar.gz (81.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sanka_cli-0.1.7-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file sanka_cli-0.1.7.tar.gz.

File metadata

  • Download URL: sanka_cli-0.1.7.tar.gz
  • Upload date:
  • Size: 81.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sanka_cli-0.1.7.tar.gz
Algorithm Hash digest
SHA256 0eaf8d0eed4824234fd5f64e90848563056086be27aba7835b2d35abe0ec4b9a
MD5 1617915821ddc7102e34d4cf572be3e4
BLAKE2b-256 554fd7a8911033efcb3247671b8a60fa496cbf934b1fe2b1af4523a87aee2209

See more details on using hashes here.

Provenance

The following attestation bundles were made for sanka_cli-0.1.7.tar.gz:

Publisher: release.yml on sankaHQ/sanka-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sanka_cli-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: sanka_cli-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sanka_cli-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a25534949b71295cb19479e9f207f803fdbeaa757bb75a2353984b53cd0941f3
MD5 d6fff725f86b3c9a5ecbeaf50e7df29f
BLAKE2b-256 fe010da6c20f4bf3e78291ccd2e01ff1dc09c201a85a429bf44d38691d73dc0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for sanka_cli-0.1.7-py3-none-any.whl:

Publisher: release.yml on sankaHQ/sanka-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.8

2 files

This release

0.1.7 This release

2 files

0.1.6

2 files

0.1.5

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page