Generated from
packages/cli/src/command-registry.ts; do not edit by hand.
Manifest schema: forge.cli.manifest.v1. Machine-readable version: cli.manifest.json.
Forge CLI is the headless interface for coding agents and the concise command line for humans who submit immutable candidates and observe the canonical release controller.
Install @smolai/forge globally to use the short sf command. When it is a project dependency, use pnpm exec sf, npm exec sf, or npx smolforge instead.
sf auth login — Create or refresh this machine’s Forge session without printing its credential.sf release status — Read the durable request, component-scoped plan, phase history, and provider receipts by request ID.sf release watch — Watch one canonical request until terminal. This never pushes, retries, promotes, or rolls back.sf diagnose — Use the operation or ingest ID returned by Forge to learn the precise phase and safe next action before any explicit Deploy mutation.Use the sections below to jump directly to a command. Every command documents its access scope, safety behavior, output schema, exit codes, and remediation.
sf help — Describe a command or the complete CLI.sf commands — List command paths for machine discovery.sf schema — Print the versioned CLI command manifest.sf docs generate — Generate CLI reference artifacts from the registry.sf auth status — Show the active credential without exposing it.sf auth login — Authenticate a Forge CLI session.sf auth logout — Remove this machine’s stored Forge credentials.sf auth revoke — Revoke a personal access token.sf whoami — Return the authenticated Forge identity.sf scopes — Show the active credential scopes.sf register — Register a Forge account.sf git doctor — Diagnose Forge Smart HTTP repository access.sf repo create — Create a repository.sf repo list — List repositories.sf repo get — Get a repository.sf repo update — Update a repository.sf repo star — Star a repository.sf repo unstar — Unstar a repository.sf repo import — Import repositories.sf clone-url — Print a clone URL.sf migrate — Inspect or migrate a local repository configuration.sf actions list — List Actions runs.sf actions inspect — Inspect an Action run and linked release receipt.sf actions cancel — Cancel an Action run.sf agent profiles — List repository-agent execution profiles.sf agent list — List durable repository-agent threads.sf agent create — Create or recover a durable repository-agent thread.sf agent view — Inspect one durable repository-agent thread.sf agent message — Message a repository agent at an explicit execution tier.sf agent events — Read normalized repository-agent events after a cursor.sf agent cancel — Cancel one repository-agent run.sf agent approve — Resolve one repository-agent approval.sf release enqueue — Submit an exact feature SHA to the protected production merge queue.sf release status — Read canonical forge-release/v2 state.sf release watch — Watch one canonical request through merge and release until terminal.sf benchmark — Plan or run an exact-tree Forge/GitHub benchmark.sf gist import — Import GitHub Gists.sf transcript upload — Upload an agent transcript.sf hooks install — Install repository hooks.sf hooks status — Inspect repository hooks.sf llms — Fetch llms.txt.sf pr list — List pull requests.sf pr view — Inspect a pull request.sf pr create — Create a pull request.sf deploy list — List generalized Deploy projects and releases.sf deploy status — Show a generalized Deploy release and production evidence.sf deploy retry — Request an explicit generalized Deploy build.sf deploy promote — Promote a verified release with current-pointer fencing.sf deploy rollback — Restore a selected verified release with fencing.sf deploy check — Validate a local forgeBuild.ts.sf diagnose — Retrieve a sanitized release or ingest diagnostic.sf help#Describe a command or the complete CLI.
Command help is generated from this registry. JSON help is safe for agents and documentation generators.
forge.cli.help.v1 — Command metadata or the complete manifest.command?--jsonExamples:
sf help statussf help --jsonRemediation: Run sf commands --json to discover canonical paths.
sf commands#List command paths for machine discovery.
Returns registry-defined commands without parsing human console output.
forge.cli.commands.v1 — Canonical paths, aliases, summaries, and safety class.--jsonExamples:
sf commands --jsonsf schema#Print the versioned CLI command manifest.
The versioned manifest is canonical input for website documentation and coding agents.
forge.cli.manifest.v1 — Complete stable command manifest.--jsonExamples:
sf schemasf docs generate#Generate CLI reference artifacts from the registry.
Writes the website-consumable JSON manifest and Markdown reference. --check detects drift without writing.
forge.cli.docs.v1 — Artifact paths and whether they were current.--checkExamples:
sf docs generatesf docs generate --checkRemediation: Run sf docs generate and commit both generated artifacts.
sf auth status#Show the active credential without exposing it.
Reports the configured identity, credential storage state, and server-confirmed authentication state.
forge.auth.status.v1 — Sanitized credential and identity metadata.--json, --jsonl, --base-urlExamples:
sf auth status --jsonRemediation: Run sf auth login or set a short-lived SMOLFORGE_TOKEN.
sf auth login#Authenticate a Forge CLI session.
Prompts for a missing username or email in a TTY, stores the bearer credential in the OS keychain, and installs a Forge-only Git credential helper. The helper mints short-lived repository credentials on demand without changing remotes or generic Git helpers.
Aliases: sf login.
forge.auth.login.v1 — Sanitized authenticated identity and installed Forge Git helper.--json, --jsonl, --base-url, --username, --emailExamples:
sf auth loginsf auth login --username aliceRemediation: Use browser/device login when enabled, or pass explicit credentials only in a trusted environment.
sf auth logout#Remove this machine’s stored Forge credentials.
Revokes all repository credentials minted by this CLI, removes the Forge-only Git helper, and deletes the local session keychain credential. If token revocation fails, logout stops so it can be retried safely.
forge.auth.logout.v1 — Whether the session and helper-issued Git credentials were removed.--json, --jsonl, --base-urlExamples:
sf auth logout --jsonRemediation: Retry sf auth logout while the session is still available.
sf auth revoke#Revoke a personal access token.
Revokes a listed PAT using the current session credential.
forge.auth.revoke.v1 — Revoked credential identifier.token-id--json, --jsonl, --base-url, --yesExamples:
sf auth revoke pat_id --yesRemediation: List tokens in the Forge account before retrying.
sf whoami#Return the authenticated Forge identity.
A server-authoritative identity check.
forge.auth.whoami.v1 — Authenticated identity.--json, --jsonl, --base-urlExamples:
sf whoami --jsonRemediation: Run sf auth login.
sf scopes#Show the active credential scopes.
Returns only caller-visible authorization scope metadata.
forge.auth.scopes.v1 — Current auth type and scopes.--json, --jsonl, --base-urlExamples:
sf scopes --jsonRemediation: Mint a repository-scoped credential with the minimal required scopes.
sf git doctor#Diagnose Forge Smart HTTP repository access.
Checks local remote/ref agreement, repository-scoped authorization, and real ls-remote behavior. A clean canary push is explicit and never implicit.
repo:readforge.git.doctor.v1 — Scoped Git authorization and ref diagnostic.owner/repo?--json, --jsonl, --base-url, --canary-push, --yesExamples:
sf git doctor --jsonRemediation: Run sf auth login and retry.
sf actions list#List Actions runs.
Lists scoped runs with SHA, actor, conclusion, and linked Deploy delivery evidence.
Aliases: sf actions runs.
actions:readforge.actions.list.v1 — Runs with delivery evidence.owner/repo?--json, --jsonl, --base-url, --limit, --status, --watchExamples:
sf actions list --jsonRemediation: Use sf actions inspect for a particular run.
sf actions inspect#Inspect an Action run and linked release receipt.
Includes jobs, steps, timings, cache evidence, logs summary, and Deploy delivery state.
Aliases: sf actions explain.
actions:readforge.actions.inspect.v1 — Action and release receipt evidence.owner/repo?, run-id--json, --jsonl, --base-urlExamples:
sf actions inspect owner/repo 42 --jsonRemediation: Use sf actions list to find an accessible run.
sf actions cancel#Cancel an Action run.
Explicitly cancels a cancellable run; no retry or deploy repair is implied.
actions:writeforge.actions.cancel.v1 — Cancelled run state.owner/repo, run-id--json, --jsonl, --base-url, --yesExamples:
sf actions cancel owner/repo 42 --yesRemediation: Inspect the run before cancelling.
sf agent profiles#List repository-agent execution profiles.
Shows live Instant and allowlisted Workspace availability, capabilities, and backend reasons for one repository.
agent:readforge.agent.profiles.v1 — Execution ladder and live availability.owner/repo--json, --jsonl, --base-urlExamples:
sf agent profiles owner/repo --jsonRemediation: Confirm repository access and inspect unavailable_reason before selecting a tier.
sf agent list#List durable repository-agent threads.
Lists private thread handles without returning another repository’s conversations.
agent:readforge.agent.list.v1 — Repository-scoped agent threads.owner/repo--json, --jsonl, --base-url, --limitExamples:
sf agent list owner/repo --jsonRemediation: Use sf agent create to start a thread.
sf agent create#Create or recover a durable repository-agent thread.
Creates a repository-scoped thread or idempotently returns the caller-selected thread handle.
agent:runforge.agent.create.v1 — Created or recovered thread.owner/repo--json, --jsonl, --base-url, --thread-idExamples:
sf agent create owner/repo --jsonRemediation: Keep the returned thread_id for later messages.
sf agent view#Inspect one durable repository-agent thread.
Returns messages, runs, approvals, artifacts, and immutable receipts for the selected thread.
agent:readforge.agent.view.v1 — Authoritative thread state and receipts.owner/repo, thread-id--json, --jsonl, --base-urlExamples:
sf agent view owner/repo agent_thread_0123456789abcdef0123456789abcdef --jsonRemediation: Use sf agent list to find the thread.
sf agent message#Message a repository agent at an explicit execution tier.
Creates a thread when needed, freezes the selected source ref, and submits Auto, Instant, or allowlisted Workspace work without changing thread identity.
agent:messageforge.agent.message.v1 — Accepted message, frozen run, thread handle, and events URL.owner/repo--json, --jsonl, --base-url, --message, --thread, --mode, --max-compute, --source-ref, --client-message-idExamples:
sf agent message owner/repo --message "Explain this module" --mode instant --jsonsf agent message owner/repo --thread agent_thread_0123456789abcdef0123456789abcdef --message "Implement and test it" --mode workspace --jsonRemediation: Inspect sf agent profiles; Workspace additionally requires agent:write, repository write permission, and an Alpha allowlist match.
sf agent events#Read normalized repository-agent events after a cursor.
Reads durable progress, approval, artifact, and terminal events without polling provider-private state.
agent:readforge.agent.events.v1 — Normalized durable event page.owner/repo, thread-id--json, --jsonl, --base-url, --after, --limitExamples:
sf agent events owner/repo agent_thread_0123456789abcdef0123456789abcdef --after 0 --jsonRemediation: Resume from the returned cursor.
sf agent cancel#Cancel one repository-agent run.
Requests cancellation for the exact thread/run pair; Workspace teardown and publication fencing remain server-owned.
agent:cancelforge.agent.cancel.v1 — Cancellation request and run state.owner/repo, thread-id, run-id--json, --jsonl, --base-url, --yesExamples:
sf agent cancel owner/repo agent_thread_0123456789abcdef0123456789abcdef agent_run_0123456789abcdef0123456789abcdef --yes --jsonRemediation: Inspect the thread receipt to confirm teardown.
sf agent approve#Resolve one repository-agent approval.
Resolves the exact approval inside its repository, thread, and run authority without broadening future actions.
agent:approveforge.agent.approve.v1 — Resolved approval and authoritative run state.owner/repo, thread-id, run-id, approval-id--json, --jsonl, --base-url, --decision, --note, --yesExamples:
sf agent approve owner/repo agent_thread_0123456789abcdef0123456789abcdef agent_run_0123456789abcdef0123456789abcdef agent_approval_0123456789abcdef0123456789abcdef --decision approve_once --yes --jsonRemediation: Refresh the thread before resolving a conflicting decision.
sf pr list#List pull requests.
Lists pull requests without requiring a browser.
repo:readforge.pr.list.v1 — Pull requests and pagination.owner/repo?--json, --jsonl, --base-url, --stateExamples:
sf pr list owner/repo --state open --jsonRemediation: Check the repository name and credential scope.
sf pr view#Inspect a pull request.
Returns pull request metadata, commits, and the exact unified diff.
repo:readforge.pr.view.v1 — Pull request metadata, commits, and diff.owner/repo, number--json, --jsonl, --base-urlExamples:
sf pr view owner/repo 7 --jsonRemediation: Use sf pr list to find an accessible pull request.
sf pr create#Create a pull request.
Creates a pull request from explicit source and target branches without opening a browser.
repo:writeforge.pr.create.v1 — Created pull request.owner/repo--json, --jsonl, --base-url, --head, --base, --title, --body, --yesExamples:
sf pr create owner/repo --head feature --base main --title "Add feature" --yesRemediation: Run sf pr list before retrying after an uncertain response.
sf deploy list#List generalized Deploy projects and releases.
Reads the authoritative generalized Deploy release ledger.
repo:readforge.deploy.list.v1 — Projects and current release evidence.owner/repo?--json, --jsonl, --base-urlExamples:
sf deploy list --jsonRemediation: Configure a Deploy project for the repository.
sf deploy status#Show a generalized Deploy release and production evidence.
Shows release, provider version, binding, endpoint, and activation evidence without treating an upload as live.
Aliases: sf deploy show.
repo:readforge.deploy.status.v1 — Release and production pointer evidence.owner/repo?--json, --jsonl, --base-url, --project, --release, --watchExamples:
sf deploy status --project project_id --jsonRemediation: Use sf deploy list.
sf deploy retry#Request an explicit generalized Deploy build.
Uses an idempotency key and only requests the current project head; it never replays an uncertain repository command.
repo:writeforge.deploy.retry.v1 — Release ID, source SHA, and replay status.owner/repo--json, --jsonl, --base-url, --project, --idempotency-key, --yesExamples:
sf deploy retry owner/repo --project id --idempotency-key repair-123 --yesRemediation: Use sf diagnose before a retry after repository commands have started.
sf deploy promote#Promote a verified release with current-pointer fencing.
Activates a selected generalized release only when expected current production state still matches.
repo:writeforge.deploy.promote.v1 — Activation receipt and provider evidence.owner/repo--json, --jsonl, --base-url, --project, --release, --expected-current, --yesExamples:
sf deploy promote owner/repo --project id --release id --expected-current deployment --yesRemediation: Refresh sf deploy status and retry with the new pointer.
sf deploy rollback#Restore a selected verified release with fencing.
Rolls production back only to a selected release and expected current pointer.
repo:writeforge.deploy.rollback.v1 — Rollback activation receipt.owner/repo--json, --jsonl, --base-url, --project, --release, --expected-current, --yesExamples:
sf deploy rollback owner/repo --project id --release id --expected-current deployment --yesRemediation: Refresh sf deploy status before retrying.
sf diagnose#Retrieve a sanitized release or ingest diagnostic.
Resolves a 32-character Git ingest request ID independently of the current checkout. Release and deployment diagnostics remain repository-scoped. Returns the authorized phase, retryability, affected SHA/release/run, and next safe action.
repo:readforge.diagnose.v1 — Sanitized caller-authorized diagnostic.operation-or-ingest-id--json, --jsonl, --base-url, --repo, --watch, --timeoutExamples:
sf diagnose ingest_id --watch --jsonsf diagnose release_id --repo owner/repo --jsonRemediation: Use the ID returned by release status, Git, Actions, or Deploy output.
sf release enqueue#Submit an exact feature SHA to the protected production merge queue.
Records the immutable pull-request candidate, dispatches affected CI, verifies server-signed evidence, merges through the protected queue, and hands the resulting main SHA to the resumable fenced controller. It never activates a provider inline.
repo:writeforge.release.enqueue.v2 — Canonical request identity and queue state.sha--json, --jsonl, --base-url, --ref, --repo, --pr, --yesExamples:
sf release enqueue $SHA --ref codex/my-feature --repo swyx/forge --pr 5 --yes --jsonRemediation: Confirm the branch has an open ready pull request, or query sf release status.
sf release status#Read canonical forge-release/v2 state.
Returns the durable merge request or release record, current phase, append-only phase history, and receipt summaries. A request ID plus --repo uses ordinary repository read permission; the operator-only list omits --repo.
repo:readforge.release.status.v2 — Canonical release queue and receipt state.release-id?--json, --jsonl, --base-url, --repo, --environmentExamples:
sf release status fmq_id --repo swyx/forge --jsonsf release status --jsonRemediation: Use the request ID returned by enqueue and the same --repo value.
sf release watch#Watch one canonical request through merge and release until terminal.
Polls only the forge-release/v2 status API with bounded exponential backoff. It performs no provider or workflow mutation.
repo:readforge.release.status.v2 — Terminal canonical release status.release-id--json, --jsonl, --base-url, --repo, --environment, --timeoutExamples:
sf release watch fmq_id --repo swyx/forge --jsonRemediation: Run sf release status <request-id> --repo owner/name for the latest phase.
sf deploy check#Validate a local forgeBuild.ts.
Statically validates the checked-in Forge Deploy configuration.
forge.deploy.check.v1 — Normalized local config validation.path?--json, --jsonl, --base-urlExamples:
sf deploy checksf deploy check --jsonRemediation: Fix the cited forgeBuild.ts constraint.
sf benchmark#Plan or run an exact-tree Forge/GitHub benchmark.
Uses a packaged fixture and refuses source drift. The executable transport matrix is read-only and creates only local temporary clones. Cold-push and build scenarios remain gated on server-issued ephemeral namespaces so this command cannot create permanent repositories, attach targets, or promote.
forge.benchmark.result.v1 — Exact fixture identity, scenario policy, provider samples, median, and p95.fixture--json, --jsonl, --base-url, --forge-url, --github-url, --sha, --samples, --executeExamples:
sf benchmark swyxkit --jsonsf benchmark swyxdotio --forge-url https://forge.smol.ai/owner/mirror.git --execute --samples 5 --jsonRemediation: Refresh the fixture SHA only after both remotes expose the same exact tree.
sf register#Register a Forge account.
Register a Forge account.
repo:readforge.cli.response.v1 — Command response.Examples:
sf registerRemediation: Run sf help for the current arguments.
sf repo create#Create a repository.
Create a repository.
repo:readforge.cli.response.v1 — Command response.Examples:
sf repo createRemediation: Run sf help for the current arguments.
sf repo list#List repositories.
List repositories.
repo:readforge.cli.response.v1 — Command response.Examples:
sf repo listRemediation: Run sf help for the current arguments.
sf repo get#Get a repository.
Get a repository.
repo:readforge.cli.response.v1 — Command response.Examples:
sf repo getRemediation: Run sf help for the current arguments.
sf repo update#Update a repository.
Update a repository.
repo:readforge.cli.response.v1 — Command response.Examples:
sf repo updateRemediation: Run sf help for the current arguments.
sf repo star#Star a repository.
Star a repository.
repo:readforge.cli.response.v1 — Command response.Examples:
sf repo starRemediation: Run sf help for the current arguments.
sf repo unstar#Unstar a repository.
Unstar a repository.
repo:readforge.cli.response.v1 — Command response.Examples:
sf repo unstarRemediation: Run sf help for the current arguments.
sf repo import#Import repositories.
Import repositories.
repo:readforge.cli.response.v1 — Command response.Examples:
sf repo importRemediation: Run sf help for the current arguments.
sf gist import#Import GitHub Gists.
Import GitHub Gists.
repo:readforge.cli.response.v1 — Command response.Examples:
sf gist importRemediation: Run sf help for the current arguments.
sf clone-url#Print a clone URL.
Print a clone URL.
repo:readforge.cli.response.v1 — Command response.Examples:
sf clone-urlRemediation: Run sf help for the current arguments.
sf transcript upload#Upload an agent transcript.
Upload an agent transcript.
repo:readforge.cli.response.v1 — Command response.Examples:
sf transcript uploadRemediation: Run sf help for the current arguments.
sf hooks install#Install repository hooks.
Install repository hooks.
repo:readforge.cli.response.v1 — Command response.Examples:
sf hooks installRemediation: Run sf help for the current arguments.
sf hooks status#Inspect repository hooks.
Inspect repository hooks.
repo:readforge.cli.response.v1 — Command response.Examples:
sf hooks statusRemediation: Run sf help for the current arguments.
sf migrate#Inspect or migrate a local repository configuration.
Inspect or migrate a local repository configuration.
repo:readforge.cli.response.v1 — Command response.Examples:
sf migrateRemediation: Run sf help for the current arguments.
sf llms#Fetch llms.txt.
Fetch llms.txt.
repo:readforge.cli.response.v1 — Command response.Examples:
sf llmsRemediation: Run sf help for the current arguments.