Skip to content

CLI

The CommissionSight CLI is a native command-line client — the fourth way to adopt alongside the app, the API, and the SDKs. It’s a thin, faithful wrapper over the TypeScript SDK (no re-implemented HTTP), so it exposes the full account-facing API surface from your terminal.

It’s designed to be driven by humans and AI agents alike — an agentic harness such as Claude Code can run it locally to authenticate, pick or create a workspace, and upload statements without any interactive prompts.

Built for agents

Every command is built for non-interactive, scriptable use:

  • Machine-readable output — structured JSON for programmatic consumers (with human-friendly output for terminals).
  • Deterministic exit codes — success vs. failure is unambiguous, so a harness can branch on it.
  • Fully non-interactive flags — nothing blocks on a prompt; everything can be passed as a flag or environment variable.
  • Self-describing — a schema command emits the command tree so an agent can discover what’s available without scraping --help.

Install

Terminal window
npm install -g @commissionsight/cli

This installs two equivalent binaries: cs and commissionsight. See it on npm.

What it does

Built on @commissionsight/sdk 2.3.0, the CLI covers the full API surface, including:

  • Authentication — securely store and verify your per-account API token (no email/password or OAuth; tokens are issued by CommissionSight). Point at any base URL for testing.
  • Workspaces — list, create, and select the workspace your commands target (the multi-workspace feature must be enabled on your account to create one).
  • Statement upload — upload a statement for any carrier, any period, in any workspace, with the same idempotency-key and replace semantics as the API; then poll the job and read results.
  • Everything else — carriers/configs, files, jobs, members & journeys, comparisons, reports (rollup, attrition, cumulative audit totals, data-quality), chargebacks, expected rates, webhooks, and billing — the same methods documented for the SDK. For example, cs report cumulative --from 2025-01 --to 2025-12 --csv exports a year’s owed/at-risk/chargebacks by month for an audit.
Terminal window
# Representative — run `cs --help` or `cs schema` for the live command set.
cs auth login --token "$CS_TOKEN"
cs workspaces list
cs workspaces create --name "Medicare"
cs upload ./march.csv --carrier "$CARRIER_ID" --period 2026-03 --workspace "$WORKSPACE_ID"
cs schema # emits the command tree (for agents)

The command surface grows over time — cs --help and cs schema always reflect what your installed version supports.

Authentication

The CLI authenticates with a per-account API token — the same bearer token the API and SDKs use. It stores the token securely and sends it as Authorization: Bearer <token> on every call. Get a token from the CommissionSight web app (see API authentication).