Forge
Reference

CLI

Forge CLI reference

CLI Reference

The Forge CLI provides commands for managing your repository.

Installation

The CLI is available as @bjb-forge/cli and can be run with:

npx @bjb-forge/cli <command>

Or if installed globally, use the forge binary directly.

Commands

conform

Scan and execute all conformance rules. Validates your repository against Forge and Codeak standards.

forge conform

Options:

  • --fix - Call the fix generator of conformance rules
  • --rules <pattern> - Pattern to filter rules (default: ** for all rules)
  • --outputPath <path> - Path to write the report in JSON format
  • --verbose - Enable verbose output
  • --dry-run - Run without side effects

release

Execute the unified release workflow across all projects with automatic versioning and publishing.

forge release

Options:

  • --groups <string> - Filter groups to release, separated by comma
  • --preid <string> - Prerelease identifier to apply (e.g., alpha, beta)
  • --specifier <string> - Exact version (e.g., 1.0.0) or semver keyword (e.g., minor)
  • --verbose - Enable verbose output
  • --dry-run - Run without side effects

upgrade

Upgrade Forge repository by updating plugins and running migrations.

forge upgrade

Options:

  • --verbose - Enable verbose output
  • --dry-run - Run without side effects

report-code-coverage

Translate code coverage reports into Cobertura format and merge to a single file.

forge report-code-coverage

Aliases: cobertura, coverage, cvg

Options:

  • --verbose - Enable verbose output
  • --dry-run - Run without side effects

Nx Commands

Forge extends Nx with additional capabilities. Common Nx commands:

run

Run a target on a project:

nx run <project>:<target>

affected

Run targets on affected projects:

nx affected -t <target>

run-many

Run targets on multiple projects:

nx run-many -t <target>

graph

Visualize the project graph:

nx graph

On this page