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, test, 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.8.tar.gz (81.1 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.8-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sanka_cli-0.1.8.tar.gz
  • Upload date:
  • Size: 81.1 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.8.tar.gz
Algorithm Hash digest
SHA256 183ce42c67e40d55b799ff24c839d59cd957ce937060402cc13d745e12d76c75
MD5 6404d8765631af2633a3966f32ad830c
BLAKE2b-256 33a57978a5940cbc25bce6bed82e1538dc16be8b9ff63f8ba373783bd491c4c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for sanka_cli-0.1.8.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.8-py3-none-any.whl.

File metadata

  • Download URL: sanka_cli-0.1.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b45e40f2e8291875384f6bb3423d381c72b3f7943d3780ad079f4ff91d318892
MD5 460b707a271f876c7ad840bb525da79c
BLAKE2b-256 287dbaae40d0583e34636f4da56d78f6ecc8a3c33ee45d3a34a751154e653022

See more details on using hashes here.

Provenance

The following attestation bundles were made for sanka_cli-0.1.8-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

This release

0.1.8 This release

2 files

0.1.7

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