An open-source project by Truffle

nook. A terminal-native AI IDE.

Cursor's AI wedges, Helix's picker, aider's git ergonomics, gopls diagnostics, all rendered in a terminal. Single Go binary. Runs anywhere a shell runs, including SSH, tmux, and inside containers.

v0.17.0 Markdown preview pane. Alt+V toggles a right-column preview of the active .md / .markdown buffer, rendered with the active theme's tokens. Read-only — editing still happens in the editor — and refreshes on every save. Non-markdown buffers show a status hint instead of opening, so the keystroke never silently fails. Shares the right column with git, terminal, and composer the same way they share with each other.

npm install -g @anthropic-ai/claude-code
claude /login
go install github.com/truffle-dev/glyph/cmd/nook@latest
export PATH="$(go env GOPATH)/bin:$PATH"   # one-time, if go bin isn't on PATH
nook .

nook drives its AI wedges by spawning the claude CLI you already have. No separate API key to manage, no direct HTTP to api.anthropic.com.

nook · first run
A terminal screen recording: run nook on a project and land on a centered welcome card with the wordmark, project name, file count, green dots next to claude CLI ready and gopls available, and a quick-start key list. Press question mark to open the full keymap overlay. Ctrl+P opens the file picker, type to filter, Enter to open, edit, Ctrl+S to save.
First run. Open nook . on any project and land on a welcome card that names what's wired (claude CLI / gopls), what isn't, and the keys that get you moving. ? opens the full keymap overlay; Ctrl+P drops you in the editor.
nook · lsp diagnostics
A terminal screen recording: open a Go file with an undeclared name, gopls runs under the project root, a red bullet appears in the gutter on the broken line, and the status bar reads bullet 1E 0W.
Live gopls diagnostics. The red bullet in the gutter is published the instant the file changes; the ●1E 0W in the status bar is a worst-row-wins summary.
nook · ghost text
A terminal screen recording: open the picker with Ctrl+P, find a Go file, type a prefix in the editor, idle for 400ms, dim ghost text appears after the cursor, Tab merges it into the line.
Ghost text. The clip uses NOOK_GHOST_DEMO so the recording costs no tokens; the real wedge calls Haiku via the claude CLI on the same trigger.

The wedges

Four keybindings, four jobs to do.

Each wedge is pinned to the model that matches the job's latency budget. Haiku for inline, Sonnet for multi-file, gopls for diagnostics.

Ctrl+K Haiku 4.5

Inline edit

Cursor's signature wedge. Highlight a line, hit Ctrl+K, type an instruction. Haiku streams a one-line replacement; Enter accepts, r retries.

Stop sequences fence the apply step so the replacement is exactly one line. Preview is a floating overlay, the replace operation goes through the editor's SetLine with indent recovery.

Ctrl+L Sonnet 4.6

Composer

Right-pane multi-file editor. Describe the change in plain English; Sonnet returns a planned diff against the open workspace.

Per-file accept/reject. An incremental parser reparses the stream on every chunk against an === path === fenced block format, so the file list updates as the model is still typing.

Tab Haiku 4.5

Ghost text

Inline autocomplete. Idle past 400ms, Haiku returns a single-line continuation as dim text after the cursor. Tab merges, Esc dismisses.

Stale generations are discarded by tag so a fast typist never sees a suggestion for a prefix they already abandoned. Demo recordings bypass the API entirely with NOOK_GHOST_DEMO.

● gutter gopls

LSP diagnostics

Open a .go file and gopls starts under the project root. Errors render as red ● in the gutter, warnings yellow, info/hints blue.

The status bar shows a worst-row-wins summary like ●1E 0W. Mutating keystrokes fire didChange so the markers stay live as you type. The internal/lsp wrapper is server-agnostic — reuse it for ts-server, pyright, rust-analyzer.

Alt+Y gopls

Inlay hints

Type annotations and parameter names appear as faint italic glyphs woven into the source. Decorative — never changes file bytes. Alt+Y toggles.

Driven by textDocument/inlayHint via raw jsonrpc2 (go.lsp.dev/protocol v0.12.0 doesn't export the type). Initialization passes the seven gopls hint keys so the server actually emits results. Stale responses (typed past the request) are discarded by LSP didChange version.

Why nook

Cursor is electron. Helix has no AI.
nook is the unfilled corner.

  1. 01

    No electron.

    nook is a single Go binary that runs anywhere a terminal runs. Over SSH, in tmux, inside a Docker container. The whole IDE is the size of three Cursor's-electron-blobs.

  2. 02

    No API key to manage.

    nook spawns the user's existing claude CLI in stream-json mode. Whatever auth claude already has (OAuth session or ANTHROPIC_API_KEY) is what nook uses. There is no separate setup.

  3. 03

    Built from glyph primitives.

    Every surface in nook — picker, file tree, diff view, status bar, modal, editor — is a glyph component. Reading nook's source is reading glyph in production.

  4. 04

    Stays useful when AI is off.

    Picker, project search, git pane, embedded terminal, LSP diagnostics all run without claude on PATH. Only the AI wedges go dark — everything else stays alive.

Run it

Three commands. One binary.

Install the claude CLI once, install nook once, point it at any project. The AI wedges share whatever session claude is logged into; the editor, picker, search, git pane, terminal, and LSP all run with or without it.

npm install -g @anthropic-ai/claude-code
claude /login                                # opens browser, one-time OAuth
go install github.com/truffle-dev/glyph/cmd/nook@latest
export PATH="$(go env GOPATH)/bin:$PATH"     # one-time, if go bin isn't on PATH
nook ~/code/project

Don't have a Claude subscription? Set ANTHROPIC_API_KEY in your shell — the claude CLI picks it up automatically and so does nook. Either path works.

go install drops the binary into $(go env GOPATH)/bin, which is usually ~/go/bin. If nook isn't found after install, add that directory to ~/.zshrc (or ~/.bashrc) to make it permanent.

Credits

nook is shaped by Cursor (the wedges), Helix (the picker), aider (the git ergonomics), and Zed (the multibuffer ambition). Built on Bubble Tea + glyph. AI driven by the Claude Code CLI. LSP via go.lsp.dev. Default language server is gopls.

Open source under MIT. The repo lives in glyph at github.com/truffle-dev/glyph/cmd/nook. Spec and research notes under docs/nook.