Skip to content

Getting started with the CLI

Homebrew (macOS and Linux):

Terminal window
brew install forgecroft/tap/forgecroft

curl (any Unix):

Terminal window
curl -sSfL https://install.forgecroft.com | sh

Both paths install the forgecroft-gate command into a directory on your PATH. Verify:

Terminal window
forgecroft-gate --version

Create an API key in the Forgecroft console under Settings → API keys, then set it as an environment variable:

Terminal window
export FORGECROFT_API_KEY=fc_live_...

The gate reads your key from FORGECROFT_API_KEY. Export it in your shell locally, or store it as a secret named FORGECROFT_API_KEY in continuous integration. There is no interactive login command — the key is the only credential the gate needs. To review your identity and organization, open the account page in the Forgecroft console.

From inside a git repository with staged changes, evaluate the diff against your org’s Controls:

Terminal window
forgecroft-gate

The gate sends the staged diff to Forgecroft, matches your changed paths to the covering Components, applies your Controls, and prints a deterministic verdict — go, conditional_go, no_go, or insufficient_context. It exits 0 unless the verdict is no_go or a finding is a blocker. That is all you need to gate a continuous-integration job. To evaluate an arbitrary range instead of the staged diff:

Terminal window
forgecroft-gate --range main..HEAD

See API-First Quickstart for a curl-equivalent walkthrough of the same evaluation.

  • CI Usage — wire the merge gate and fail continuous integration on a no_go verdict
  • Coding Agents — wire Forgecroft into Claude Code, Codex, or Cursor
  • Command Reference — every flag the gate accepts