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 OpenAI — 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 asks for your OpenAI API key and model, saves them to ~/.config/token/, then opens the chat. Workspace defaults to your current directory.

# Optional: override via environment
export OPENAI_API_KEY=sk-...
export OPENAI_MODEL=gpt-4.1

token

Usage

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

# Optional flags
token --model gpt-4.1-mini --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 LLM — provider abstraction with OpenAI as the default
  • Colorful UI — Rich panels, markdown, syntax highlighting, spinners

Slash commands

Command Description
/help Show help
/clear Clear conversation history
/setup Update API key and model
/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

Environment variables (via .env or shell):

Variable Default Description
OPENAI_API_KEY Your OpenAI API key
OPENAI_MODEL gpt-4o Model to use
LLM_PROVIDER openai LLM provider (extensible)
WORKSPACE_ROOT . Sandbox workspace root

Development

git clone https://github.com/Excergic/Token.git
cd Token
uv sync
cp .env.example .env   # add your API key
uv run token chat --workspace .

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 v0.1.0
git push origin v0.1.0
# 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-0.1.1.tar.gz (13.7 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-0.1.1-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for excergic_token-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d68b9398ee6d5a1527a5c7c08d4cfa4f1417c4c33d0e7c3c62bd659e648e5155
MD5 aa375866e81684d3a46ddae8dc2f24d8
BLAKE2b-256 67d3bbe1f4010ce59f567d72ffa304b6abfbe47c240b46f701d5c290b896c90c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: excergic_token-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.7 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-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 edc9ab03b63bf2e0bcd447f6ca2d343ea213c36e44ed344df2aef2990675a4c1
MD5 1e485172e8a2f748f7c40c2642b88b93
BLAKE2b-256 0ff685d25b39659013045dead62f3f8332c01b2c73251e83d8330c200937b460

See more details on using hashes here.

Provenance

The following attestation bundles were made for excergic_token-0.1.1-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