A local prompt notebook for humans and AI coding agents
CWD-aware YAML+Markdown files in .promptbook/ shared cleanly between an interactive Charm TUI and a strict --agent CLI.
- > Fix auth race condition @claude
- Add pagination @agy
- Audit rate-limit headers @human
- Reproduce concurrent token refresh deadlock
- Guard session map with RWMutex
- Run go test -race ./auth/...
- 14:02 @claude created prompt
- 14:05 @claude updated — narrowed repro to token refresh
Solo tmux TUI
Browse, edit, and run CWD-scoped Markdown prompts side-by-side in your terminal.
promptbookAgent CLI Isolation
Enforce scoped reads and deterministic JSON/Markdown mutations with --agent=claude.
promptbook --agent=claudeLocal vs. Git-Tracked Storage
Commit shared team workflows in .promptbook/ or keep personal scratch prompts gitignored.
.promptbook/prompts/Install, Agent Skill & Shell Alias
Single Go 1.27 binary with zero database, zero background daemon, and one-command setup for coding agents and your shell.
Install the binary
Install directly with Go 1.27+ or build from source into ./bin/promptbook.
# Go install
go install github.com/gcg/promptbook/cmd/promptbook@latest
# Or build from source
git clone https://github.com/gcg/promptbook.git
cd promptbook && make build
Optional pb shell alias
Checks $PATH and your shell RC file for collisions before writing anything (zsh, bash, or fish).
promptbook alias # adds alias pb='promptbook'
promptbook alias --alias=pbook # custom alias name
promptbook alias --shell=fish # override shell detection
promptbook alias --force # overwrite existing collision
Install the bundled agent SKILL.md
Promptbook embeds a ready-to-use SKILL.md so coding agents know the exact CLI workflow out of the box.
promptbook skill install --target=claude
Installs to ~/.claude/skills/promptbook/SKILL.md — or run promptbook skill print to write to stdout.
| Target | Installed Path |
|---|---|
claude | ~/.claude/skills/promptbook/SKILL.md |
agy | ~/.gemini/config/skills/promptbook/SKILL.md |
gemini | ~/.gemini/skills/promptbook/SKILL.md |
codex | ~/.codex/skills/promptbook/SKILL.md |
cursor | ~/.cursor/skills/promptbook/SKILL.md |
opencode | ~/.config/opencode/skills/promptbook/SKILL.md |
Human TUI Workflow
Run promptbook (or pb) inside any project directory. Built with Charm Bubble Tea and Glamour using your terminal’s native ANSI 0–15 palette.
Responsive tmux splits
Collapses to a single-pane list/viewer below 110 columns for narrow vertical tmux splits beside your agent, and expands to titled rounded split-panes at >= 110 columns (configurable in , settings).
In-app Markdown viewer & editor
Write prompts without leaving the app (never launches $EDITOR). Get live inline Markdown styling as you type, toggle full Glamour preview with Ctrl+P, and autocomplete agent names inline.
Live fsnotify auto-reload
Keep the TUI open next to an active coding agent. Changes written via promptbook add or promptbook done refresh immediately while protecting unsaved edits with a non-destructive notice.
First-run onboarding & clipboard
Launching in a workspace without .promptbook/ opens an onboarding screen to pick CWD vs. Git root and local-only vs. git-tracked mode. Press y to copy any prompt via OS clipboard + OSC 52.
Agent CLI & Strict --agent=<name> Isolation
Agents read only the tasks relevant to them, inspect full Markdown instructions, and mark work done with an audited note.
End-to-end agent workflow
Pass --json to any command for structured machine-readable output.
# Initialize (local-only by default)
promptbook init --git-track
# Add a prompt with priority, agent, and due date
promptbook add \
--title "Fix auth race condition" \
--agent claude \
--priority high \
--due "tomorrow 09:00" \
--body "Reproduce with go test -race ./..."
# Agent checks its queue (claude OR unassigned)
promptbook --agent=claude
# Read, complete with audit note, inspect history
promptbook show <id>
promptbook done <id> --actor=claude \
--note "Added mutex around refresh"
promptbook log <id>
Agent isolation contract
Prompt agent field |
promptbook --agent=claude |
|---|---|
claude (case-insensitive) | Included |
null / empty (unassigned) | Included |
Any other agent (e.g. agy, codex) | Strictly excluded |
CLI reference
Global flags: -C, --dir <path>, --agent <name>, --json, -v, --version.
| Command | Behavior & Key Flags |
|---|---|
promptbook | Launch interactive TUI (or list open prompts with --agent=<name>) |
promptbook init | Initialize .promptbook/ (--git-ignore default, --git-track) |
promptbook add | Create prompt (--title, --body or stdin, --priority, --due, --agent, --actor) |
promptbook list | List prompts (--status=open|done|all, --priority, --due-only, --due-now, --agent) |
promptbook show <id> | Display full prompt metadata and Markdown body |
promptbook done <id> | Mark prompt completed (--actor, --note) |
promptbook reopen <id> | Reopen a completed prompt (--actor, --note) |
promptbook delete <id> | Delete a prompt file |
promptbook log <id> | Show per-prompt activity history |
promptbook skill | print or install --target=agy|claude|codex|cursor|gemini|opencode |
promptbook alias | Install shell alias (--alias default pb, --shell, --force) |
Storage, Discovery & Zero-Touch Root .gitignore
Plain human-readable YAML-frontmatter + Markdown files written atomically via temp file + rename.
Prompt file format
Stored under .promptbook/prompts/20261130-a1b2c3-fix-auth-race.md.
---
id: a1b2c3
title: Fix auth race condition
priority: high
agent: claude
due: 2026-12-01T09:00:00Z
status: open
created_at: 2026-11-30T12:00:00Z
updated_at: 2026-11-30T12:15:00Z
history:
- at: 2026-11-30T12:00:00Z
actor: user
action: created
- at: 2026-11-30T12:15:00Z
actor: claude
action: updated
detail: Narrowed repro to token refresh path
---
Reproduce with `go test -race ./...` and guard token refresh.
Workspace layout
.promptbook/
├── .gitignore # "*" local-only; removed if tracked
├── config.yaml # split_breakpoint, default_sort
└── prompts/
└── 20261130-a1b2c3-fix-auth-race.md
Discovery precedence
PROMPTBOOK_DIR— points directly to a.promptbookstore directory.-C, --dir <path>— starts discovery from<path>instead of CWD.- CWD walk-up — walks upward looking for
.promptbook/, stopping at the Git root (or$HOMEoutside Git).
Git tracking without touching root .gitignore
Promptbook never edits your repository’s root .gitignore or invokes git. Local-only mode writes * inside .promptbook/.gitignore; passing --git-track or toggling in TUI settings (,) removes that inner file so prompts can be committed.
TUI Keybindings
Vim-friendly navigation across the list, Glamour viewer, in-app Markdown editor, and settings.
List & Viewer
| j / k, ↓ / ↑ | Navigate list or scroll viewer & log |
| g / G | Jump to top / bottom of viewer |
| Tab | Switch active pane (split-pane) |
| Enter | Open full-screen scrollable viewer |
| Esc | Back / unfocus preview / clear search |
| n / e | Create new / edit selected prompt |
| Space | Toggle open and done |
| p | Cycle priority inline |
| y | Copy body (OS clipboard + OSC 52) |
| d | Delete prompt (y/n confirm) |
| f / s / / | Filter / sort / live search |
| , / ? / q | Settings / help / quit |
In-App Editor (n / e)
| Tab / Shift+Tab | Move across Title, Priority, Agent, Due, Body |
| ← → / h l / Space | Cycle priority (low / normal / high) |
| ↓ / ↑ / → | Cycle or accept agent autocomplete presets |
| Ctrl+P | Toggle live Glamour Markdown preview |
| Ctrl+S | Save prompt |
| Esc | Cancel and return to list |
Settings (,) & Onboarding
| j / k, Tab | Move between options |
| Space, ← / → | Toggle git mode, location, breakpoint, or sort |
| Enter / Ctrl+S | Save settings / initialize workspace |
| Esc / q | Back (settings) / quit (onboarding) |