AI SQL assistant that turns plain-English requests into queries, explains and fixes SQL, and can run read-only queries on your own database.

Graft (now Trail-code)
Open source context layer that maps a codebase for coding agents and stores team learnings as Markdown files in git.
What is Graft (now Trail-code)?
Graft is an open source tool that gives AI coding agents a map of your repository and a memory of what your team has already learned. It has been renamed Trail-code by its publisher, Trail, and every graft command still works. Running init parses the repo with tree-sitter into linked Markdown nodes covering files, functions and callers, and this step needs no model, no embeddings and no API key. The second part, learnings, lets the agent save short Markdown notes in a .trail folder when it works something out or you correct it, so teammates pick them up through git and review them in pull requests like code. It is set up mainly for Claude Code and also names Codex, Cursor, Kiro, Gemini CLI, GitHub Copilot and Windsurf. Developers and engineering teams use it to stop re-explaining the same decisions to their agents. The CLI is free under the MIT license, and the vendor reports shorter agent runs and lower token cost in its own benchmark.
Use cases
- Give coding agents a map of a large repo
- Share agent learnings through git
- Review agent-written notes in pull requests
- Cut tokens spent exploring a codebase
- Check new changes against team decisions
- Set up Claude Code with persistent project memory
Who it's for
Why use Graft (now Trail-code)
- Agents start from a map instead of searching the repo cold, which the vendor's benchmark ties to less time and lower token cost.
- Learnings live in the repository, so they are reviewed, versioned and shared like any other change.
- No server or sign-in is needed for the map, hooks, learnings or the check command.
- It works with several agents, so a team mixing Claude Code and Cursor can share the same notes.
- It is free and MIT licensed, which keeps adoption simple.
Graft (now Trail-code) features
- Tree-sitter code map of files, functions and callers
- Map built with no model, embeddings or API key
- Learnings saved as Markdown files in the repo
- Learnings shared through git with no server
- A check command that flags conflicts with earlier learnings
- Setup for Claude Code, Codex, Cursor and Kiro
- Existing graft commands still work after the rename
- Upgrade command that adds the trail command
- Optional deep summaries when an API key is supplied
- Anonymous usage stats that can be turned off
Graft (now Trail-code) integrations
How to get started with Graft (now Trail-code)
- Install the CLI globally with npm, using the Trail-code package or the older Graft package.
- Run init in your repo to build the code map and wire it into Claude Code.
- Restart your agent so the next session loads the map.
- As the agent works, it saves learnings as short Markdown files under .trail.
- Commit those files and let teammates review them in the pull request; their agents pick them up on the next pull.
Graft (now Trail-code) limitations
- A shared team workspace and the Skills and Guardrails learning types are listed as coming soon
- It is built for coding agents working in a repo and does not remember end users across chat sessions
- Anonymous usage stats are sent unless you opt out
- Some pages and package names still say Graft while the product is now called Trail-code
Graft (now Trail-code) pricing
Graft (now Trail-code) is open source, so you can use and self-host it for free.
Prices can change and may vary by country or exclude tax. Check the official pricing page.
Graft (now Trail-code) alternatives
The main Graft (now Trail-code) alternatives listed on Debuly are Zep, Aider, Mem0, Continue, ContextStream and Augment Code. The table compares pricing and platforms; order is A–Z.
| Tool | Pricing | Starting price | Platforms |
|---|---|---|---|
| Graft (now Trail-code) | Open source | — | CLI |
| Aider | Open source | — | CLI, Self-hosted, Web |
| Augment Code | Paid | $20/mo | CLI, Web, API |
| ContextStream | Freemium | $19/mo | Web, CLI, VS Code extension, API |
| Continue | Open source | — | VS Code, JetBrains, CLI |
| Mem0 | Freemium | $19/mo | API, Web, Self-hosted, CLI |
| Zep | Freemium | — | API |
Aider
Open-source AI pair programming tool that runs in your terminal and edits code in your local git repository using the LLM you choose.
Open sourceVisit Aider (official site)
Augment Code
Coding agent platform with a codebase Context Engine, Cosmos cloud agents and the Auggie CLI, priced as flat team plans plus usage.

ContextStream
Shared project memory, code search and agent coordination for AI coding tools, connected through MCP and a browser workspace.

Continue
Open-source AI coding assistant for VS Code and JetBrains with chat, agent, edit and autocomplete modes, now part of Cursor.
Open sourceVisit Continue (official site)Mem0
Memory layer for AI agents and apps, available as an open-source package or a managed platform that keeps user context across sessions.
FreemiumVisit Mem0 (official site)
Zep
Managed memory and context platform for AI agents, built on the Graphiti knowledge graph, with Python, TypeScript and Go SDKs.
FreemiumVisit Zep (official site)
Graft (now Trail-code) FAQ
What is Graft?
Graft is an open source context layer for coding agents. It builds a map of your code and keeps team learnings as Markdown in git. It has been renamed Trail-code, and graft commands still work.
How much does Graft cost?
The CLI is free under the MIT license. The pricing page on trailhq.com covers Trail's separate enterprise rules product, with a Free plan and paid plans at $20k, $60k and $150k per year, which are not prices for Graft or Trail-code.
Is there a free plan for Graft?
The tool itself is free and needs no sign-in or API key for the map, hooks, learnings or check command. A key only adds written summaries from the deep build option.
Is Graft open source?
Yes. It is MIT licensed, and the code is on GitHub under trailhq/Trail-Code, which the old nanonets/graft address redirects to.
Which AI coding agents does Graft work with?
Claude Code gets the deepest setup. The vendor also names Codex, Cursor, Kiro, Gemini CLI, GitHub Copilot, Windsurf and any agent that reads files.
Does Graft collect data?
By default it collects anonymous usage statistics. You can opt out with the telemetry disable command or by setting the DO_NOT_TRACK variable, and CI environments turn collection off automatically.
What are alternatives to Graft?
Alternatives for giving coding agents project context include Zep, Graphiti, Cursor rules, Aider's repo map and Sourcegraph Cody.
Sources & verification
Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.
| Source | Type | Accessed |
|---|---|---|
| trailhq.com/graft | official | |
| github.com/trailhq/Trail-Code | repository | |
| trailhq.com/pricing | pricing | |
| trailhq.com/pages/graft-is-now-trail-code-for-coding-agent-memory | official | |
| trailhq.com/trail-code | official | |
| trailhq.com/pages/llms.txt | official |
Image credits
- Logo: from trailhq.com · fetched · Vendor trademark, used only to identify the product; removed on request
- Cover: none collected yet, so a generated tile is shown.
Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.


