whatisgithub

What is tokencode?

yzfly/tokencode — explained in plain English

Analysis updated 2026-05-18

28GoAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A terminal AI coding agent in Go that can run up to 1,000 parallel attempts on a task and pick the best.

Mindmap

mindmap
  root((TokenCode))
    What it does
      Terminal AI coding agent
      Runs parallel race attempts
      Judges best solution
    Tech stack
      Go
      Anthropic API format
      DeepSeek
    Use cases
      Automate coding tasks
      Race many agents on hard problems
      Roll back edits with checkpoints
    Audience
      Developers
      Vibe coders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Describe a coding task and have the agent edit files, run commands, and search the web to finish it.

USE CASE 2

Run the /race command to spin up many parallel agents and automatically pick the best solution.

USE CASE 3

Switch permission modes between plan, review, auto, and yolo to control how autonomous the agent is.

USE CASE 4

Connect the agent to Feishu, DingTalk, or WeChat so a team can trigger tasks via chat bot.

What is it built with?

GoAnthropic APIDeepSeek

How does it compare?

yzfly/tokencodeaasixh/devgrepkamalyes/go-argus
Stars282727
LanguageGoGoGo
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Works with any Anthropic-API-compatible model, defaults to DeepSeek if no Anthropic account is set up.

So what is it?

TokenCode is a terminal-based AI coding agent written in Go, similar in concept to Claude Code. You describe a programming task in plain text, and the agent reads files, edits code, runs shell commands, and searches the web in a loop until the job is done. It works with any AI model that speaks the Anthropic API format, defaulting to a DeepSeek endpoint so you can use it without an Anthropic account. The standout feature is a command called /race. Instead of running one agent on a problem, /race spins up multiple agents, up to 1,000, each working independently in its own isolated copy of your repository. When they finish, a judging step compares the results, scores them, and picks the best solution. Losers are discarded and their work is cancelled. The idea is that AI token costs keep falling, so throwing many parallel attempts at a hard problem and keeping only the best is more reliable than trusting a single run. You apply the winning result with one command, nothing commits automatically. Permission modes let you control how much the agent can do without asking. Plan mode is read-only. Review mode asks you to approve each action. Auto mode lets a smaller model decide what is safe. Yolo mode runs without interruption. You can switch modes mid-session. The agent also saves file checkpoints before every edit so you can roll back changes with a /rewind command without touching git. For teams, the project supports connecting agents to messaging platforms including Feishu, DingTalk, and WeChat. Each team member pairs their account with a working directory on their own machine. After that, they send a message to a bot and the agent runs a task in their local workspace, replying with the result. No shared server or public IP is needed. The server mode adds a web interface showing token usage stats, a chat panel for single-turn queries, and a team management page. It also exposes an A2A protocol endpoint so other AI agents can discover and call TokenCode as a sub-agent.

Copy-paste prompts

Prompt 1
Explain how the /race command judges and picks the winning solution among parallel agents.
Prompt 2
Help me configure this agent to use a DeepSeek or other Anthropic-format API endpoint.
Prompt 3
Walk me through the difference between plan, review, auto, and yolo permission modes.
Prompt 4
Show me how to roll back an edit using the /rewind checkpoint system.

Frequently asked questions

What is tokencode?

A terminal AI coding agent in Go that can run up to 1,000 parallel attempts on a task and pick the best.

What language is tokencode written in?

Mainly Go. The stack also includes Go, Anthropic API, DeepSeek.

How hard is tokencode to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is tokencode for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.