Trail-code, formerly graft, is a free MIT-licensed CLI from Trail that adds a context layer to coding agents. It has two parts that run on your machine: the graft map, a tree-sitter index of every file, function and caller, and learnings, which save what you and your team decided as readable files in the repo.
for Developers and teams using Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, Windsurf and other coding agents who want less re-exploration and fewer undone decisions.
use this if you already use Claude Code, Cursor or Codex and want it to find the right code faster and remember what your team decided.
open github.com ↗Features
$ features --list
- ›Graft map: deterministic tree-sitter graph of symbols and callers, no model or network, 23 languages
- ›Learnings saved from conversations as files under .trail/ that teammates share via git
- ›trail check flags changes that undo a teammate's recorded decision before the PR
- ›Warns when an edit overlaps a teammate's open branch
- ›Deepest setup for Claude Code (hooks, statusline); also wires Cursor, Codex, Gemini CLI, Copilot, Windsurf and any MCP agent
- ›One-command setup: npm install -g @trailhq/trail-code && trail init
Pricing
$ pricing --tiers
CLI
Free
MIT open source. Trail's separate company platform has its own paid plans; they are not needed for Trail-code.
Why this rank
$ diff --rank 13
Ranked #13 in coding agents, below the agents that edit code themselves, because it makes Claude Code, Cursor, Codex, and similar tools better rather than replacing them. It earns a place on GitHub adoption and a published SWE-bench comparison, though those results come from the vendor.
Strengths
$ strengths
- ›About 10.4k GitHub stars and 900+ forks since July 2026; v0.23.0 on npm on 2026-10-15.
- ›Vendor benchmark reports 46% fewer tool calls, 60% less time, and 33 vs 27 of 50 SWE-bench Verified issues solved with the map.
- ›Code stays local; the map needs no API key.
Limitations
$ limits
- ›It is an add-on, not an agent: you still need Claude Code, Cursor, Codex or similar.
- ›Benchmarks are run by the vendor.
- ›Sends anonymous usage stats by default (opt out with trail telemetry disable or DO_NOT_TRACK=1).
Sources
$ sources --verified
- overview2026-10-18github.com/trailhq/Trail-Code
- audience2026-10-18github.com/trailhq/Trail-Code
- features2026-10-18github.com/trailhq/Trail-Code
- pricing2026-11-18github.com/trailhq/Trail-Code
- strengths2026-10-18github.com/trailhq/Trail-Code
- limits2026-10-18github.com/trailhq/Trail-Code
- why ranked2026-11-18github.com/trailhq/Trail-Code
$ buildwith alternatives trail-code
- #1 Claude CodePaid
use this if you live in the terminal and want an agent that works across your whole repo.
- #2 OpenAI CodexPaid
use this if you want to hand off tasks to a cloud agent or run one locally via CLI.
- #3 DevinPaid
use this if you want an autonomous engineer that picks up tickets and opens PRs.
- #4 FactoryPaid
use this if you want a paid coding agent, Droid, that can run in the terminal, the IDE, the desktop app, or Slack, with team plans when you need them.
- #5 Grok BuildFreemium
use this if you want a full-screen terminal agent with plan mode, parallel subagents in their own worktrees and a headless mode for CI, included in the X Subscription plans, with Apache-2.0 source you can read.
- #6 OpenCodeFree / OSS
use this if you want an open-source coding agent in the terminal, desktop or IDE that runs on any model, including the Claude, ChatGPT or Copilot plan you already pay for.
- #7 ClineFree / OSS
use this if you want an open-source agent in the editor and the terminal, with plan-then-act approval, and you want to bring any model.
- #8 gooseFree / OSS
use this if you want an Apache-2.0 agent with a desktop app, a CLI and an API that runs on your machine, works with any model, and goes beyond code into research and automation.
- #9 Kilo CodeFreemium
use this if you want one open agent in VS Code, JetBrains, the terminal, and the cloud, and you want to choose the model or bring your own key.
- #10 Qwen CodeFree / OSS
use this if you want an Apache-2.0 coding agent that runs in the terminal, your editor, a desktop app, a browser and chat apps, and can use Qwen, OpenAI, Anthropic, Gemini or local models.
- #11 CrushUsage-based
use this if you want Charm's terminal UI as a coding agent and you will bring Hyper or your own model key.
- #12 AiderFree / OSS
use this if you want an open-source, git-native pair programmer and bring your own model.