Skip to main content

Token — a colorful CLI coding agent with file tools, shell execution, and swappable LLM providers

Project description

Token

PyPI version Python

A colorful CLI coding agent built in Python. It reads and writes files, searches code, runs shell commands, and chats with you via OpenRouter, OpenAI, Anthropic, or Google — all from your terminal with a Rich-powered UI.

Install

Recommended — isolated CLI install with pipx:

pipx install excergic-token

Or with pip:

pip install excergic-token

Or with uv:

uv tool install excergic-token

Requires Python 3.11+.

Quick start

pipx install excergic-token
token

On first run, Token prompts you to paste an API key in the terminal, fetches models live, and saves your credentials to ~/.config/token/config.json (mode 0600, only your user can read it). Workspace defaults to your current directory.

token

Use /provider anytime to switch provider, paste a new key, or pick a different model.

Usage

# Start the agent (default — uses current directory as workspace)
token

# Optional flags
token --model gpt-4o --workspace /path/to/project

# Version
token version

Features

  • File tools — read, write, create, list directories, regex search
  • Shell execution — run commands in your workspace (with permission)
  • Human-in-the-loop — destructive actions require explicit approval (y / a / n)
  • Workspace sandbox — all paths confined to a configurable root
  • Swappable LLMs — OpenRouter, OpenAI, Anthropic, or Google with live model catalogs
  • Colorful UI — Rich panels, markdown, syntax highlighting, spinners

Slash commands

Command Description
/help Show help
/clear Clear conversation history
/provider Switch provider and model mid-chat
/setup Re-run provider and model setup
/usage Show session token usage
/exit Quit

Permission prompts

When the agent wants to write a file or run a shell command, you'll see a preview and be asked:

  • y — allow once
  • a — allow all for this session
  • n — deny

Configuration

API keys are never read from .env. Paste them in the CLI during setup (/setup or /provider); they are saved to ~/.config/token/config.json.

Optional environment variables (non-secret tuning only):

Variable Default Description
WORKSPACE_ROOT . Sandbox workspace root
SHELL_TIMEOUT_SECONDS 60 Shell command timeout
TOKEN_BUDGET_LIMIT 200000 Per-session token budget

Development

git clone https://github.com/Excergic/Token.git
cd Token
uv sync
cp .env.example .env   # optional workspace overrides only
uv run token

Publishing (maintainers)

Releases are published to PyPI as excergic-token via GitHub Actions when a GitHub Release is published.

  1. Configure PyPI Trusted Publishing for excergic-token → GitHub Excergic/Token
  2. Create a GitHub environment named pypi in repo settings
  3. Tag and release:
git tag v1.1.3
git push origin v1.1.3
# Create a GitHub Release from the tag — CI publishes automatically

Manual publish:

uv build
UV_PUBLISH_TOKEN=pypi-... uv publish

License

MIT

Project details


Download files

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

Source Distribution

excergic_token-1.1.3.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

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

excergic_token-1.1.3-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file excergic_token-1.1.3.tar.gz.

File metadata

  • Download URL: excergic_token-1.1.3.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for excergic_token-1.1.3.tar.gz
Algorithm Hash digest
SHA256 fcb5bd310a387e856ad156cea9d9a109e1bdf3b8eca18abe9a2493ec554c6460
MD5 6910805a5b9a3a27654580ff2e24d68a
BLAKE2b-256 cced85d78b35cc04f06bbf6c31cf3c39a74a717221eaa16d027a631ef799d758

See more details on using hashes here.

Provenance

The following attestation bundles were made for excergic_token-1.1.3.tar.gz:

Publisher: publish.yml on Excergic/Token

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

File details

Details for the file excergic_token-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: excergic_token-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 45.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for excergic_token-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 084daccb113cf309a558044abee2343b7a31bfbc3ad4212ee758c2c0cc9c6d93
MD5 43e7f4462af874212ffab3a177d50140
BLAKE2b-256 b064f75464f22f6aa9027defba6b0b47c637b6512eeade1b482d285e83f1ed3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for excergic_token-1.1.3-py3-none-any.whl:

Publisher: publish.yml on Excergic/Token

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