Complete Guide
Everything you need to know to set up, configure, and master Farmwork in your projects.
Prerequisites
Before installing Farmwork, ensure you have the following tools installed:
Required
| Tool | Version | Installation |
|---|---|---|
| Node.js | 18+ (22 recommended) | nvm install 22 |
| npm | 9+ | Comes with Node.js |
| Claude Code | Latest | npm install -g @anthropic-ai/claude-code |
Claude Code Required
Farmwork is built for Claude Code, but the commands are plain markdown - Codex runs them from ~/.codex/prompts/, and AGENTS.md points any other assistant at the same files. Only subagents are Claude Code-specific.
Installation
Install Farmwork globally via npm:
npm install -g farmwork
Verify the installation:
farmwork --version
You should see the current version number (e.g., 2.0.0).
Initialization
Navigate to your project directory and run the interactive setup wizard:
cd your-project
farmwork init
What Gets Created
The init command creates the complete Farmwork structure:
your-project/
├── CLAUDE.md # Main instructions (lean)
├── AGENTS.md # Generic AI guide
├── .claude/
│ ├── commands/ # 7 slash commands
│ │ ├── audit.md
│ │ ├── inspect.md
│ │ ├── add-idea.md
│ │ ├── new-ideas.md
│ │ ├── compost.md
│ │ ├── plan-idea.md
│ │ └── push.md
│ └── agents/ # 4 specialized agents
│ ├── the-farmer.md
│ ├── code-reviewer.md
│ ├── code-cleaner.md
│ └── idea-gardener.md
├── _AUDIT/ # 3 living audit documents
│ ├── FARMHOUSE.md
│ ├── GARDEN.md
│ └── COMPOST.md
└── _PLANS/ # Implementation plans
Init Options
| Flag | Effect |
|---|---|
-f, --force |
Overwrite existing files |
Existing Projects
Running init on a project that already has Farmwork files will skip existing files unless you use --force. Be careful with force on projects with customized configurations.
Verification
After initialization, verify your setup with the doctor command:
farmwork doctor
The doctor checks:
- Core Files — CLAUDE.md, AGENTS.md present
- Commands — All seven commands installed
- Agents — All 4 agents installed correctly
- Audit System — _AUDIT/ directory and files
- Security — .gitignore includes sensitive paths
Farmwork Doctor
Core Files ✓ All present
Commands ✓ 7/7 installed
Agents ✓ 4/4 installed
Audit System ✓ Healthy
Security ✓ .gitignore updated
All systems healthy!
Check Status
For a quick metrics overview, use status:
farmwork status
First Session
With Farmwork installed, start Claude Code and run your first commands:
claude
Step 1: Open the Farm
Start every session by opening the farm:
> /audit
✓ Running farm audit...
✓ Updating FARMHOUSE.md...
✓ Checking idea garden...
Farm Status:
- Ideas: 0 fresh, 0 wilting
- Health: All systems nominal
Step 2: Start Working
Now you're ready to use Farmwork naturally:
# Capture an idea
> I have an idea for dark mode support
# Create a plan
> make a plan for user authentication
# Implement when ready
> let's implement user authentication
# Push when done
> /push
Daily Workflow
A typical Farmwork development session follows this pattern:
Morning Routine
- Start Claude Code
- Say
/auditto audit systems - Review any wilting ideas in the garden
- Check today's plan in _PLANS/
During Development
- Work through the plan's steps systematically
- Capture new ideas as they arise
- Create plans before implementing features
Before Pushing
- Use /push to run quality gates
- Fix any lint, test, or build failures
- Review the generated commit message
- Confirm the push
Command Reference
CLI Commands
| Command | Description |
|---|---|
farmwork init |
Initialize Farmwork in current directory |
farmwork status |
Display project metrics and health |
farmwork doctor |
Diagnose setup and check for issues |
The Commands
| Command | Action | Writes |
|---|---|---|
/audit |
Refresh metrics, age the Idea Garden | FARMHOUSE.md, GARDEN.md |
/inspect |
Audit + code review + dry-run gates | FARMHOUSE.md only |
/add-idea |
Plant a dated idea | GARDEN.md |
/new-ideas |
Propose 10 ideas, plant the ones you pick | GARDEN.md |
/compost |
Retire an idea with a reason | COMPOST.md, GARDEN.md |
/plan-idea |
Graduate an idea into a plan | _PLANS/, GARDEN.md |
/push |
Clean, gate, commit, push, refresh metrics | git + FARMHOUSE.md |
Only /push touches git. /audit and
/inspect report and update audit documents, but never commit.
Troubleshooting
A Command Doesn't Appear
If a command is missing from the / picker:
- Verify the file exists in
.claude/commands/ - Check the file has valid YAML frontmatter with a
description - Restart Claude Code after making changes
Doctor Reports Missing Files
If doctor reports missing components:
- Run
farmwork initto create missing files - Use
farmwork init --forceto recreate all files
/push Failing
If /push fails at a quality gate:
- Read the error message carefully
- Fix the reported issue (lint, test, or build)
- Run /push again
Getting Help
For issues not covered here, check the GitHub Issues or create a new issue with details about your problem.