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.

$ go install github.com/gcg/promptbook/cmd/promptbook@latest
$ promptbook skill install --target=claude
promptbook — ~/work/api (.promptbook/)
PROMPTS 35%
  • > Fix auth race condition @claude
  • Add pagination @agy
  • Audit rate-limit headers @human
65%
Fix auth race condition @claude open
  1. Reproduce concurrent token refresh deadlock
  2. Guard session map with RWMutex
  3. Run go test -race ./auth/...
Activity Log
  • 14:02 @claude created prompt
  • 14:05 @claude updated — narrowed repro to token refresh

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.

sh
# 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).

sh
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.

sh
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.

Adapts automatically to your terminal or tmux ANSI 0–15 theme — including over SSH.
Promptbook Charm TUI in dark mode showing split-pane open prompts list and rendered Markdown preview with activity log

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.

sh
# 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
promptbookLaunch interactive TUI (or list open prompts with --agent=<name>)
promptbook initInitialize .promptbook/ (--git-ignore default, --git-track)
promptbook addCreate prompt (--title, --body or stdin, --priority, --due, --agent, --actor)
promptbook listList 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 skillprint or install --target=agy|claude|codex|cursor|gemini|opencode
promptbook aliasInstall 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

  1. PROMPTBOOK_DIR — points directly to a .promptbook store directory.
  2. -C, --dir <path> — starts discovery from <path> instead of CWD.
  3. CWD walk-up — walks upward looking for .promptbook/, stopping at the Git root (or $HOME outside 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 / GJump to top / bottom of viewer
TabSwitch active pane (split-pane)
EnterOpen full-screen scrollable viewer
EscBack / unfocus preview / clear search
n / eCreate new / edit selected prompt
SpaceToggle open and done
pCycle priority inline
yCopy body (OS clipboard + OSC 52)
dDelete prompt (y/n confirm)
f / s / /Filter / sort / live search
, / ? / qSettings / help / quit

In-App Editor (n / e)

Tab / Shift+TabMove across Title, Priority, Agent, Due, Body
← → / h l / SpaceCycle priority (low / normal / high)
↓ / ↑ / →Cycle or accept agent autocomplete presets
Ctrl+PToggle live Glamour Markdown preview
Ctrl+SSave prompt
EscCancel and return to list

Settings (,) & Onboarding

j / k, TabMove between options
Space, ← / →Toggle git mode, location, breakpoint, or sort
Enter / Ctrl+SSave settings / initialize workspace
Esc / qBack (settings) / quit (onboarding)