Token — a colorful CLI coding agent with file tools, shell execution, and swappable LLM providers
Project description
Token
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.
- Configure PyPI Trusted Publishing for
excergic-token→ GitHubExcergic/Token - Create a GitHub environment named
pypiin repo settings - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file excergic_token-0.1.3.tar.gz.
File metadata
- Download URL: excergic_token-0.1.3.tar.gz
- Upload date:
- Size: 36.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0007800bb55582f7074107683086a77175ddf768b83aafdf25675e760b47a55
|
|
| MD5 |
3352e80aaeb8758f8a85a9b41318f600
|
|
| BLAKE2b-256 |
ffe177d2bb6f96680c730a23c3fff2b2a05be7ffb19133fa24e1affc5e9c9361
|
Provenance
The following attestation bundles were made for excergic_token-0.1.3.tar.gz:
Publisher:
publish.yml on Excergic/Token
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
excergic_token-0.1.3.tar.gz -
Subject digest:
a0007800bb55582f7074107683086a77175ddf768b83aafdf25675e760b47a55 - Sigstore transparency entry: 2071191635
- Sigstore integration time:
-
Permalink:
Excergic/Token@ebca211b52bd300b04534252d26ad4d7f1426057 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/Excergic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ebca211b52bd300b04534252d26ad4d7f1426057 -
Trigger Event:
release
-
Statement type:
File details
Details for the file excergic_token-0.1.3-py3-none-any.whl.
File metadata
- Download URL: excergic_token-0.1.3-py3-none-any.whl
- Upload date:
- Size: 61.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e062e08afffb737fcd433836e98226cc5cbdc6c1def6c8e3c541f1499a4919e1
|
|
| MD5 |
fc6040cd82a672dce796ad42b3a1cc3f
|
|
| BLAKE2b-256 |
8f9b4b1afa3e3e5755caf88b79e1b5f2eebd7b3527a08bf8756078565845067a
|
Provenance
The following attestation bundles were made for excergic_token-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on Excergic/Token
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
excergic_token-0.1.3-py3-none-any.whl -
Subject digest:
e062e08afffb737fcd433836e98226cc5cbdc6c1def6c8e3c541f1499a4919e1 - Sigstore transparency entry: 2071191649
- Sigstore integration time:
-
Permalink:
Excergic/Token@ebca211b52bd300b04534252d26ad4d7f1426057 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/Excergic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ebca211b52bd300b04534252d26ad4d7f1426057 -
Trigger Event:
release
-
Statement type: