🔍⌘K

Start typing to search docs.

Forge CLI Overview

1.0.0

Understand 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.ts injects org-aware credentials.

Telemetry lifecycle

  1. program.hook('preAction') initializes the logger and configuration provider.
  2. getTelemetryClient() records command start, provider selection, and completion.
  3. On exit, telemetry flushes success or failure codes so dashboards stay accurate.
View
CLI
pnpm forge new marketing-app --web=nextjs

Scaffolds the Next.js app, config helpers, and seeds Supabase metadata.

Learn more