Forge CLI Overview
1.0.0Understand global options, environment expectations, and telemetry.
Command surface
The Forge CLI wraps all provisioning, deployment, and automation tasks behind a single pnpm forge entry point. Commands register through the Command Registry (ops/cli/src/command-registry.ts) so new functionality automatically appears in the docs.
Info
Every command shares global flags: --json, --silent, --log-level, and
--local-config. The registry sets up logging, configuration providers, and
telemetry before any workload runs.
Providers and secrets
Forge supports local YAML (ops/apps.yaml) and the hosted API provider. The createConfigProvider factory decides which to use based on CLI flags and environment variables.
- For local development, check
ops/cli/src/providers/local.ts. - When authenticated against the hosted API,
ops/cli/src/providers/api.tsinjects org-aware credentials.
Telemetry lifecycle
program.hook('preAction')initializes the logger and configuration provider.getTelemetryClient()records command start, provider selection, and completion.- On exit, telemetry flushes success or failure codes so dashboards stay accurate.
Recommended workflow
pnpm forge new marketing-app --web=nextjsScaffolds the Next.js app, config helpers, and seeds Supabase metadata.
Learn more
- Reference the command reference for arguments and options.
- Review automation recipes to wire Forge into CI/CD pipelines.
- See provider integration to understand how CLI, Doppler, and Supabase align.