$schema field so your editor can provide autocomplete and validation.
Most projects dont need a config file. Fallow works out of the box by auto-detecting entry points and frameworks. Only create one if you need custom entry points, rules, or ignore patterns.
- TypeScript: Detects
tsconfig.jsonand enables TypeScript-aware defaults - Monorepo: Detects workspace configurations (npm, yarn, pnpm) and includes workspace patterns
- Frameworks: Detects installed frameworks (Next.js, Remix, Vite, etc.) and adds appropriate entry point patterns
Options
Agent guide scaffold
fallow init --agents writes a short starter AGENTS.md with project-overview, architecture, command, fallow workflow, and agent-rule prompts, plus a task-to-command matrix that routes common agent intents (deleting unused code, committing, prioritizing refactors, consolidating duplication) to the right fallow command. The matrix is the same one exposed as task_matrix in fallow schema. It refuses to overwrite an existing AGENTS.md, and it is guidance for agents, not a readiness score.
When the project shape is reliably detectable, the scaffold prefills:
- Install from the
packageManagerfield inpackage.json, orpnpm installwhenpnpm-workspace.yamlis present - Test with the detected test framework (Vitest, Jest, or Playwright), but only when exactly one is present
- Typecheck or lint with
tsc --noEmitwhentsconfig.jsonexists - Module boundaries with the workspace patterns for monorepos
packageManager field or pnpm-workspace.yaml proves it. Prefilled command lines carry an HTML provenance comment so you know to confirm them.
fallow agent install writes the same guide together with the skill, the MCP registration, and the commit/push gate for every harness it detects.
Pre-commit hook
Use the hooks namespace to scaffold a git hook that runsfallow audit against the base branch before each commit:
fallow init --hooks remains available as a project-initialization shortcut.
Fallow detects your hook manager and writes to the right location:
- Husky adds to
.husky/pre-commit - Lefthook adds to
lefthook.yml - Bare hooks writes
.git/hooks/pre-commit
- Includes a binary guard (
command -v fallow) so commits still work when fallow isnt installed - Resolves the base ref at commit time:
git merge-base @{upstream} HEADwhen an upstream is set, falling back to the configured branch (ormain) otherwise. Feature branches forked from a non-default integration branch (next-release / hotfix / LTS) compare against the right base, not against their own remote tracking branch - Runs
fallow audit --base "$BASE" --quiet, which combines dead-code, complexity, and duplication analysis - Defaults to
gate=new-only, so inherited findings on touched files do not block the commit; only findings introduced by the changeset fail the gate. Set[audit] gate = "all"infallow.tomlto fail on every finding in changed files - Returns exit code 1 on
verdict: "fail"(default audit semantics); no--fail-on-issuesis needed - Prints
git commit --no-verifyas the bypass option in the success message
Want to gate Claude Code or Codex agent commits as well? Use
fallow hooks install --target agent for the agent enforcement path. The two hooks are complementary: fallow hooks install --target git catches human commits, fallow hooks install --target agent catches agent commits.Custom base branch
By default, the hook compares against the merge-base of the current branchs upstream andHEAD, falling back to main when no upstream is set. Override the fallback with --branch:
Gitignore
fallow init automatically adds .fallow/ to your projects .gitignore. The .fallow/ directory contains machine-local data (parse cache, regression baselines, snapshots) that should not be committed.
- If
.gitignoreexists and already contains.fallow/, nothing changes - If
.gitignoreexists without it, the entry is appended - If
.gitignoredoesnt exist, it is created
Output
By default, creates.fallowrc.json:
--toml, creates fallow.toml.
See also
Configuration overview
Full reference for all configuration options.
Quickstart
Get started with fallow in under a minute.