gitwtfhub

wtf is ccc?

colwill/ccc — explained in plain English

Analysis updated 2026-05-18

25RustAudience · developerComplexity · 3/5Setup · moderate

TL;DR

A Rust command line tool that scans a codebase and builds a compact, always-fresh markdown map of its functions and call graph for AI agents.

Mindmap

mindmap
  root((ccc))
    What it does
      Scans a codebase
      Builds .ccc cache
      Call graph map
    Tech stack
      Rust
      tree-sitter
    Use cases
      Feed agents fresh context
      CI freshness check
      Token stream export
    Audience
      Developers
    Notes
      Auto-refresh workflow
      No license stated

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

Why would anyone build with this?

REASON 1

Generate a compact, always-fresh map of a codebase's functions, constants, and call graph for an AI coding agent to read instead of the whole codebase.

REASON 2

Add a CI check that fails a build when the committed cache is out of date.

REASON 3

Pre-encode the cache into a token stream sized for OpenAI-vocabulary models.

What's in the stack?

Rusttree-sitter

How it stacks up

colwill/cccasync-herald/herald-enginechrichuang218/claude-desktop-zh
Stars252525
LanguageRustRustRust
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperdevelopergeneral

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

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires Rust 1.77 or newer and cargo to build from source, no prebuilt binaries are mentioned.

Not stated in the README.

Wtf does this do

ccc, short for ContextCodeCache, is a command line tool that scans a code project and builds a compact summary of it. That summary lives in a folder called .ccc and lists, for every source file, its constants, its functions along with their return types and short descriptions, which functions call which other functions inside the same file, and any marker comments like TODO or FIXME. The idea is to give an AI coding assistant a cheap, always up to date map of a codebase instead of making it read every file from scratch each time. The tool is written in Rust and needs a fairly recent version of Rust installed to build it. Once built, a person can copy the resulting program onto their command path so it can be run from anywhere. The main commands let someone regenerate the cache for a project, check whether an existing cache is out of date without changing anything, and turn the cache into a separate encoded token stream for models that use an OpenAI style vocabulary. The README is clear that this token stream does not match how Anthropic's Claude models count tokens, so Claude users are told to use the plain markdown cache files instead. Each per file summary is written as a small markdown document listing the file's constants, functions, an internal call graph showing which function calls which, and any marker notes found in the code. The tool currently understands Rust, Python, JavaScript, TypeScript, and Go, using a parsing library called tree-sitter to read the code structure, and it skips files it does not recognize as well as common build and dependency folders. The project also ships an automated workflow that can run on every push to the main branch, check whether the cache has drifted out of date, and automatically open a pull request that refreshes it. This is meant to keep the cache trustworthy for any agent that relies on it, without a person having to remember to regenerate it by hand.

Yoink these prompts

Prompt 1
Run ccc scan on my project and explain what appears in the generated .ccc directory.
Prompt 2
Set up a GitHub Action using ccc check --format json that fails CI when the cache is stale.
Prompt 3
Explain the difference between ccc's token stream output and using the plain .ccc markdown as context for Claude.
Prompt 4
Show me how ccc resolves which function calls which inside a single file.

Frequently asked questions

wtf is ccc?

A Rust command line tool that scans a codebase and builds a compact, always-fresh markdown map of its functions and call graph for AI agents.

What language is ccc written in?

Mainly Rust. The stack also includes Rust, tree-sitter.

What license does ccc use?

Not stated in the README.

How hard is ccc to set up?

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

Who is ccc for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.