| name | codeprobe-bootstrap |
| description | Bootstrap the full codeprobe developer experience for a repository, producing `.codeprobe.toml`, `lefthook.yml`, CI workflows, `.claude/plugins/codeprobe/`, GitNexus graph, and a merged `CLAUDE.md` section. Use when the user asks to 'bootstrap a project', 'set up codeprobe', or 'install the codeprobe plugin'. DO NOT use when the repository is already bootstrapped and the drift check passes — use the individual stage commands (`codeprobe init`, `codeprobe ci-init`) for targeted regeneration instead. DO NOT use for interpretation of existing scan results — use codeprobe-interpret. |
Codeprobe Bootstrap
Set up the complete developer experience for a repository in one command:
scanner config, git hooks, CI/CD workflows, Claude Code plugin, GitNexus
integration, and CLAUDE.md generation.
Quick Start
Run the full bootstrap pipeline:
uv run codeprobe bootstrap .
This executes six stages in order:
- config — Generate
.codeprobe.toml from auto-detected languages, frameworks, and IaC
- hooks — Generate
lefthook.yml with scanner-appropriate pre-commit and pre-push hooks
- ci — Generate GitHub Actions and/or GitLab CI workflow templates
- plugin — Install Claude Code plugin (skills, commands, agents, review hooks)
- gitnexus — Run
npx gitnexus analyze for code intelligence graph
- claude-md — Generate
CLAUDE.md with project-specific instructions
Stage Selection
Run specific stages only:
uv run codeprobe bootstrap . --only hooks,plugin
Skip specific stages:
uv run codeprobe bootstrap . --skip gitnexus
Force overwrite existing files:
uv run codeprobe bootstrap . --force
Select CI provider:
uv run codeprobe bootstrap . --ci-provider github
What Each Stage Produces
Config Stage
Generates .codeprobe.toml based on codeprobe detect results. Selects
scanners matching the detected languages and IaC types. Existing files
are skipped unless --force is used.
Hooks Stage
Generates lefthook.yml dynamically composed from the scanner catalog.
Each scanner declares its own hook commands. The generated hooks match
the detection results:
- Python projects: ruff check+format (pre-commit), ty typecheck, betterleaks, semgrep, bandit (pre-push)
- TypeScript projects: biome check+format (pre-commit), tsc typecheck, betterleaks (pre-push)
- IaC projects: hadolint (pre-commit), checkov, tflint, trivy (pre-push)
- All projects: betterleaks secrets scanning
Commitizen commit-msg validation is added automatically when
[tool.commitizen] is detected in pyproject.toml.
CI Stage
Generates workflow templates with three cadences:
- Nightly full analysis
- On-merge incremental index
- PR verdict (fast change analysis)
Plugin Stage
Installs the Claude Code codeprobe plugin into .claude/plugins/codeprobe/
with three skills (/probe, /configure, /interpret), one agent
(codeprobe-interpreter), and the review-before-commit hook.
The hook blocks git commit unless a codeprobe scan was run in the
current conversation, ensuring code quality is always checked before commit.
GitNexus Stage
Runs npx gitnexus analyze --skip-agents-md to build the code intelligence
graph. Requires Node.js and gitnexus. Gracefully skips if not installed.
CLAUDE.md Stage
Generates a CLAUDE.md section bounded by <!-- codeprobe:start --> /
<!-- codeprobe:end --> markers containing project profile, scanner
reference, hook summary, and GitNexus instructions. Merges into existing
files without destroying other content.
Verification
After bootstrapping, verify the setup:
ls .codeprobe.toml lefthook.yml .claude/plugins/codeprobe/ CLAUDE.md
lefthook run pre-commit
uv run codeprobe scan .
Acceptance
Success = .codeprobe.toml, lefthook.yml, and .claude/plugins/codeprobe/ all exist; CLAUDE.md contains a section bounded by <!-- codeprobe:start --> / <!-- codeprobe:end -->; lefthook run pre-commit exits 0 on a clean tree; and uv run codeprobe scan . produces .codeprobe/scan.sarif with at least one run entry.