Forgecroft Docs
CLI

Getting started with the CLI

Install the Forgecroft CLI, log in, and trigger your first plan in under two minutes.

Install

Homebrew (macOS and Linux):

brew install forgecroft/tap/forgecroft

curl (any Unix):

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

Both paths drop forgecroft into a directory on your PATH. Verify:

forgecroft --version

Log in

The simplest flow is browser-based OAuth — no key to copy, no environment variables to set:

forgecroft login

This opens your browser, completes OAuth (GitHub by default, or forgecroft login google), and stores a scoped API key in ~/.forgecroft/config.json.

If you are on a machine without a browser (CI, remote server, container), set credentials directly:

export FORGECROFT_API_URL=https://api.forgecroft.com
export FORGECROFT_API_KEY=fc_live_...

Environment variables always override ~/.forgecroft/config.json, which is helpful when you want ephemeral CI credentials.

Verify your identity

forgecroft whoami

You should see your org, role, and the verb scopes attached to the key you are using. If this command fails, stop and fix authentication before going further — every other command depends on it.

Trigger your first plan

If you already have a workspace, grab its ID from the console or from forgecroft workspaces list, then:

forgecroft runs plan <workspace-id>

The CLI triggers a plan, streams logs until the run reaches a terminal state, and exits 0 on success or 1 on failure. That is all you need to gate a CI job.

If you do not have a workspace yet, run the interactive onboarder:

forgecroft onboard

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

Next steps