Project memory for coding agents. Save decisions, constraints, and their rationale in a separate Git repository so your agent can use them in future sessions. Keep it local or share it through a private GitHub repository.
Works with Codex, Claude Code, and Pi.
Requires Node.js 22.13+ and Git.
npm install --global @first-tree-ai/context-treeThis installs the CLI and skills for your installed agents. Restart your agent to load the skills.
From your project directory:
context-tree createThis creates a local tree under ~/.context-tree/trees and connects it to your
project. Then ask your agent:
Read the Context Tree before planning this change.
Save our decision to use a single writer, including why we rejected multiple writers.
The agent reads relevant context and commits updates. For GitHub trees, it also pushes changes.
To invoke skills directly, use $context-tree-read in Codex,
/context-tree-read in Claude Code, or /skill:context-tree-read in Pi.
Replace read with write or cleanup to save or tidy context.
Sign in with gh auth login, then publish to a new private GitHub repository:
context-tree publish OWNER/REPOConnect from another project or machine:
context-tree connect OWNER/REPOYou can also connect a local tree by name or path:
context-tree list
context-tree connect my-project-context-tree
context-tree connect --tree-path /absolute/path/to/treeA project can use several trees. Name connections with --as <alias> and select
one with --tree <alias> when writing or publishing.
Ask your agent to run context-tree-cleanup, or schedule regular cleanup:
context-tree cleanup schedule --agent codex --every 2h
context-tree cleanup status
context-tree cleanup removeSchedules support Codex, Claude Code, and Pi on macOS and Linux. The agent CLI must be installed and authenticated, and the machine must be awake.
context-tree resolve # show this project's connections
context-tree disconnect # disconnect the sole tree without deleting it
context-tree install # install skills for a newly added agent
context-tree uninstall # remove Context Tree skills
context-tree --helpIn OpenTag, select a tree in Agent settings → Context Tree.
See the CLI specification for command contracts and integration details.