Setup command reference
What it is¶
codeclone setup is a readiness controller that probes your repository for CodeClone installation, configuration, and runtime dependencies. It generates a deterministic plan of recommended actions and applies them when confirmed.
The setup commands do not modify your code. setup apply writes only two files: it merges the [tool.codeclone] section into your pyproject.toml and appends CodeClone cache paths to .gitignore. It does not create a baseline, cache, or audit/intent database — those artifacts are produced later by analysis and controlled-change runs.
When to use it¶
Run codeclone setup to:
- Check readiness before first use: codeclone setup status
- Diagnose issues in detail: codeclone setup doctor
- Preview changes safely: codeclone setup plan then codeclone setup apply --dry-run
- Apply configuration interactively or non-interactively
- Explore options with guided workflow: codeclone setup wizard
Basic workflow¶
graph LR
A["codeclone setup status"] -->|See issue| B["codeclone setup doctor"]
A -->|Ready to configure| C["codeclone setup plan"]
C -->|Review actions| D["codeclone setup apply"]
D -->|Verify result| A
A -->|Prefer guided flow| E["codeclone setup wizard"]
Typical flow:
- Check readiness:
codeclone setup status - Preview recommended actions:
codeclone setup plan - Apply interactively (requires TTY):
codeclone setup apply - Verify:
codeclone setup status
Non-interactive flow (CI/automation):
Key commands¶
| Command | Purpose | Output | Notes |
|---|---|---|---|
status |
Probe readiness across 14 capabilities (4 groups), each scored on installation/configuration/runtime axes | Table of capabilities, readiness states | Default if no command given; read-only |
doctor |
Detailed diagnostics for each capability | Status table + per-capability evidence panels | Verbose; for troubleshooting |
plan |
Compute configuration actions without writing | Actions list with deterministic plan ID | Preview mode; no files changed |
apply |
Execute ready actions from current plan | Applied actions and result status | Requires confirmation (TTY) or --yes |
wizard |
Guided interactive workflow | Menu-driven steps: plan → confirm → apply | Combines plan, confirmation, and apply |
Common flags:
--root PATH— Repository root (default:.)--json— Output as JSON (status, doctor, plan, apply)--dry-run(apply only) — Preview writes without modifying files--yes(apply only) — Skip confirmation prompt (required non-interactively)--plan-id ID(apply only) — Bind apply to a specific plan; refuses if stale
Common mistakes¶
"Apply requires confirmation"
Interactive apply needs a TTY or --yes flag. Provide confirmation:
"Plan is stale"
Repository changed between setup plan and setup apply. Recompute:
Using apply-only flags on other commands
--dry-run, --yes, --plan-id only work with apply. Remove them or use apply:
Missing pyproject.toml
Some actions (e.g., adding audit configuration) require pyproject.toml. Create one:
Next steps¶
- Read the engineering memory documentation to understand memory initialization
- Use
codeclone setup --helpfor all available flags - Run
codeclone setup doctorto diagnose any configuration issues - After setup completes, run
codeclone . --update-baselineto generate your baseline