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 . 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.
●1E 0W in the status bar is a worst-row-wins summary.
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.
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.
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.
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.
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.
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.
- 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.
- 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.
- 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.
- 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 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.