CLI
Use the CLI to initialize your harness, add bundles, and verify project health. Start with the quick workflow below, then use the reference section for exact commands and flags.
Quick workflow (first 10 minutes)
Global usage
The commands below assume you already installed the CLI globally. If you did not, prepend commands with npx @harness-kit/cli@beta.
Category mapping (important)
Bundle docs pages are grouped by workflow, stack, and techstack for browsing. CLI list --category uses install-role categories from the registry.
- Docs categories:
workflow,stack,techstack - CLI categories:
git-workflow,workflow-preset,memory,browser,search,scrape,mcp-tool
Command reference
init
Initialize Harness Kit in the current project and run the setup wizard.
Flags: No command-specific flags currently.
add <bundle>
Add a bundle to the current harness and install its artifacts.
Flags:
--role <role>: override default bundle role.-y,--yes: skip re-install confirmation prompt.--interactive-skills: run skills setup interactively (instead of default non-interactive mode).
list
List available bundles, optionally filtered by category or installed state.
Flags:
--category <cat>: filter by category.--installed: show only installed bundles.
status
Audit harness health: bundle drift, required core files, and environment variable readiness.
Flags: No command-specific flags currently.
activate
Run idempotent post-install activations for installed bundles (for example Git hook activation).
Flags: No command-specific flags currently.
budget
Measure context-window token cost of installed harness-managed files.
Flags:
--json: output JSON report.--context-window <tokens>: override context window used for budget math.
Recommended workflow
- Run
initonce to scaffold baseline files and defaults. - Add bundles incrementally with
addso each change set stays reviewable. - Use
statusafter each update to verify expected artifacts are in sync.
Usage tips
- Prefer
npx @harness-kit/cli@betaif you want the newest CLI without global upgrades. - Use
@harness-kit/clithroughnpx, or install globally first if you want to run plainharness-kit <command>. - Keep bundle additions small and commit after each logical setup step.
- If category filters fail, verify you are using CLI category names, not docs grouping names.