Project planning CLI that integrates with Claude Code for AI-assisted development. Track bugs, improvements, and features with markdown-based documentation, then implement them through Claude Code skills.
- Node.js >= 20
- Git
- Claude Code (for skill integration)
git clone https://github.com/mitchmalinin/spellbook.git
cd spellbook
npm install
npm run build
npm linkThis makes the spellbook command available globally. node-pty is an optional dependency for embedded web terminals — if it fails to install (missing build tools), everything else works fine.
cd spellbook
git pull
npm install # only needed if dependencies changed
npm run buildnpm link uses a symlink, so the global spellbook command always points at your local dist/. After pulling and rebuilding, the new code is live immediately.
cd your-project
# Basic init — registers project and creates .spellbook.yaml
spellbook init
# Full init — also creates docs structure, templates, and Claude skills
spellbook init --full
# Log work items
spellbook log bug "Login modal doesn't close on mobile"
spellbook log improvement "Refactor auth middleware" --priority high
spellbook idea "Add dark mode support"
# Check status
spellbook status
# Open the kanban board
spellbook boardRunning spellbook init --full sets up everything in your project:
docs/
├── bugs/ # Bug specs
├── improvements/ # Improvement specs
├── features/ # Feature specs
└── knowledge/
├── architecture/ # Architecture docs
├── decisions/ # ADRs
├── guides/ # How-to guides
├── api/ # API docs
├── research/ # Research notes
├── templates/ # Bug, improvement, feature, ADR, guide templates
└── ROADMAP.md # Auto-generated roadmap
Two skills are generated in .claude/skills/ within your project:
/log — Thin wrapper around the spellbook log CLI. Use it in Claude Code to quickly capture bugs, improvements, or feature ideas without leaving the conversation.
/implement — Full implementation workflow manager. Given a reference like /implement bug-44, it:
- Reads the logged item's markdown spec
- Marks it as in-progress via
spellbook update - Enters plan mode for implementation design
- Implements the changes after approval
- Runs quality checks
- Finalizes via
spellbook finalize
For parallel AI agent workflows, there's a separate worktree manager skill at ~/.claude/skills/worktree-manager/. It manages git worktrees so multiple Claude Code agents can work on different items simultaneously. Configure it at ~/.claude/skills/worktree-manager/config.json:
{
"terminal": "ghostty",
"aiTool": "claude",
"portPool": { "start": 8100, "end": 8199 },
"worktreeBase": "~/tmp/worktrees",
"defaultCopyFiles": [".mcp.json", ".env.local"],
"defaultCopyDirs": [".agents"]
}Supports both Ghostty and iTerm2 terminals, and both Claude Code and Codex as AI tools.
| Command | Description |
|---|---|
spellbook init [--full] |
Initialize project (with optional full setup) |
spellbook log <type> <title> |
Log a bug, improvement, or feature |
spellbook idea <description> |
Quick capture to inbox |
spellbook inbox |
List inbox items |
spellbook spec <inbox-id> |
Convert inbox item to spec |
spellbook ready <ref> |
Mark spec as ready for implementation |
spellbook start <ref> |
Mark item as in-progress |
spellbook update <ref> --status <s> |
Update item status |
spellbook finalize <ref> |
Mark item as resolved/completed |
spellbook pr <ref> |
Mark item as having an open PR |
spellbook status |
Show project status summary |
spellbook roadmap |
Regenerate ROADMAP.md |
spellbook board [-p port] |
Open kanban board web UI |
spellbook doc <path> |
Read a doc file |
spellbook generate |
Generate project docs |
spellbook sync |
Sync docs with database |
spellbook activity |
Show recent activity |
spellbook projects |
List registered projects |
spellbook worktree |
Manage git worktrees |
spellbook migrate |
Migrate docs to central storage |
spellbook rebuild |
Rebuild database from docs |
spellbook board starts a local Express server (default port 3333) with:
- Kanban board for bugs, improvements, features, and inbox items
- Knowledge base browser for project documentation
- Git status and sync tools
- Worktree management UI
- Embedded web terminals (requires
node-pty) - iTerm2 / Ghostty integration for launching AI agents
All frontend assets are bundled locally — no CDN dependencies, works fully offline.
- Database:
~/.spellbook/db.sqlite— central SQLite database for all projects - Item files:
~/.spellbook/projects/<project-id>/— markdown files for bugs, improvements, features - Config:
.spellbook.yamlin each project root - Worktree registry:
~/.claude/worktree-registry.json— tracks active worktrees
build:css— Tailwind CLI compiles CSS fromsrc/web/public/tailwind-input.csstsc— TypeScript compilationcopy-public— Copiessrc/web/public/todist/web/public/
Use npm run dev (tsc --watch) during development.
src/
├── index.ts # CLI entry point
├── commands/ # CLI command handlers
├── db/ # SQLite database layer
├── utils/ # Shared utilities
└── web/
├── server.ts # Express server orchestrator
├── types.ts # Shared TypeScript interfaces
├── terminal-manager.ts # Web terminal management (optional node-pty)
├── helpers/ # Extracted helper functions
│ ├── path.ts # Doc path resolution
│ ├── template.ts # Plan template generation
│ ├── worktree.ts # Worktree management functions
│ └── applescript.ts # AppleScript helpers
├── routes/ # Express route modules
│ ├── projects.ts # Project listing and switching
│ ├── worktrees.ts # Worktree create/delete
│ ├── git.ts # Git operations
│ ├── knowledge.ts # Knowledge base CRUD
│ ├── files.ts # File tree and reading
│ ├── status.ts # Dashboard, workflow state, roadmap
│ ├── items.ts # Bug/improvement/feature CRUD
│ ├── inbox.ts # Inbox and item creation
│ ├── terminals.ts # Embedded web terminals
│ ├── terminal-integration.ts # iTerm2/Ghostty integration
│ ├── config.ts # MCP/env/security config
│ └── uploads.ts # File uploads
└── public/ # Frontend assets
├── index.html
├── app.js
└── vendor/ # Bundled dependencies (Tailwind, marked, xterm)
MIT