Skip to content

Workflows and CI

repoctl commands have two audiences: humans using short daily commands, and automation consuming stable reports.

Local Daily Workflow

bash
pnpm install
pnpm run repo:doctor
pnpm run repo:new -- sdk --template tsdown
pnpm run repo:check
pnpm build
StepWhat It Proves
pnpm installWorkspace dependencies and local links are ready
pnpm run repo:doctorRoot files, Node, scripts, config, and hooks are usable
pnpm run repo:newNew packages follow template conventions
pnpm run repo:checkThe lightweight local verification flow is reproducible
pnpm buildThe workspace build graph has no obvious breakage

Adopt An Existing Repository

bash
pnpm add -D repoctl
pnpm exec repo init --yes
pnpm exec repo doctor --markdown --out reports/doctor.md
pnpm exec repo upgrade --no-overwrite
pnpm exec repo doctor

Start conservatively with --no-overwrite. After reviewing asset drift, decide whether --yes or --overwrite is appropriate.

Fast CI Gate

bash
pnpm install --frozen-lockfile
pnpm exec repo doctor --strict
pnpm exec repo check --full

This is a simple gate for small repositories or early projects. doctor --strict treats warnings as failures.

CI Report Mode

bash
pnpm exec repo doctor --json --out reports/doctor.json
pnpm exec repo check --json --out reports/check-plan.json
pnpm exec repo env support --markdown --redact --out reports/support.md

Use these outputs as CI artifacts:

  • doctor.json for scripts.
  • check-plan.json to explain verification routing.
  • support.md for issues, PRs, and external collaboration.

Hooks

bash
repo verify pre-commit
repo verify staged-typecheck packages/app/src/main.ts
repo verify commit-msg .git/COMMIT_EDITMSG
repo verify pre-push
StageRecommended Behavior
pre-commitFocus on staged files, lint, and workspace typecheck
commit-msgEnforce Conventional Commit messages
pre-pushRun root lint/typecheck and affected build/test/tsd tasks

Non-Interactive Options

ScenarioOption
Accept setup defaultsrepo init --yes
Preserve changed files during upgraderepo upgrade --no-overwrite
Explicitly overwrite standard assetsrepo upgrade --yes or repo upgrade --overwrite
Preview only--dry-run
Output for scripts--json --out <file>
Share a redacted report--markdown --redact --out <file>

Keep Reading