fellowship-cli
v0.4.11
Published
π§ Scaffold your AI development team
Maintainers
Readme
βοΈ Fellowship
Your AI agents remember everything.
Fellowship is a CLI that turns AI coding agents into a team that learns. It orchestrates the full cycle: spec β code β review β learn β improve β so each run makes the next one better.
Works with Claude Code, Codex, and any CLI-based AI coding agent.
Why Fellowship?
AI coding agents are powerful but stateless. Every session starts from zero β they forget past decisions, repeat mistakes, and ignore project conventions.
Fellowship fixes this:
- π§ Persistent memory β Learnings, decisions, and gotchas survive between runs
- π Auto-generated specs β Every task gets a detailed spec before coding starts
- π‘οΈ Built-in code review β Sentinel (AI reviewer) catches bugs before you see the code
- π Notifications β Sounds, desktop alerts, and hooks when runs finish
- π Background runs β Agent works in isolation, you keep coding
- π₯ Team of specialists β Each agent has a role, profile, and memory
- π Full traceability β Every run tracked with cost, duration, tokens, and decisions
Quick Start
# Install globally
npm install -g fellowship-cli
# New project
mkdir my-api && cd my-api && git init
fellowship init
# Existing project
cd my-existing-project
fellowship adopt
# Run a task
fellowship run "add user authentication with JWT"
# Run in background with human review
fellowship run "add rate limiting" --bg --review
# β You keep working β π notification β fellowship reviewHow It Works
You: fellowship run "add search endpoint"
β
βΌ
ββββββββββββββββ
β Spec Engine β β Generates detailed spec from task + learnings + gotchas
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Agent (Code) β β Claude Code writes code in isolated worktree
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β π‘οΈ Sentinel β β AI reviewer checks code against spec
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Human Review β β You: accept, reject, or give feedback
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Learn & Push β β Extracts learnings, pushes branch, creates PR
ββββββββββββββββKey detail: Your working directory never changes. Fellowship creates an isolated git worktree for each run β you stay on your branch the whole time.
Commands
fellowship init
Interactive wizard that sets up Fellowship in a new project. Analyzes your description, generates architecture, creates an AI agent team, and scaffolds the project.
fellowship initWhat it creates:
.fellowship/config.yamlβ Project config (provider, model, settings).fellowship/team.yamlβ Agent definitions (roles, skills, profiles).fellowship/profiles/β Agent profiles with coding guidelines.fellowship/architecture.mdβ Project architecture reference.fellowship/fellowship.dbβ SQLite database (runs, decisions, learnings).gitignoreβ Auto-generated for your stack (Node, Java, Python, etc.)
fellowship adopt
Adds Fellowship to an existing project by analyzing the codebase. Detects stack, framework, patterns, and generates a team tailored to your project.
cd existing-project
fellowship adoptfellowship run <task>
The core command. Generates a spec, assigns an agent, executes the task, reviews the code, and extracts learnings.
# Basic run
fellowship run "add pagination to GET /users"
# With human review (accept/reject/feedback)
fellowship run "refactor auth middleware" --review
# Run in background β free your terminal
fellowship run "add search endpoint" --bg
# Background + human review
fellowship run "add auth" --bg --review
# Preview what would happen (no code changes)
fellowship run "add search endpoint" --dry-run
# Skip AI review
fellowship run "fix typo in README" --no-review
# Use a pre-written spec
fellowship run --spec path/to/spec.mdOptions:
| Flag | Description |
|------|-------------|
| --bg | Run in background β free your terminal, get notified when done |
| --review | Pause for human review after implementation |
| --dry-run | Generate spec and show preview, no code changes |
| --no-review | Skip the Sentinel AI review cycle |
| --no-sanitize | Disable prompt injection sanitization |
| --spec <path> | Use an existing spec instead of generating one |
| --scribe | Force documentation generation after run |
| --no-scribe | Skip documentation generation |
fellowship run --bg
Run in background β your terminal stays free while the agent works.
fellowship run "add user authentication" --bg
# βοΈ Fellowship β running in background
# Task: add user authentication
# PID: 45231
# Log: .fellowship/runs/run-1.log
#
# fellowship log β view agent output
# fellowship log --follow β stream in real time
# fellowship status β check progress
#
# You'll hear a sound when it's done πWhen the run completes: sound + desktop notification + terminal flash. Use fellowship log to check output or fellowship review to accept/reject changes.
fellowship log
View the output log of a background run.
fellowship log # latest run
fellowship log --follow # stream in real time (tail -f)
fellowship log --run 3 # specific run numberfellowship review
Review changes from a background run. Accept or reject with full diff display.
fellowship review
# Shows diff, spec, stats
# [a]ccept [r]eject [d]iff [s]pecfellowship spec <task>
Generate a spec without running it. Useful for reviewing specs before execution.
fellowship spec "add WebSocket support for real-time updates"fellowship status
Dashboard showing your team, recent runs, costs, and project stats.
fellowship statusβοΈ Fellowship v0.4.2 β my-api
Provider: anthropic (claude-sonnet-4-6)
π₯ Team (4 agents)
βοΈ Carlos β Backend development
ποΈ Atlas β Database design and management
π― MerlΓn β Project coordination
π‘οΈ Sentinel β Code reviewer
π Recent Runs
# Task Agent Status Duration Cost
3 add rate limiting Carlos β
done 2m 15s $0.31
2 add CORS config Carlos β
done 1m 54s $0.24
1 scaffold project Carlos β
done 2m 50s $0.67
π Summary
Runs: 3 total (3 completed, 0 failed)
Tokens: 892,411 (~$0.82)
Learnings: 5 bullets (distilled)
Decisions: 8 in DBfellowship learn <lesson>
Manually add a learning to the project memory.
fellowship learn "Always use parameterized queries β never string interpolation for SQL"fellowship search <query>
Search learnings and gotchas using FTS5 full-text search.
fellowship search "authentication"fellowship doctor
Check your setup for issues. Verifies Node, Git, agent CLI, API key, config, team, Sentinel, learnings, and more. Zero LLM calls.
fellowship doctorβοΈ Fellowship Doctor
β
Node.js v25.6.1 (>= 18)
β
Git 2.47.0
β
Agent CLI (claude)
β
.fellowship/ directory
β
config.yaml (anthropic / claude-sonnet-4-6)
β
team.yaml (4 agents)
β
API key (configured for anthropic)
β
Sentinel reviewer (profile present)
β
fellowship.db
β
.gitignore (covers fellowship.db)
β οΈ Learnings (none yet β run some tasks first)
β οΈ Gotchas (none yet)
β
architecture.md
All checks passed (11 β
, 2 β οΈ, 0 β)fellowship sanitize
Scan .fellowship/ files for prompt injection attempts.
fellowship sanitizefellowship scribe
Generate or update project documentation (README, API docs, changelog).
fellowship scribe --readme
fellowship scribe --api
fellowship scribe --allfellowship memory
Interactive TUI with four views: Dashboard, Runs, Memory, and Diff.
fellowship memory # Opens on dashboard
fellowship mem # Alias
fellowship memory --view runs # Jump to runs table
fellowship memory --view memory --section gotchas # Gotchas tab
fellowship memory --view diff # Side-by-side diff
fellowship memory --view diff --diff main # Diff against main
fellowship memory --search "database" # Pre-filter memory entriesViews:
- π Dashboard β stats overview: total runs, tokens, cost, team, last run
- π Runs β full run history table with agent, status, review, tokens, cost, duration
- π§ Memory β browse learnings, gotchas, decisions, reviews (4 sub-tabs)
- π Diff β side-by-side diff view with add/remove coloring
Navigation: 1-4 jump to view, Tab cycle views, ββ/jk navigate, h/l switch memory tabs, Enter expand, / search, u/d page scroll (diff), q quit.
fellowship connect
Configure your AI provider credentials (stored securely in macOS Keychain / system credential store).
fellowship connectfellowship hire
Add a new agent to your team through an AI conversation.
fellowship hireConfiguration
.fellowship/config.yaml
name: my-api
created: '2026-03-11'
ai:
provider: anthropic
model: claude-sonnet-4-6
envVar: ANTHROPIC_API_KEY
# Code review settings
review:
enabled: true # Enable/disable Sentinel (default: true)
model: claude-haiku-4-5-20251001 # Cheaper model for reviews
strictness: balanced # strict | balanced | lenient
maxCycles: 2 # Max review-fix cycles
# Notifications & hooks
hooks:
onComplete:
- { sound: done }
- { notify: desktop }
onError:
- { sound: error }
- { notify: desktop }
onReview:
- { sound: review }
- { notify: desktop }
sounds: true # disable with false
desktop: true # disable with false
# Documentation generation
scribe:
enabled: false
autoRun: false
model: claude-haiku-4-5-20251001
outputs: [changelog, readme]
# Learnings search
search:
maxResults: 10
minScore: 1.0
autoIndex: true
# Security
security:
sanitize: true
strictMode: false
logInjections: trueThe Memory System
Fellowship maintains a persistent memory that grows with every run:
| File | Purpose | Updated |
|------|---------|---------|
| learnings.md | Raw lessons from each run | After every run |
| learnings-distilled.md | Consolidated top learnings (max 30) | After every run |
| gotchas.md | Technical pitfalls and warnings | After every run |
| architecture.md | Project architecture reference | On init/adopt |
| fellowship.db | Runs, decisions, tasks, events (SQLite + FTS5) | Continuously |
How memory improves runs:
- Before generating a spec, Fellowship searches learnings via FTS5
- Relevant learnings + all gotchas are injected as context
- The spec includes a
## Context Consideredsection showing exactly what was used - After each run, new learnings are extracted and distilled
Skills System
Fellowship ships with built-in skills and supports project-level overrides:
fellowship/skills/ β Built-in (shipped with CLI)
code-review.md β Sentinel's review guidelines
.fellowship/skills/ β Project overrides (optional)
code-review.md β Your custom review guidelinesProject skills override built-in skills with the same name. Profiles reference skills with {{skill:name}}.
π Notifications
Fellowship notifies you when runs complete β zero config required.
Built-in (automatic on all platforms):
| Platform | Sounds | Desktop Notifications |
|----------|--------|-----------------------|
| macOS | afplay (Glass, Basso, Ping) | osascript (native alerts) |
| Linux | paplay / aplay (freedesktop sounds) | notify-send |
| Windows | PowerShell SoundPlayer (tada, critical stop) | PowerShell toast notifications (Win10/11) |
Plus: terminal flash β colored bar on completion (green β / red β / yellow π« / blue π).
Configurable hooks in config.yaml:
hooks:
onComplete:
- { sound: done }
- { notify: desktop }
- { notify: telegram }
- "echo '$FELLOWSHIP_TASK completed' >> ~/fellowship.log"
onError:
- { sound: error }
- { notify: desktop }
onReview:
- { sound: review }
- { notify: desktop }
sounds: true # disable with false
desktop: true # disable with false
telegramBotToken: "..." # or env FELLOWSHIP_TELEGRAM_BOT_TOKEN
telegramChatId: "..." # or env FELLOWSHIP_TELEGRAM_CHAT_IDEnvironment variables available in shell hooks:
| Variable | Example |
|----------|---------|
| FELLOWSHIP_TASK | "add user authentication" |
| FELLOWSHIP_AGENT | "Carlos" |
| FELLOWSHIP_STATUS | completed / failed / rejected |
| FELLOWSHIP_BRANCH | feat/add-user-auth |
| FELLOWSHIP_DURATION | 145 (seconds) |
| FELLOWSHIP_TOKENS | 31000 |
| FELLOWSHIP_COST | 0.47 |
| FELLOWSHIP_PR_URL | https://github.com/.../pull/5 |
Supported notification providers:
- Desktop β native OS notifications (zero config)
- Telegram β set bot token + chat ID in config or env vars
- Slack β set webhook URL in
FELLOWSHIP_SLACK_WEBHOOKenv var - Custom β any shell command with env vars
π‘οΈ Sentinel β The Built-in Reviewer
Every project gets Sentinel, a dedicated AI code reviewer. Unlike using another coding agent as reviewer, Sentinel has a specialized profile focused on:
- Verifying acceptance criteria from the spec
- Catching bugs and missing edge cases
- Checking architecture compliance
- Not nitpicking style or suggesting rewrites
Sentinel reviews every run automatically. Configure via review: in config.yaml.
Security
Fellowship includes prompt injection protection:
- 30+ detection patterns β XML tags, ChatML tokens, role markers, identity overrides, authority markers
- Sanitization on every run β Learnings, gotchas, and architecture scanned before injection
fellowship sanitizeβ Manual scan with severity levels- Dry-run reports β
--dry-runshows sanitization results before committing to a run - strictMode β Optional throw-on-detection for zero-tolerance environments
Supported Providers
| Provider | Agent CLI | Model | |----------|-----------|-------| | Anthropic | Claude Code | claude-sonnet-4-6, claude-opus-4-6 | | OpenAI | Codex | gpt-4o, o3-mini |
Platform Support
| Feature | macOS | Linux | Windows | |---------|-------|-------|---------| | Core CLI | β | β | β | | Sounds | β afplay | β paplay/aplay | β PowerShell | | Desktop notifications | β osascript | β notify-send | β PowerShell toast | | Terminal flash | β | β | β | | Keychain credentials | β macOS Keychain | β libsecret | β Windows Credential Store | | Background runs | β | β | β |
Requirements
- Node.js >= 18
- Git
- A supported AI coding agent CLI installed (
claudeorcodex)
License
MIT
Built with βοΈ by MiniGalaxyMage
