# Check Go version (need 1.21+)
go version
# If not installed:
brew install go# Install via pip
pip install claude-code
# Authenticate
claude auth login
# Verify it works
claude --version# Navigate to the project
cd patternforge
# Install dependencies
make deps
# Build the binary
make build
# You should see: ✅ Build complete: bin/patternforge# Run from the project directory
./bin/patternforge
# Or install system-wide
make install
# Then run from anywhere
patternforgeWhen you run PatternForge for the first time:
✨ PatternForge initialized!
✨ Created default pattern: mermaid-map.md
You'll see the pattern selection screen:
╔══════════════════════════════════════════╗
║ 🎨 PatternForge - Select a pattern ║
╠══════════════════════════════════════════╣
║ > 📊 Mermaid Map [1/3] ║
║ Create detailed mind maps ║
║ ║
║ 📝 Summarize ║
║ 💻 Explain Code ║
╚══════════════════════════════════════════╝
- Select pattern: Press
enteron "Mermaid Map" - Paste content:
Modern web development: - Frontend: React, Vue, Svelte - Backend: Node.js, Python, Go - DevOps: Docker, Kubernetes - Process: Press
Ctrl+D - Wait: Spinner shows while Claude processes (~2-5 seconds)
- Results: See your Mermaid diagram with token stats!
- Copy: Press
yto copy to clipboard
- In selection screen: Press
n - Vi opens: Edit the template
# 🎯 My Pattern > What it does ## Prompt Do something with: {{input}} And provide...
- Save: Type
:wqin Vi - See it appear: Your pattern is now in the list!
- Use it: Select and test
- Select a pattern: Navigate with
j/k - Press
m: Vi opens the pattern file - Edit: Change description, emoji, or prompt
- Save:
:wq - Reloaded: Changes appear immediately
# Clean and retry
make clean
rm go.sum
make deps
make build# Check if pip installed correctly
which claude
# Try reinstalling
pip uninstall claude-code
pip install claude-code
# Check PATH
echo $PATH | grep -o '[^:]*bin'# The project uses internal/ directory
# Make sure you're building from project root
pwd # Should end in /patternforge
# Module name must match
head -1 go.mod # Should show: module github.com/Pierre-Malherbe/patternforge# Set your preferred editor
export EDITOR=nano # or vim, vi, code, etc.
# Or install vim
brew install vimBefore considering it "working":
-
make buildcompletes without errors -
./bin/patternforgelaunches the TUI - Can navigate patterns with
j/k - Can select pattern with
enter - Can input text and process with
Ctrl+D - See results with token stats
- Can copy with
y - Can create new pattern with
n - Can modify pattern with
m - Can quit with
q
Expected Performance:
- Startup: Instant (<100ms)
- Pattern loading: Instant (even with 100+ patterns)
- Claude processing: 2-10 seconds depending on complexity
- UI responsiveness: Buttery smooth (60fps)
Token Estimation:
- Input/output tokens are estimated (1 token ≈ 4 chars)
- Actual tokens may vary slightly
- Duration is real execution time
Once everything works:
- Create patterns for your common tasks
- Organize patterns in categories (use prefixes)
- Share your best patterns with the team
- Backup your patterns/ directory (git recommended)
- Customize styles in
internal/ui/styles/styles.go
For rapid iteration during development:
# Run without building
make run
# Watch for changes (requires entr)
ls **/*.go | entr -r make run
# Build for macOS (both architectures)
make build-macosIf stuck:
- Check README.md for detailed docs
- Review pattern examples in
patterns/ - Check Go logs:
go build -v ./... - Verify Claude Code:
claude ask "test"
Happy pattern crafting! 🎨