No description
  • Nix 52%
  • Shell 48%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-27 04:25:15 +00:00
.forgejo/workflows feat(trail-code): rename from graft and update to 0.24.1 2026-10-23 11:51:06 +02:00
.gitignore flake 2026-09-26 02:16:16 +02:00
flake.lock chore(flake): update flake.lock 2026-10-25 04:25:03 +00:00
flake.nix feat(trail-code): rename from graft and update to 0.24.1 2026-10-23 11:51:06 +02:00
package.nix feat(trail-code): rename from graft and update to 0.24.1 2026-10-23 11:51:06 +02:00
README.md feat(trail-code): 0.25.0 -> 0.26.0 2026-10-27 04:25:15 +00:00
sources.json feat(trail-code): 0.25.0 -> 0.26.0 2026-10-27 04:25:15 +00:00
update.sh feat(trail-code): rename from graft and update to 0.24.1 2026-10-23 11:51:06 +02:00

trail-code 0.26.0

Nix flake packaging trailhq/Trail-Code (formerly Graft), the context layer for coding agents: the graft code map plus the learnings your team's agents save.

nix run github:<you>/graft -- --help        # `trail`; or: nix run . -- --help
nix run github:<you>/graft#graft -- --help  # the old `graft` command
nix build .#trail-code

Outputs: packages.<system>.{trail-code,graft,default}, apps.<system>.{trail,graft,default}, overlays.default (adds pkgs.trail-code and pkgs.graft). graft is an alias of trail-code, and the package installs both commands: upstream ships them as one program under two names (trail and the old graft, which keeps its old command layout).

Updating

.forgejo/workflows/update.yml runs daily (and on demand from the Actions tab): it updates flake.lock, points sources.json at the newest upstream release with update.sh (rewriting the version in this title to match), and pushes to main only if the package still builds and trail --version and graft --version run.

By hand, the same thing is:

nix flake update
nix shell --inputs-from . nixpkgs#curl nixpkgs#git nixpkgs#jq -c ./update.sh
nix build .#trail-code

Notes

  • Version, commit, source hash and npmDepsHash live in sources.json, which update.sh rewrites. Upstream stopped tagging at v0.21.1 and publishes no GitHub releases, so the version is the latest dist-tag of @trailhq/trail-code on npm and the commit is the matching chore(release): X.Y.Z commit (or the vX.Y.Z tag, should tags return). The hashes are the ones nix reports when trail-code.src and trail-code.npmDeps are built with a fake hash.
  • Built from source, so the telemetry key upstream stamps into its npm release is absent and the binary sends no usage stats.
  • The repo's package.json is @nanonets/graft and only declares graft; trail is added as a wrapper around the same dist/bin/trail.js that the @trailhq/trail-code npm package points at.
  • tree-sitter-cli's install script is skipped: it downloads a binary at install time and nothing at runtime uses it.
  • git is put on the wrapped binaries' PATH; trail upgrade / graft upgrade (which shell out to npm i -g) do not apply to a Nix install.