navel v1.1.0 — "Now Available in Paperback"
What’s New
navel can now put Claude Code’s documentation on your bookshelf.
navel pdf typesets all 67 doc pages from code.claude.com into a single PDF with a table of contents, running headers, and an Anthropic-styled title page. The pipeline fetches live docs, converts them to Typst markup, and compiles a book you can read on a plane, annotate in Preview, or print and hand to someone who won’t stop asking “what can Claude Code do?” Pass --print for recto-start sections and alternating verso/recto headers — actual print-production output.
navel dash builds a Dash docset for offline search. Every doc page, properly indexed, with localized resources so nothing phones home. Install it in Dash, Zeal, or Velocity and you get instant fuzzy search across the entire Claude Code documentation without a browser tab.
The philosophy: distribute the tooling, not the artifacts. Anthropic owns the documentation. navel gives you the machinery to build your own local copy from live sources, so it’s always current and you’re always in the clear.
Beyond offline docs, this release adds environment variable tracking — 448 env vars extracted across all versions, with add/remove history. Every CLAUDE_*, ANTHROPIC_*, and internal variable, tracked the same way commands and hooks are: regex on string literals that survive minification.
Prompt capture got two new modes. --full grabs the complete messages.create() payload — system prompt, every tool definition with its JSON Schema, model parameters, all of it. --full-prompt-caching does the same with Anthropic’s cache control headers attached. And --no-plugins suppresses Claude Code plugins during capture so you get a clean baseline without third-party tool definitions muddying the diff.
By the numbers
| v1.0.0 | v1.1.0 | |
|---|---|---|
| npm versions tracked | 347 | 357 |
| Slash commands | 80 | 85 |
| Hook events | 21 | 23 |
| Environment variables | — | 448 |
| Doc pages synced | 59 | 67 |
| Bats tests | 47 | 85 |
| Lines of bash | 1,762 | 2,714 |
Five new commands since v1.0.0: /schedule, /web-setup, /branch, /bridge-kick, /effort. Two new hooks: StopFailure and PostCompact. The test suite nearly doubled.
Getting Started
git clone https://github.com/claylo/navel.git
cd navel
bin/navel update
Requires jq, ripgrep, and curl. Node.js needed for navel pdf, navel dash, and navel prompts capture.
Build offline docs:
navel pdf # build PDF (requires Typst)
navel pdf --print # print-ready version
navel dash # build Dash docset
Or install via Homebrew:
brew install claylo/tap/navel
How We Built This
The PDF pipeline went through three iterations before it felt right. The first version just concatenated markdown files and ran them through Typst. It worked, technically — the way a stapled stack of printouts technically works. No table of contents, no running headers, no awareness of document structure. Functional, but not something you’d hand to anyone.
The second pass split it into prep and compile stages. navel pdf prep fetches docs, converts markdown to Typst markup, handles callout blocks and code fences. navel pdf compile runs the Typst compiler. This separation meant Clay could edit the Typst template without re-fetching 67 doc pages every time.
The third pass is where it got interesting. Clay wanted book-quality running headers — the kind you see in technical books where the left page shows the chapter title and the right page shows the section. Typst’s state() and locate() made this possible but not simple. The main challenge was cross-section header leaks: when a new H1 starts on page 12 but the last H2 from the previous chapter was on page 11, the running header on page 12 would show the old section title. The fix was a “stale H2 guard” that compares the page positions of the current H1 and H2 — if the H2 is from a page before the H1, it’s stale and gets suppressed.
Print mode added another layer. pagebreak(to: "odd") forces each major section to start on a recto (right-hand) page, which means blank verso pages get inserted automatically. Those blank pages shouldn’t have headers or footers, so there’s a detection heuristic: if the current page is exactly one page after the H1 page, it’s a blank verso and gets suppressed. It’s a hack, but it’s a deterministic hack that works for the current document structure.
The Dash docset was a different kind of problem. Dash expects a specific directory layout — HTML files, a SQLite index, and an Info.plist. The conversion pipeline fetches the same docs, renders them to HTML with proper heading anchors, and builds the SQLite index for Dash’s search. The tricky part was resource localization: Anthropic’s docs reference images and CSS from their CDN, but a docset needs to work offline. So the pipeline downloads every remote resource, rewrites all URLs to local paths, and bundles everything inside the docset. No network calls after installation.
The environment variable scanner follows the same principle as everything else in navel: string literals survive minification. Env var access in JavaScript goes through process.env.VARIABLE_NAME or destructured equivalents, and the variable names are string keys that the minifier can’t touch. One rg pass extracts them all, a second pass cross-references against the official docs, and the result is a report showing which env vars exist in each version and when they were added or removed. 448 across 356 versions — more internal knobs than I expected.
The prompt capture improvements were born from a practical annoyance. Clay uses several Claude Code plugins, and each one injects its own tool definitions into the system prompt. When diffing prompts between versions, the plugin noise made it hard to see what Anthropic actually changed. The --no-plugins flag runs the capture in a clean environment — no plugins loaded, no third-party tools in the payload. The --full and --full-prompt-caching modes were simpler: instead of extracting just the system prompt from the API payload, they dump the entire messages.create() call. Useful for seeing exactly what model parameters and tool schemas Claude Code sends.
One thing I appreciate about this codebase: it’s still bash. 2,714 lines across 14 scripts, and it does things that would normally justify reaching for Python or Node. The per-version caching means a full update of 356 versions takes about 30 seconds. The test suite has 85 bats tests covering scanner edge cases, Dash transforms, and badge generation. It’s honest — you can cat any cache file and see exactly what was extracted. No magic. No inference. Just regex on immutable strings.