code2skill exposes four CLI commands.
They form one repository-knowledge workflow:
scan: build the full analysis, planning, and generation artifact setestimate: preview impact and cost without writing Skills or stateci: run the automation-oriented workflow that can choose full or incremental executionadapt: publish generated Skill artifacts into target tool instruction files
This workflow model is intentional: the CLI now treats repository analysis, artifact generation, and target adaptation as linked stages of one product surface rather than unrelated commands.
code2skill --help
python -m code2skill --helpEvery command accepts an explicit repo_path.
- Relative
repo_pathvalues are resolved from the current shell location. - Relative
--output-dir,--report-json,--diff-file, and--pricing-filevalues are resolved fromrepo_path. - For
adapt, relative--source-dirvalues are also resolved fromrepo_path.
This means callers can run the CLI from outside the target repository without changing path semantics.
Full generation:
code2skill scan /path/to/repo --llm qwen --model qwen-plus-latestStructure-only scan:
code2skill scan /path/to/repo --structure-onlyCost preview:
code2skill estimate /path/to/repo --pricing-file pricing.jsonIncremental CI run:
code2skill ci /path/to/repo --mode auto --base-ref origin/main --head-ref HEADAdapt generated Skills into Codex format:
code2skill adapt /path/to/repo --target codex- Success returns exit code
0. - User-facing runtime errors return exit code
1and print a concisecode2skill: error: ...message to stderr. Ctrl+Creturns exit code130.
Successful scan, estimate, and ci commands print a compact summary including:
- the command name
- the effective mode
- repository path
- repository type
- selected file counts
- retained character volume
- output directory
- report path when available
- generated artifact paths
adapt prints the repository root, target, source directory, and written files.