CLI options

Restormel has three CLI entry points. They overlap by design: you can start small with standalone wedge tools, then adopt Keys CLI when you want scaffolding and onboarding.

Rule of thumb — use @restormel/doctor and @restormel/validate as your CI gates; use @restormel/keys-cli when you want Keys-specific scaffolding (init, add, list, estimate).

1) Restormel Doctor (restormel-doctor)

Doctor answers: “Is my local integration setup healthy?” It checks framework detection, config presence, suggested packages, and (optionally) scans your repo for provider/model identifiers.

bash
npx @restormel/doctor

Repo scan and lifecycle warnings (advisory)

To surface which models your codebase appears to use (and whether any are deprecated/sunset), run a repo scan. This does not read or print secret values; it only reports identifiers and file paths.

bash
npx @restormel/doctor --repo

If your repo includes a model registry at registry/models.json, Doctor can map detected models to lifecycle states. See Model registry.

Manifest output (CI-stable)

If you want deterministic results in CI, you can write a manifest file. Commit it to your repo, then compare diffs in PRs.

bash
npx @restormel/doctor --repo --manifest-out restormel.doctor.manifest.json

2) Restormel Validate (restormel-validate)

Validate answers: “Do my provider credentials work right now?” It re-checks keys in your local key store and exits with CI-friendly codes.

bash
npx @restormel/validate

Exit codes

  • 0 — OK
  • 1 — confirmed invalid credential(s)
  • 2 — usage/config error
  • 3 — transient failures only (timeouts, rate limits, 5xx); no confirmed invalid keys

Retries and timeouts

bash
npx @restormel/validate --retries 2 --timeout-ms 8000

3) Restormel Keys CLI (wrapper) (keys …)

The Keys CLI provides onboarding and convenience. It wraps Doctor and Validate so teams can use one CLI surface while still benefiting from the standalone wedge tools.

bash
npx @restormel/keys-cli init\nnpx @restormel/keys-cli add openai\nnpx @restormel/keys-cli doctor --repo\nnpx @restormel/keys-cli validate --format json

Recommended workflows

Local dev

  • After install: npx @restormel/doctor
  • After key rotation: npx @restormel/validate

CI gates

  • On every PR: npx @restormel/doctor
  • On deploy / nightly: npx @restormel/validate

Migrations (OpenRouter / Portkey)

  • Before shifting traffic: npx @restormel/validate (credential health)
  • Before enabling a new model: npx @restormel/doctor --repo (usage inventory + lifecycle risk)