CLI
The ViteHub CLI loads the local Vite config and collects package-contributed command namespaces.
Commands stay owned by the package that understands the workflow, while vitehub gives agents and developers one predictable entry point.
Install and open help
Install the CLI in the app that uses ViteHub packages. The command reads active Vite plugins, so a missing package integration also means a missing package-owned command.
pnpm add -D @vite-hub/cli
pnpm vitehub --help
Expected help lists available namespaces.
The Agent Package contributes the agent namespace when hubAgent() is active, and the CLI includes the built-in provision namespace.
Usage: vitehub <namespace> <feature> [args...]
Available namespaces:
agent Agent development workflows.
provision Idempotently create missing provider resources.
Commands
| Command | Status | Owner | Use it for |
|---|---|---|---|
vitehub agent eval | Available | Agent Package | Run discovered Agent Evals through ViteHub defaults. |
vitehub provision run | Available | ViteHub CLI plus package Provision Steps | Create missing provider resources idempotently. |
| Package-specific namespaces | Planned per package | Owning package | Add workflows only when the package has a durable development task. |
Run Agent Evals
Use vitehub agent eval when the proof is Agent behavior, not just TypeScript.
The optional path narrows the Agent Eval Target.
pnpm vitehub agent eval
pnpm vitehub agent eval server/agents/support.eval.ts --threshold 0.9
pnpm vitehub agent eval --output .vitehub/evals/support.json --hide-table
Preview provisioning
Use --dry-run before writing Provider resources.
Provision never deletes or mutates existing resources, and non-secret ids are written only when a real run applies actions.
pnpm vitehub provision run --provider cloudflare --dry-run
pnpm vitehub provision run --provider vercel --dry-run
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Unknown ViteHub CLI namespace | The package Vite Integration is not installed or is disabled. | Add the package's hubX() plugin to vite.config.ts. |
Provision requires --provider cloudflare|vercel | The provider flag is missing or misspelled. | Pass a supported provider explicitly. |
| Provision fails before applying actions | Required provider credentials are missing. | Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN, or set VERCEL_TOKEN. |
| Agent eval CLI is disabled | agent.eval or agent.cli disables the Agent Eval Runner. | Re-enable the Agent integration option for local development. |
Next steps
- Use Agent Evals for behavior checks.
- Use Provisioning for provider resource ids.
- Use Config options for package integration switches.