Skip to main content

Witan spreadsheet CLI for coding agents

Project description

witan-cli

The spreadsheet toolkit for coding agents — edit, render, calculate, and lint Excel workbooks.

Documentation | How we built it

Install

Quick Install Script

curl -fsSL https://witanlabs.com/agents/install.sh | sh

From GitHub Releases

Download the latest artifacts from:

Example (macOS Apple Silicon):

curl -fsSL https://github.com/witanlabs/witan-cli/releases/latest/download/witan-darwin-arm64.tar.gz | tar -xz
install -m 0755 witan /usr/local/bin/witan

From PyPI

Install from PyPI (recommended for sandboxed agent environments):

# one-shot run without permanent install
uvx witan --help

# persistent install
pip install witan

From Source

Requires Go (version from go.mod):

go install github.com/witanlabs/witan-cli@latest

Quick Start

# Authenticate (recommended)
witan auth login

# Render a range
witan xlsx render report.xlsx -r "Sheet1!A1:F20"

# Recalculate formulas
witan xlsx calc report.xlsx

# Lint formulas
witan xlsx lint report.xlsx

# Run JS against workbook
witan xlsx exec report.xlsx --expr 'await xlsx.readCell(wb, "Summary!A1")'

# Create a new workbook from scratch
witan xlsx exec model.xlsx --create --save --code 'await xlsx.addSheet(wb, "Inputs"); return true'

What This CLI Covers

witan-cli currently exposes four spreadsheet commands:

  • witan xlsx calc
  • witan xlsx exec
  • witan xlsx lint
  • witan xlsx render

The lower-level Witan spreadsheet runtime supports broader workbook operations; this CLI focuses on the four agent-facing workflows above.

Auth, Config, and Modes

Authentication can be done via witan auth login, --api-key, or WITAN_API_KEY.

Environment variables:

  • WITAN_API_KEY: API key (optional when using witan auth login)
  • WITAN_API_URL: API base URL override (default: https://api.witanlabs.com)
  • WITAN_STATELESS: set 1 or true to force stateless mode
  • WITAN_CONFIG_DIR: override config directory (default: ~/.config/witan)
  • WITAN_MANAGEMENT_API_URL: management API override for auth login/token exchange

Modes:

  • Stateful (default when authenticated): uploads workbook revisions and reuses them across commands
  • Stateless (--stateless or WITAN_STATELESS=1): sends workbook bytes on every request, no server-side file reuse

witan xlsx exec --create always uses the stateless exec endpoint and only supports new .xlsx targets.

Limits:

  • Workbook inputs must be <= 25MB.

Development

# build local binary
make build

# run test suite
make test

# static checks
make vet
make format-check

# build release artifacts into dist/
make dist VERSION=v0.1.0

# build PyPI wheels (stable tags only)
make pypi-wheels VERSION=v0.1.0

The local binary is written to ./witan.

Release Process

Releases are handled by GitHub Actions:

  • Publish workflow: .github/workflows/witan-cli-release.yml (triggered by pushing v* tags)
  • Artifacts:
    • witan-darwin-arm64.tar.gz
    • witan-darwin-amd64.tar.gz
    • witan-linux-amd64.tar.gz
    • witan-linux-arm64.tar.gz
    • witan-windows-amd64.zip
    • witan-windows-arm64.zip
    • witan-install.sh
    • witan-*.whl (PyPI wheels for supported platforms; stable tags only)
    • witan-checksums.txt

PyPI publishing:

  • Stable tags (vX.Y.Z) publish wheels to PyPI using GitHub OIDC trusted publishing.
  • Pre-release tags (for example v1.2.3-rc.1) skip PyPI publish.

GitHub release publishing:

  • The workflow uploads artifacts directly to the matching GitHub Release tag.
  • If the release already exists (for example, created in the GitHub UI), assets are attached with --clobber.

Cutting a release (UI-driven):

  1. Add release notes under ## Unreleased in CHANGELOG.md.
  2. Create a GitHub Release in the UI with a new tag vX.Y.Z (or prerelease tag vX.Y.Z-suffix).
  3. Tag push triggers Witan CLI Release.
  4. The workflow builds artifacts, attaches them to the GitHub Release, and publishes to PyPI for stable tags.
  5. On successful release, CI runs scripts/roll-changelog.sh, pushes the changelog update to a chore/changelog-release-X.Y.Z branch, and opens a PR into the default branch.
  6. For stable tags, verify witan==X.Y.Z on PyPI and witan --version.

Manual git tag ... && git push ... is equivalent to UI tag creation and triggers the same workflow.

CI

Go CI runs in .github/workflows/golang.yml on pushes to main and pull requests.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

witan-0.8.0-py3-none-win_arm64.whl (8.4 MB view details)

Uploaded Python 3Windows ARM64

witan-0.8.0-py3-none-win_amd64.whl (9.1 MB view details)

Uploaded Python 3Windows x86-64

witan-0.8.0-py3-none-musllinux_1_2_x86_64.whl (8.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

witan-0.8.0-py3-none-musllinux_1_2_aarch64.whl (8.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

witan-0.8.0-py3-none-manylinux_2_17_x86_64.whl (8.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

witan-0.8.0-py3-none-manylinux_2_17_aarch64.whl (8.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

witan-0.8.0-py3-none-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

witan-0.8.0-py3-none-macosx_10_9_x86_64.whl (9.0 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file witan-0.8.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: witan-0.8.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 8.4 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for witan-0.8.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 0a3478e0c8f607c1dff3ff6426494d64fd08240f78baf77baf305736e5a9ed3a
MD5 5a9ef3bf0dec733be246cf644e7f91dc
BLAKE2b-256 e3a7ca570c2354a07a2dddf5f43b9853156345df24476892c0a7c1f14cc097d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan-0.8.0-py3-none-win_arm64.whl:

Publisher: witan-cli-release.yml on witanlabs/witan-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 witan-0.8.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: witan-0.8.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 9.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for witan-0.8.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d270741d7d563b2b5b1cdeb92af29eb8812b7de67195e72196bf57e4221014af
MD5 ac958618117d4cbd2591e9fa0e3ac866
BLAKE2b-256 7c0ad36ecd408d1b75de7c021aeeefa963d9267204604a4ab7eb069ccb45259c

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan-0.8.0-py3-none-win_amd64.whl:

Publisher: witan-cli-release.yml on witanlabs/witan-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 witan-0.8.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for witan-0.8.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f180eead59555e9341d0b234495632ffab7f2eac39904326605ccb7e12fe70cd
MD5 80a85a72a3f951bd058974a8bbce3b6f
BLAKE2b-256 4cad2521d2868b61e96cd6f038d5a997e195648f3dc8a35f8a9c16f22ba4e653

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan-0.8.0-py3-none-musllinux_1_2_x86_64.whl:

Publisher: witan-cli-release.yml on witanlabs/witan-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 witan-0.8.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for witan-0.8.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 54884a109fc814d84e2983502a5af90ae21b56443c034dfd5f8b1c446367415a
MD5 5334975e3e40578c08e1ecfc0eca4ff9
BLAKE2b-256 382889afe7c0365b01ea74712c24c29691cf5ab3b6259ff4ffa650bff38eb6ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan-0.8.0-py3-none-musllinux_1_2_aarch64.whl:

Publisher: witan-cli-release.yml on witanlabs/witan-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 witan-0.8.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for witan-0.8.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 e6000dc745d8cafebd2a77fda38110301fbdf575c19fcf00f736f4fece70cf18
MD5 4c014b9fbaf78c070864872859a73659
BLAKE2b-256 5c37bb89558a637dc83ca38195664007343cf4741328bc74e5b4a8a843803dcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan-0.8.0-py3-none-manylinux_2_17_x86_64.whl:

Publisher: witan-cli-release.yml on witanlabs/witan-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 witan-0.8.0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for witan-0.8.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 04cec4f203f220cc601a66c73eb0f330ab787c0094aaa6cccce07c535ac7f935
MD5 88db9fbe835609fb9a533e4cd38278c8
BLAKE2b-256 b50b35c1f62ff88709cbbc5a755d4c08071e6086bb4bc9270d6c45e14216f0d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan-0.8.0-py3-none-manylinux_2_17_aarch64.whl:

Publisher: witan-cli-release.yml on witanlabs/witan-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 witan-0.8.0-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: witan-0.8.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 8.4 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for witan-0.8.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f62a80a8188565f718f094fd710d63cc405cff8bb80f6c7e0ddbe84b389bd2bf
MD5 14017d7754b93a3320b287982a24e407
BLAKE2b-256 c927cd6978786503c6c5c7ef335328f33cf313b179ce67b8d4b08abb0b2899aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan-0.8.0-py3-none-macosx_11_0_arm64.whl:

Publisher: witan-cli-release.yml on witanlabs/witan-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 witan-0.8.0-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for witan-0.8.0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0d07e7e3012c3bd5f1026389909136b117f714d3d18439badaf92cf15afdeac7
MD5 b9146e05ab0ed7bd13361e365b4928cf
BLAKE2b-256 97a13430160c2115411abdd8267ffbdf0b1084bf6584815036f59617f2c10515

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan-0.8.0-py3-none-macosx_10_9_x86_64.whl:

Publisher: witan-cli-release.yml on witanlabs/witan-cli

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page