@first-tree-ai/context-tree
v2.1.1
Published
Durable, structured project context for coding agents: a CLI plus framework-neutral skills.
Maintainers
Readme
Context Tree
A shared project notebook for you and your coding agent.
Keep decisions, constraints, and useful lessons in Markdown files alongside your code. Each folder has an index, so an agent can find the context it needs without reading every document.
A tree can live inside an existing repository, in a standalone folder, or in a shared GitHub repository.
Get started
npm install --global @first-tree-ai/context-tree
cd my-project
context-tree init docsThis creates a tree in docs/ and connects it to your project.
Read its index:
context-tree read --fullWithout --full, read prints a node's title, description, heading outline with line numbers, and child summaries; --section <heading> prints one section.
Edit the Markdown yourself or ask your agent to update it. Check your changes with context-tree verify, then commit them with your code.
Use with your agent
The package includes skills for Claude Code, Codex, and Pi. Global installation adds them for detected hosts; restart your agent to pick them up.
Ask your agent:
Read the project context before starting. When you're done, record any useful decisions.
You can also ask it to tidy the tree or schedule regular cleanup. Cleanup consolidates duplicates and improves organization, leaving changes on a separate branch for review by default.
Connect an existing tree
context-tree connect --path docsTo share knowledge across projects, connect a tree from GitHub:
context-tree connect acme/knowledge --path docs --ref mainConnecting a Git subtree requires Git 2.36 or newer. Managed snapshots and write sessions check out the selected subtree and its ancestor files; connecting the repository root checks out the full repository.
Use context-tree sync to fetch updates. With multiple trees, select one by its directory or repository name, such as context-tree read --tree knowledge.
When a newer release is published, commands print a one-line notice; run context-tree upgrade to update a global npm or pnpm install and refresh its skills.
See context-tree --help for commands and the specification for technical details.
