Skip to main content

tokeneff

Provider-keyed, Markdown-configured (tokeneff.md), CLI-first token efficiency and cross-conversation agent coordination for AI coding workflows.

tokeneff solves two everyday problems when coding with LLMs across Antigravity, Claude Code, Codex CLI, Gemini CLI, and Cursor:

  1. Stop burning expensive reasoning tokens on basic work: Route raw log reading, test output triage, and file summaries through your configured small model tier (via local CLI subscriptions first, or API keys if configured) so your high-tier reasoning model only receives concise, high-signal facts.
  2. Coordinate multiple separate conversations on the same project: When two or more independent chats edit the same repository simultaneously, tokeneff maintains an automatic project-level agent log and intent-aware file locks so non-conflicting work can proceed while conflicting edits wait.

Table of Contents

  1. How It Works (Two Modes)
  2. Installation
  3. Computer-Level vs. Project-Level Configuration
  4. Default Configuration (tokeneff.md)
  5. How to Customize Your Configuration
  6. Everyday Usage & CLI Reference
  7. Cross-Conversation Coordination Guide
  8. Monitoring Efficiency & ROI (tokeneff stats)
  9. Per-Tool Integration Details
  10. MCP Tools Reference
  11. Troubleshooting
  12. CI and PyPI releases

How It Works (Two Modes)

tokeneff uses a single human-readable tokeneff.md file to drive two progressive layers:

Layer Setup Required How It Works
Lite Mode (Zero-Install) Drop AGENTS.md + tokeneff.md into your repo (or ~/tokeneff.md). Agents read tokeneff.md directly and follow your provider's small / coding / reasoning model rules using native subagents.
Enforced Mode (Recommended) Install tokeneff (pip install tokeneff or pip install -e .) and run tokeneff init (or tokeneff setup-global). Adds tokeneff run / tokeneff summarize, host-specific lifecycle hooks and an MCP server for supported tools, automatic SQLite file locking (.tokeneff/coordination.db), and efficiency metrics (tokeneff stats).

Installation

Requires Python 3.9+ (zero third-party Python dependencies).

Optional: Let your coding agent install and configure it

Copy this prompt into Codex, Claude Code, Gemini CLI, Cursor, or Antigravity in the project you want to configure. The manual steps below remain available.

Install and set up tokeneff for this project using the official repository:
https://github.com/bolablg/token-eff

Read its current README and follow the project instructions. Identify the coding
host you are running in and select its client ID: codex, claude, gemini, cursor,
or antigravity. If the host or project directory is unclear, ask me first.

Install the current repository version with pipx (or a project virtual environment
if pipx is unavailable) so the latest hook adapters are included. Ensure the
tokeneff executable is available to the host's hook runner.

Run `tokeneff init <project-directory> --clients <client-id>`. Preserve my existing
model configuration, rules, MCP servers, and user hooks; do not use --force.
Use the configured provider/client mapping in tokeneff.md. For Cursor, confirm
which provider I want for model routing if the existing configuration is unclear.
Configure only this project and this host unless I request other clients or
computer-wide setup. If I request global setup, use
`tokeneff setup-global --clients <client-id>` instead.

Verify `tokeneff --version`, `tokeneff doctor`, and
`tokeneff route read_logs --client <client-id>`. Inspect the generated hook and
MCP configuration for this host. Report changed files and any remaining steps
such as restarting the host, reviewing/trusting Codex hooks, or signing in to
the provider CLI. Do not bypass the host's trust or permission controls.

1. Install the tokeneff CLI

pip install tokeneff
# or isolated CLI install with pipx:
pipx install tokeneff

Option B: Install from source (for local development or latest branch)

git clone https://github.com/bolablg/token-eff.git
cd token-eff
pip install -e .

Prefer not to modify system Python? Use pipx install -e . inside the cloned folder, or run directly without installing via PYTHONPATH=src python3 -m tokeneff.

Verify installation:

tokeneff --version
tokeneff doctor

2. Optional: Set up computer-level defaults & global tool integrations

Create ~/.tokeneff/tokeneff.md and install global rules, MCP entries, and hooks across all supported tools (antigravity, claude, codex, gemini, cursor):

# Install ~/.tokeneff/tokeneff.md + global integrations for all tools:
tokeneff setup-global

# Or pick specific providers / tools:
tokeneff setup-global --providers gemini,codex,claude
tokeneff setup-global --clients antigravity,claude,codex
tokeneff setup-global --no-plugins   # only create ~/.tokeneff/tokeneff.md

This safely prepends <!-- tokeneff:start --> ... <!-- tokeneff:end --> into existing global ~/.claude/CLAUDE.md, ~/.codex/AGENTS.md, and ~/.gemini/GEMINI.md without overwriting your existing rules.

3. Set up a project for your coding host

# Native hooks, MCP, and rules for one host (choose its client ID):
tokeneff init . --clients codex
tokeneff init . --clients claude
tokeneff init . --clients gemini
tokeneff init . --clients cursor

# Or configure multiple hosts together:
tokeneff init . --clients codex,claude,gemini,cursor

Hook setup is automatic for the selected clients. --clients selects the host's integration format; --providers selects the model providers included in tokeneff.md. Re-run setup to upgrade tokeneff's hooks while preserving other user hooks. Restart the host after setup; Codex also requires you to review and trust new or changed hooks through /hooks or desktop Settings > Hooks.


Computer-Level vs. Project-Level Configuration

tokeneff resolves configuration in strict precedence order:

  1. Project level (highest priority — checked in order):
    • <project_root>/tokeneff.md (recommended)
    • <project_root>/.tokeneff/tokeneff.md
    • <project_root>/.tokeneff/config.json (legacy JSON support)
  2. Computer / Desktop level:
    • ~/.tokeneff/tokeneff.md (or $TOKENEFF_HOME/tokeneff.md)
    • ~/tokeneff.md
    • ~/.tokeneff/config.json
  3. Built-in defaults (used if neither exists)

Bypass vs. Merge Behavior

  • override_mode: bypass (default): If a project has tokeneff.md, it completely bypasses your computer-level ~/.tokeneff/tokeneff.md. Any omitted setting falls back only to built-in defaults.
  • override_mode: merge: Set - override_mode: merge in a project's tokeneff.md if you want to inherit your computer-level config and only change specific fields (such as adding one custom model or toggling semantic_conflict_check).

Default Configuration (tokeneff.md)

Even before you create a tokeneff.md file, tokeneff ships with built-in defaults covering gemini, codex (OpenAI), and claude (Anthropic) simultaneously, preferring local CLI subscriptions first (cli) with optional HTTP API fallback (api):

Provider Key Protocol (kind) Default Clients small (logs, tests, summaries) coding (implementation) reasoning (architecture, debug)
gemini gemini antigravity, gemini, gemini-cli gemini-3.5-flash-lite → gemini-3.8-flash → flash-lite gemini-4-hydrogen → gemini-3.8-flash → flash gemini-4-carbon → gemini-4-neon → gemini-4-argon → pro
codex openai codex, codex-cli, openai, cursor gpt-6-luna → gpt-6.1-terra → gpt-5.4-mini → gpt-5.4-nano gpt-6.2-sol → gpt-6.1-sol → gpt-6-sol → gpt-5.5 → gpt-5.3-codex gpt-6-astra → gpt-6-pro → gpt-5.5-pro → gpt-5.4-pro
claude anthropic claude, claude-code, anthropic claude-haiku-5-5 → haiku claude-sonnet-5-5 → sonnet claude-opus-5-5 → claude-fable-5-2 → opus

(Optional built-in preset: ollama is also available when requested via --providers ...,ollama.)

When you run tokeneff setup-global or tokeneff init, tokeneff writes this complete default configuration to tokeneff.md in plain Markdown so you can inspect and customize every value without JSON syntax:

# tokeneff Configuration

## Settings
- override_mode: bypass
- default_provider: gemini
- cross_provider_fallback: false
- coordination_enabled: true
- lock_ttl_seconds: 1800
- release_on_stop: true
- semantic_conflict_check: false
- default_lock_mode: shared_intent
- prefer_rtk: true
- min_chars_for_llm: 800
- max_input_chars_to_small_model: 32000
- timeout_seconds: 45

## Task Routing
- read_logs: small
- read_tests: small
- summarize_files: small
- search_codebase: small
- conflict_check: small
- implement_feature: coding
- refactor: coding
- write_tests: coding
- architecture_plan: reasoning
- complex_debug: reasoning
- code_review: reasoning

## Providers

### gemini
- enabled: true
- kind: gemini
- clients: antigravity, gemini, gemini-cli
- backend_priority: cli, api
- cli_command: gemini --model {model} -p {prompt}
- cli_input: arg
- api_base: https://generativelanguage.googleapis.com/v1beta
- api_key_env: GEMINI_API_KEY
- small: gemini-3.5-flash-lite, gemini-3.8-flash, flash-lite
- coding: gemini-4-hydrogen, gemini-3.8-flash, flash
- reasoning: gemini-4-carbon, gemini-4-neon, gemini-4-argon, pro
- small_hint: Delegate log/test reading and file scans to flash_lite (gemini-3.5-flash-lite) or tokeneff_summarize.

### codex
- enabled: true
- kind: openai
- clients: codex, codex-cli, openai, cursor
- backend_priority: cli, api
- cli_command: codex exec -m {model} -
- cli_input: stdin
- api_base: https://api.openai.com/v1
- api_key_env: OPENAI_API_KEY
- small: gpt-6-luna, gpt-6.1-terra, gpt-5.4-mini, gpt-5.4-nano
- coding: gpt-6.2-sol, gpt-6.1-sol, gpt-6-sol, gpt-5.5, gpt-5.3-codex
- reasoning: gpt-6-astra, gpt-6-pro, gpt-5.5-pro, gpt-5.4-pro
- small_hint: Use fast mini/efficient models (gpt-6-luna / gpt-5.4-mini) or tokeneff_summarize for log/test triage.

### claude
- enabled: true
- kind: anthropic
- clients: claude, claude-code, anthropic
- backend_priority: cli, api
- cli_command: claude -p --model {model} --no-session-persistence
- cli_input: stdin
- api_base: https://api.anthropic.com/v1
- api_key_env: ANTHROPIC_API_KEY
- small: claude-haiku-5-5, haiku
- coding: claude-sonnet-5-5, sonnet
- reasoning: claude-opus-5-5, claude-fable-5-2, opus
- small_hint: Delegate log/test reading and exploration to a subagent with model='haiku' or tokeneff_summarize.

Key Concepts

  • Providers as the Entry Point: Every provider listed under ## Providers (### gemini, ### codex, ### claude, optional ### ollama, or custom providers like ### deepseek) is active simultaneously.
    • A request from Antigravity or Gemini CLI uses ### gemini.
    • A request from Codex CLI uses ### codex.
    • A request from Claude Code uses ### claude.
    • Because cross_provider_fallback is false by default, fallback stays inside the provider you are currently using.
  • Ordered Model Fallback Lists: In - small: model_1, model_2, model_3, tokeneff tries model_1 first and automatically falls back to model_2, model_3, etc. if unavailable or rate-limited.
  • CLI Subscription First (backend_priority: cli, api): tokeneff exhausts your small models on the local CLI (gemini, codex, claude, ollama) using your existing subscription before trying API keys. Spawned child CLIs automatically receive TOKENEFF_CHILD=1 so they never re-trigger coordination locks recursively.
  • Zero-LLM Threshold (min_chars_for_llm: 800): Outputs smaller than 800 compressed chars are returned immediately with zero LLM calls.

How to Customize Your Configuration

Start by generating a tokeneff.md file either at your computer level (tokeneff setup-global) or project level (tokeneff init), then edit it in any text editor.

1. Reorder, add, or remove models in a tier

Change the comma-separated list under small:, coding:, or reasoning: inside any ### <provider> section. The first item is always tried first:

### codex
- small: gpt-5.4-mini, gpt-6-luna
- coding: gpt-5.5, gpt-5.3-codex

2. Switch between CLI subscriptions and API keys

  • Prefer local CLI subscription (default): - backend_priority: cli, api
  • Prefer HTTP API keys: - backend_priority: api, cli (and export GEMINI_API_KEY, OPENAI_API_KEY, or ANTHROPIC_API_KEY)
  • CLI-only (never fall back to API) or API-only: - backend_priority: cli or - backend_priority: api
  • Custom CLI binary path or flags: edit cli_command and cli_input (stdin pipes the prompt over stdin; arg substitutes {prompt} into CLI args):
- cli_command: /opt/homebrew/bin/claude -p --model {model} --no-session-persistence
- cli_input: stdin

3. Keep only the providers you use

  • During initialization: tokeneff init --providers gemini or tokeneff setup-global --providers gemini,claude
  • In an existing tokeneff.md: delete any ### <provider> section you don't use, or set - enabled: false under it.

4. Add local Ollama or a custom OpenAI-compatible provider

Include ollama during init (tokeneff init --providers gemini,codex,claude,ollama), or append any new ### <name> subsection under ## Providers:

### ollama
- enabled: true
- kind: ollama
- clients: ollama
- backend_priority: api, cli
- cli_command: ollama run {model}
- cli_input: stdin
- api_base: http://localhost:11434/v1
- api_key_env:
- small: qwen2.5-coder:3b, llama3.2:3b
- coding: qwen2.5-coder:14b
- reasoning: deepseek-r1:32b

### deepseek
- enabled: true
- kind: openai_compat
- clients: deepseek
- backend_priority: api
- api_base: https://api.deepseek.com/v1
- api_key_env: DEEPSEEK_API_KEY
- small: deepseek-chat
- coding: deepseek-chat
- reasoning: deepseek-reasoner, deepseek-chat

5. Inherit global settings and override only specific fields

By default, a project tokeneff.md bypasses ~/.tokeneff/tokeneff.md. If you want a tiny project override that inherits everything else from your computer-level config, set override_mode: merge:

## Settings
- override_mode: merge
- semantic_conflict_check: true

6. Tune compression and cross-conversation coordination

Under ## Settings:

  • min_chars_for_llm: Increase (e.g. 1500) to skip small-model calls on medium outputs; decrease (e.g. 400) to summarize more aggressively.
  • lock_ttl_seconds: Auto-expiry window for abandoned locks (1800 = 30 min).
  • release_on_stop: Set false if you want a conversation to keep holding file locks across user turns until tokeneff coord complete.
  • default_lock_mode: shared_intent (allows concurrent edits in disjoint regions) or exclusive (strict 1-writer lock per file).
  • semantic_conflict_check: Set true to ask the small model whether two active missions on the same file are compatible before blocking.

7. Apply and verify your changes

Whenever you edit tokeneff.md, refresh generated AGENTS.md / CLAUDE.md / plugin docs and verify resolution:

tokeneff sync-docs
tokeneff doctor
tokeneff route read_logs --provider gemini
tokeneff route read_logs --provider codex
tokeneff route read_logs --provider claude

Everyday Usage & CLI Reference

Initialize a project

# Full setup in current directory (creates tokeneff.md, prepends AGENTS.md/CLAUDE.md safely, .tokeneff/.gitignore, and tool adapters):
tokeneff init

# Initialize in a specific folder with only Gemini & Claude enabled:
tokeneff init /path/to/my-project --providers gemini,claude

# Initialize a project that inherits ~/.tokeneff/tokeneff.md instead of creating a project override:
tokeneff init /path/to/my-project --use-global

If you edit tokeneff.md later (for example, adding a new ### deepseek provider), refresh AGENTS.md, CLAUDE.md, and plugin docs with:

tokeneff sync-docs

Inspect effective config & environment

tokeneff doctor          # Shows active scope, tokeneff.md paths, detected CLIs, API keys, and rtk
tokeneff config show     # Prints resolved merged configuration JSON and provenance
tokeneff route read_logs --client claude-code
tokeneff route read_tests --client codex
tokeneff route architecture_plan --provider gemini

Run commands & summarize logs with the small tier

# Run tests, strip noise (using rtk if installed), and summarize via small model:
tokeneff run --provider claude -- pytest -v
tokeneff run --client codex --focus "type errors" -- npm test

# Summarize an existing log file or piped output:
tokeneff summarize --provider gemini --file logs/server.log --focus "500 errors"
cat build.log | tokeneff summarize --provider codex --stdin

Cross-Conversation Coordination Guide

When you open two or more separate conversations in the same project (for example, Antigravity refactoring auth while Claude Code adds billing tests):

  1. Automatic via Hooks (Antigravity, Claude Code & Gemini CLI):

    • SessionStart: Registers the conversation (conversationId / session_id), provider, and initial prompt in .tokeneff/coordination.db, and injects a banner showing active peer conversations and locked files.
    • PreToolUse / BeforeTool (before file edits): Automatically checks .tokeneff/coordination.db.
      • If the file is free → acquires an intent-aware lock and allows the edit.
      • If another active conversation holds a conflicting lock → blocks the edit with the peer's mission and lock details.
    • PostToolUse / AfterTool: Records FILE_EDITED in .tokeneff/agent_log.jsonl and refreshes the heartbeat.
    • Stop / SessionEnd: Releases transient write locks when a turn finishes (release_on_stop: true), preventing idle chats from blocking peers. Dead/crashed sessions expire automatically after lock_ttl_seconds (default 1800s).
  2. Disjoint Region & Intent-Aware Parallelism:

    • In shared_intent mode (default), two conversations can edit the same file concurrently if they declare non-overlapping regions (e.g., L10-40 vs L80-120, or class Auth vs class Billing) or if semantic_conflict_check: true clears their missions as compatible via the small model.
  3. Manual Coordination CLI (useful for Codex CLI or scripting):

# Register a conversation's mission and expected scope:
tokeneff coord register --agent conv-1 --tool codex --provider codex --mission "Update JWT expiry" --scope src/auth.py

# Acquire a lock (or declare a specific region):
tokeneff coord acquire --agent conv-1 --file src/auth.py --region "L10-55" --intent "Extend token TTL"

# Wait for a peer to finish on a locked file:
tokeneff coord wait --agent conv-2 --file src/auth.py --timeout 60

# Inspect active agents, locks, and recent agent log:
tokeneff coord status

# Release locks and mark conversation finished:
tokeneff coord complete --agent conv-1

All coordination events are mirrored to .tokeneff/agent_log.jsonl for easy inspection (tail -n 20 .tokeneff/agent_log.jsonl).

Automatic history cleanup

Coordination storage is persistent so separate processes can share locks safely. It is maintained automatically whenever coordination is used. Completed sessions and their history are kept for one day for troubleshooting; abandoned sessions become inactive after their heartbeat TTL, then follow the same retention window. Live registrations, unexpired locks, and their event history are protected. Activity history and inactive registrations are each capped at 10,000 records, excluding protected work. The JSONL mirror is compacted along with the database. SQLite is the source of truth; the mirror is rebuilt at startup to recover from interrupted writes, and its single staging file is reused and removed.

Efficiency metrics expire after 30 days, with at most 10,000 events in each project or global database. Metrics are pruned when recorded or viewed. Statistics describe retained history, so they are no longer lifetime totals. Coordination statistics also exclude removed sessions and events.

Set these values in ## Settings in tokeneff.md (existing configurations use the defaults):

- log_retention_days: 1
- metrics_retention_days: 30
- max_history_events: 10000

Use log_retention_days: 0 to remove completed/expired sessions and their history immediately. Active work remains protected even with zero retention. Use metrics_retention_days: 0 to retain no efficiency events. max_history_events: 0 retains no inactive history or efficiency events.

tokeneff cleanup           # Apply project retention and compact storage now
tokeneff cleanup --global  # Apply global metrics retention and compact storage

Cleanup runs during normal use, without a background daemon. Unused projects are cleaned on their next use or with the command above. SQLite reuses freed pages; automatic compaction returns space when at least 1 MiB and 25% of database pages are free. Manual cleanup compacts even smaller databases. Database files and SQLite WAL/SHM sidecars are never manually deleted while agents may be using them.


Monitoring Efficiency & ROI (tokeneff stats)

tokeneff records verifiable metrics automatically in .tokeneff/coordination.db (per project) and ~/.tokeneff/metrics.db (global aggregate across projects).

View project stats

tokeneff stats
tokeneff stats --days 7
tokeneff stats --json

View aggregate stats across all projects on your machine

tokeneff stats --global
tokeneff stats --global --days 30

Reset stats

tokeneff stats --reset
tokeneff stats --global --reset

What the metrics mean

Metric How It Is Measured Why It Matters
raw_chars -> returned_chars (reduction_pct) Exact character count before compression/summarization vs. what is returned to the primary model. Proves how much noise (passing tests, stack repetition, ANSI codes) never entered your expensive context window.
est_tokens_saved max(0, round(raw_chars / 4) - round(returned_chars / 4)) Concrete estimate of reasoning-model input tokens saved (~4 chars/token heuristic).
offloaded_to_small_model Number of large runs handled by your small tier (gemini-3.5-flash-lite, gpt-6-luna, claude-haiku-5-5, etc.). Shows work successfully shifted from expensive models to fast/cheap models.
zero_llm_runs Runs below min_chars_for_llm (or deterministic fallback) answered without invoking any LLM. Shows noisy output handled at zero token cost.
fallback_retries Extra attempts needed when a primary model was unavailable/rate-limited. Helps you spot unreliable models in your ordered fallback list.
conflicts_prevented CONFLICT_DETECTED events where a hook or lock stopped two separate conversations from colliding on the same file. Directly measures prevented merge conflicts and overwritten edits.
sessions_by_provider Active/historical conversations grouped by provider/tool. Shows adoption across Antigravity, Claude Code, Codex, etc.

Per-Tool Integration Details

Running tokeneff init and tokeneff setup-global are non-destructive on existing files:

  • If AGENTS.md, CLAUDE.md, or GEMINI.md already exists, tokeneff inserts its <!-- tokeneff:start --> ... <!-- tokeneff:end --> block at the beginning of the file so agents read it first while preserving all existing instructions below. Running tokeneff sync-docs updates only that marked block.
  • Existing settings.json, hooks.json, .mcp.json, .claude.json, .cursor/mcp.json, and config.toml files are merged idempotently without overwriting your existing user hooks, MCP servers, or TOML settings. Invalid JSON is preserved and reported for repair.
Tool Project-Level (tokeneff init) Global-Level (tokeneff setup-global)
Antigravity .agents/plugins/tokeneff/ (plugin, hooks.json, mcp_config.json, SKILL.md) + AGENTS.md ~/.gemini/config/plugins/tokeneff/
Claude Code CLAUDE.md, .mcp.json, .claude/settings.json (SessionStart, PreToolUse, PostToolUse, Stop, SessionEnd) ~/.claude/CLAUDE.md, ~/.claude.json (mcpServers), ~/.claude/settings.json (hooks)
Codex CLI / desktop AGENTS.md, .codex/config.toml ([mcp_servers.tokeneff]), .codex/hooks.json (SessionStart, PreToolUse, PostToolUse, Stop, SessionEnd) ~/.codex/AGENTS.md, ~/.codex/config.toml, ~/.codex/hooks.json
Gemini CLI AGENTS.md, GEMINI.md, .gemini/settings.json (mcpServers + SessionStart, BeforeTool, AfterTool, SessionEnd; hooksConfig.enabled: true) ~/.gemini/GEMINI.md, ~/.gemini/settings.json (mcpServers + hooks)
Cursor .cursor/mcp.json, .cursor/rules/tokeneff.mdc, .cursor/hooks.json (version: 1; sessionStart, preToolUse, postToolUse, stop, sessionEnd) ~/.cursor/mcp.json, ~/.cursor/hooks.json

Native formats follow the Claude Code hook reference, Codex hook reference, Gemini CLI hook reference, and Cursor hook reference. Use a host version that supports the listed events. Codex hooks require its normal trust review; Cursor cloud agents do not run the editor's session lifecycle hooks.

Global Codex setup uses $CODEX_HOME when set, otherwise ~/.codex. Avoid installing both global and project hooks for the same host unless you intend to run both; hosts can combine hooks from both scopes.

Automatic locks cover the matched file edit tools: Claude Edit/Write/MultiEdit, Gemini write_file/replace, Codex apply_patch (including add, delete, and move paths), and Cursor Write/Delete. Arbitrary shell commands and other write-capable tools still require explicit MCP/CLI coordination. Hooks route through the client's configured provider mapping at runtime; Cursor's default mapping is codex and can be changed in tokeneff.md.


MCP Tools Reference

When tokeneff mcp is connected, agents have access to 7 tools:

  • tokeneff_route_resolve: Resolve scope, provider, backend priority, subagent hints, and ordered model list for a task/tier.
  • tokeneff_summarize: Run a command, read a file, or take raw text and summarize via the provider's small tier.
  • tokeneff_coord_register: Register conversation mission and planned files.
  • tokeneff_coord_acquire: Request an intent-aware file lock (shared_intent or exclusive, optional region).
  • tokeneff_coord_release: Release one/all locks or mark the agent completed.
  • tokeneff_coord_status: View active agents, active locks, and recent log entries.
  • tokeneff_stats: Retrieve project or global token-efficiency and coordination metrics.

Troubleshooting

  • tokeneff doctor shows cli=(claude found=False) / codex found=False / gemini found=False: Make sure the CLI binary is on your PATH, or update cli_command in tokeneff.md to the full binary path (e.g., /opt/homebrew/bin/claude -p --model {model} --no-session-persistence). If you prefer API keys instead, set backend_priority: api, cli and export GEMINI_API_KEY / ANTHROPIC_API_KEY / OPENAI_API_KEY.
  • A peer conversation crashed and left a file locked: Wait for lock_ttl_seconds (auto-expires), or run tokeneff coord complete --agent <stuck-agent-id>.
  • Project config isn't taking effect: Run tokeneff doctor in the project directory to see which tokeneff.md (project vs global) was resolved.

CI and PyPI releases

A push to a dev-* branch runs lint and tests. A passing commit merges into staging, where Python 3.9–3.12 run the full suite and Python 3.11 builds the distributions. Passing staging commits merge into main, triggering the PyPI workflow. Pull requests run checks only. If concurrent promotions displace a pending branch, or a configuration fix clears a failure, run the corresponding workflow from its source branch in the Actions tab.

Store a repository-scoped personal access token as the Actions secret PROMOTE_TOKEN. Its owner needs permission to merge directly into both target branches. Grant Contents: Read and write and, for changes to workflow files, Workflows: Read and write. Pushes made with this token trigger downstream workflows. If a branch requires a pull request, complete promotion through its normal review process.

For the first release, register a pending Trusted Publisher for project tokeneff on PyPI. For an existing project, use its Publishing settings. Enter owner bolablg, repository token-eff, workflow filename publish-pypi.yml, and environment pypi. The GitHub Actions publish job uses that environment and obtains a short-lived credential through OIDC. Leave PYPI_API_TOKEN unset.

Bump the version in pyproject.toml for each new release. A push to main publishes the distributions automatically. You can also dispatch publishing from main or push a tag such as v0.1.0 for a commit already on main. The tag must match the package version. Repeat runs skip files already present on PyPI.

Metadata

Release files for tokeneff 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tokeneff 0.1.2
File Size Uploaded Provenance Actions
tokeneff-0.1.2.tar.gz 82.1 kB With provenance Details for tokeneff-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tokeneff 0.1.2
File Interpreter ABI Platform Actions
tokeneff-0.1.2-py3-none-any.whl Python 3 none any Details for tokeneff-0.1.2-py3-none-any.whl

Total release size: 143.8 kB

Release files / tokeneff-0.1.2.tar.gz

Download URL tokeneff-0.1.2.tar.gz
Size 82.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7df470b25f72a4f4150d172ae1e90ff9f76385b160ba28843edf7fe3ae4157df
BLAKE2b-256 checksum
How to use checksums
d063bd7b94ecccf69a925da93e29092831c1e68b048480397125cc066f146179
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Release files / tokeneff-0.1.2-py3-none-any.whl

Download URL tokeneff-0.1.2-py3-none-any.whl
Size 61.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61a59f50f493eb4c197485b72e8551819c608d6864edf06c1a19abe6239519ec
BLAKE2b-256 checksum
How to use checksums
3c678159bda2dc7ee9cb63ffb5174d4a85b9e9b76bb6e3287fdc7fee224a51bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Security for tokeneff 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tokeneff-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page