Install
- macOS and Linux
- Windows
forge on the command
path. macOS and Linux use /usr/local/bin when writable and otherwise use
~/.local/bin. Run the stable-channel installer again to update to its current
release. forge version verifies the installed version after installation or
an update.
Authenticate
Interactive login uses OAuth device authorization and discovers the organization bound to the resulting token:forge auth login --token "$FORGE_TOKEN". Avoid doing so on ephemeral CI
runners; environment injection keeps the credential out of a persisted profile.
Configuration
Values resolve in this order, from highest to lowest precedence:- Global command flags.
- Environment variables.
- The selected saved profile.
- Built-in defaults.
Only JSON output is currently supported.
--output json is accepted
explicitly and is the default.
Profiles isolate organizations or environments:
Global flags
Global flags must appear before the command group:
Command-local safety flags override neither authorization nor policy. Forge
still validates the actor’s role, token scopes, organization settings, and the
operation contract.
Exit behavior
Successful commands write JSON to stdout. Errors and usage text are written to
stderr. The CLI does not retry API requests automatically; automation should
apply the retry rules described in the API guide.
Guarded execution
Preview a supported write, review the JSON response, then execute with the same reason and idempotency key:CI
Uninstall
--purge only when the local Forge credential store should also be removed.
Commands
Review command syntax, filters, and mutation safeguards.
API
Implement retries and inspect the underlying REST contracts.
MCP
Install governed MCP servers and manage MCP sessions.
Roles
Configure permissions for operators and service accounts.