CLI reference
This page documents every command supported by the forgebench
CLI. Most users only need forgebench setup, described in
Getting started. Refer to this page for
commands and flags beyond that basic setup.
Getting help
Every command below also supports --help, which lists the same flags
documented here.
forgebench --help
forgebench run --helpTo check the installed version, run forgebench --version.
Setup
Guided, opt-in setup. Run it with no flags for the keyboard-driven flow described in Getting started: choose the ForgeBench URL, sign in, pick tools and a history window, review the local preview, then approve sync and upload.
# Guided setup
forgebench setup
# Ask about automatic sync and the first upload separately
forgebench setup --advanced
# Non-interactive: sign in first, then configure one tool and upload
forgebench login
forgebench setup --tool claude_code --since 30d --install-hooks --sync-now| Flag | Description |
|---|---|
--tool claude_code | Select a tool. Repeat it to select several. Required when setup is not run in an interactive terminal. Accepted values: claude_code, codex, cursor, antigravity, github_copilot, opencode. |
--url https://app.forgebench.ai | The ForgeBench app URL for your environment. The guided flow asks for it on the first screen. |
--since 7d | History to preview and upload once. Accepted values: 3d, 7d (default), 30d, 90d. |
--no-preview | Skip the local preview. |
--sync-now | Upload the selected tools after the preview. Requires a stored login. |
--install-hooks | Enable automatic session-end sync for the selected tools. Antigravity has no session-end hook; use schedule for it. |
--advanced | Choose automatic sync and upload separately instead of the single yes/no prompt. |
--status | Show the selected tools and hook status. |
--uninstall | Remove the session-end hooks and clear the selected tools. |
Run
Parses local session logs, scores them, and optionally submits the result. This is the base command that other commands build on.
# First run: process all historical sessions and submit the result
forgebench run --all --push
# Daily check: local only, nothing submitted
forgebench run --since 24h| Flag | Description |
|---|---|
--all | Process all historical sessions rather than only recent ones. Recommended for the first run. |
--since 7d | Limit processing to sessions started within this window. Accepts values such as 7d, 24h, and 2w. |
--push | Submit the result to Forgebench. Without this flag, the command only writes a local file. |
--tool claude_code | Restrict processing to a single tool. Accepted values: claude_code, codex, cursor, antigravity, github_copilot, opencode. |
--output path.json | File path to write the result to. Defaults to profile.json in the current directory. |
--no-usage | Exclude token counts and collect only the working-style profile. |
--no-repo | Skip reading git history entirely. |
--no-meta | Omit the git branch associated with each session. |
--machine-name office-mac | Label this machine's usage with a name, so an administrator can identify the source. |
--team platform | Tag this machine's usage with a team name. |
--no-ai-analysis | Skip generating the written summary of working style. Reduces run time and incurs no cost. |
--clear-cache | Clear any results that previously failed to submit and are queued for retry. |
--project value | Restrict processing to a single project. Intended for advanced or scripted use; the value is a hash, not a folder name. |
Login / logout
# Sign in through a browser (also available inside setup)
forgebench login
# On a remote machine without browser access, sign in with a key provided by an administrator
forgebench login --key
# Remove the stored key from this machine
forgebench logout| Command | Description |
|---|---|
login | Sign in through a browser for the selected environment. --sso is also accepted. |
login --key | Enter an API key privately, useful on SSH. |
logout | Remove the stored key from this machine. |
Schedule
Runs run --all on a recurring interval, so reporting does not depend on
running the command manually.
# Run automatically once a day
forgebench schedule enable --interval daily
# Disable the schedule
forgebench schedule disable| Command | Description |
|---|---|
schedule enable --interval daily | Enable a recurring run. Accepted values: hourly, daily (default), weekly. |
schedule disable | Disable the recurring run. |
Sync
The command the session-end hook runs internally. It is not normally run directly; it is documented here for completeness and is useful for running a hook's exact command manually if the hook appears to be stuck.
forgebench sync --quiet| Flag | Description |
|---|---|
--quiet | Suppress output. This is the flag the hook itself passes. |
--tool claude_code | Sync a single tool instead of everything the hook normally covers. |
--foreground | Run in the current terminal instead of in the background. Useful for confirming the command works. |
Hooks
Enables automatic reporting whenever a session ends. This is the recommended, set-and-forget configuration and is the option used in Getting started.
# Enable automatic reporting
forgebench hooks install
# Also report after every response, not only when a session ends
forgebench hooks install --on-stop
# Only one tool (repeat --tool to pick several)
forgebench hooks install --tool codex
forgebench hooks install --tool opencode
# Check whether the hook is enabled and when it last ran
forgebench hooks status
# Disable automatic reporting
forgebench hooks uninstall
# Disable it for one tool only
forgebench hooks uninstall --tool claude_code| Command | Description |
|---|---|
hooks install | Enable automatic reporting for selected tools. OpenCode uses a user-level plugin triggered when a session becomes idle. |
hooks install --on-stop | Also report after every response, not only when a session ends. Increases reporting frequency. |
hooks install --tool codex | Enable reporting for one tool only: claude_code, codex, cursor, github_copilot, or opencode. Repeat to pick several. |
hooks install --print-managed | For an administrator deploying this fleet-wide: print the configuration for distribution via MDM instead of installing it locally. |
hooks status | Check whether the hook is enabled and when it last reported. |
hooks uninstall | Disable automatic session reporting. |
hooks uninstall --tool claude_code | Disable it for one tool only. |
Status
Displays a summary of the current state: installed version, sign-in status, whether the hook is installed, and whether a schedule is running.
forgebench statusUpdate
Checks whether a newer version is available and prints the install command to run. This command does not install the update itself, since a running program cannot safely replace itself while executing, particularly on Windows.
# Check the stable channel (the default unless the preview channel was selected)
forgebench update
# Check the preview channel instead
forgebench update --channel preview| Flag | Description |
|---|---|
--channel preview | Check the preview channel (newer, less tested) instead of stable. |
Uninstall
Removes the schedule, the hook, and the stored login: everything the CLI can safely remove on its own. It then prints the command to remove the program itself.
forgebench uninstall
