Agent-friendly CLIs built as Rust binaries.
On supported macOS and Linux targets, the fast release install path uses attested release artifacts. That fast path uses local attestation verification through GitHub CLI.
Rust and Cargo are still required when:
- you pass
--build-from-source - no attested release artifact is available for your platform
ghattestation verification support is unavailable locally, which causes an explicit tagged source-build fallback (artifact path disabled; source build only)- you are developing Forge from source
This section is the primary path: using Forge as an installed tool on a machine.
Recommended patterns:
- platform bootstrap prerequisites
- simplest bootstrap on a new machine
- deterministic bootstrap pinned to a specific release when needed
- steady-state updates through
forge self update-check,forge self update, andforge tool update
Install only the platform-level prerequisites first. The intended flow is:
- install the platform package manager where needed
- install Rust/Cargo through the official rustup bootstrap
- install Forge
- let Forge bootstrap the rest of the global tool surface
- use Forge for steady-state maintenance
macOS preferred Homebrew bootstrap:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [ -x /opt/homebrew/bin/brew ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -x /usr/local/bin/brew ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
brew --versionWinGet is Windows-only. On macOS, Homebrew is the platform package manager that forge tool update packages uses.
macOS/Linux preferred Rust bootstrap:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
rustup default stable
cargo --versionPrefer sourcing rustup's generated ~/.cargo/env file from your shell startup file. It adds ~/.cargo/bin only when needed.
For zsh:
# load rustup and cargo
[[ ! -f "$HOME/.cargo/env" ]] || source "$HOME/.cargo/env" 1>/dev/nullFor bash or POSIX shell profiles:
# load rustup and cargo
[ ! -f "$HOME/.cargo/env" ] || . "$HOME/.cargo/env"Windows preferred:
winget install -e --id Rustlang.Rustup
rustup default stable
cargo --versionOn Windows, Rust source builds also need the MSVC linker and Windows SDK. If cargo reports missing MSVC build tools, install the Visual Studio C++ tools through WinGet before building Forge from source.
Use curl as the bootstrap path on a new machine:
curl -fsSL https://raw.githubusercontent.com/iancleary/forge/main/scripts/install-forge-release.sh | shThat installer:
- resolves the latest published Forge release tag by default
- re-executes the installer script from the exact release tag it is about to install
- uses attested release artifacts for supported platforms when local attestation verification is available
- verifies artifact SHA-256 against the published release checksums
- verifies the GitHub release attestation before installing an artifact
- falls back to a tagged source build with
--lockedwhen attestation verification cannot run or no attested artifact is available (artifact path disabled, source build only) - installs Forge-managed skills into
~/.agents/skillsby default - installs the managed Codex baseline into
~/.codex/by default
After installation, a good first verification step is:
forge doctor
forge skills status
forge codex diffThen let Forge preview and apply the rest of the global tool bootstrap:
forge tool update --dry-run
forge tool updateFor a one-step Forge install plus global tool handoff, use an explicit installer mode:
# Install Forge, then preview global tool bootstrap
curl -fsSL https://raw.githubusercontent.com/iancleary/forge/main/scripts/install-forge-release.sh | sh -s -- --bootstrap-tools-dry-run
# After reviewing the preview
forge tool update
# Install Forge, then run global tool bootstrap
curl -fsSL https://raw.githubusercontent.com/iancleary/forge/main/scripts/install-forge-release.sh | sh -s -- --bootstrap-toolsIf you want to verify a downloaded release archive against the published GitHub provenance attestation:
gh attestation verify ./forge-20260412.0.7-aarch64-apple-darwin.tar.gz \
--repo iancleary/forge \
--source-ref refs/tags/20260412.0.7 \
--signer-workflow iancleary/forge/.github/workflows/release-artifacts.yml \
--predicate-type https://slsa.dev/provenance/v1That command is the strictest and explicit check used for release artifact trust.
If you want a deterministic install pinned to a specific release:
curl -fsSL https://raw.githubusercontent.com/iancleary/forge/20260412.0.7/scripts/install-forge-release.sh | sh -s -- --tag 20260412.0.7If you want the binaries but not the Codex baseline:
curl -fsSL https://raw.githubusercontent.com/iancleary/forge/main/scripts/install-forge-release.sh | sh -s -- --skip-codexAfter bootstrap, prefer the Forge-managed update path:
forge self update-check
forge self update
forge tool update --dry-run
forge tool updateUse forge self update for Forge itself and Forge-managed Codex assets. Use forge tool update for global tools owned outside the current project: the platform package manager, Rust toolchains through rustup, uv, uv-installed tools, cargo-installed commands, gum, Tea, and CodeGraph.
Project dependency updates are intentionally out of scope for forge tool update; keep those in each repo's own package manager or release workflow.
In release mode, that path now:
- checks GitHub release tags by querying the Forge repo tags
- uses attested release artifacts for supported platforms when local attestation verification is available
- verifies artifacts against the published release manifest, checksums, and GitHub release attestation
- falls back to a tagged source build with
--lockedwhen attestation verification cannot run or an attested artifact is unavailable (artifact path disabled, source build only) - reconciles Forge-managed skills
- reapplies the managed Codex baseline
The curl installer remains useful for first install and recovery, but it is no longer the steady-state update path.
Forge installs two managed surfaces by default:
- skills under
~/.agents/skills(forge skills install --all) - Codex user baseline under
~/.codex/(forge codex install)
These are intentionally narrower than taking ownership of all local Codex state.
The most common commands and their intent:
forge doctor
checks your local Forge health and state files.forge self update-check
compares the installed Forge version to the latest GitHub release.forge self update [--build-from-source]updates Forge and managed assets when behind.forge tool update [--dry-run]updates global command-line tools through the platform package manager, rustup, uv, uv-installed tools, cargo-installed crates, and ensuresgum, Tea, and CodeGraph are installed.forge version [--json] [--update]
reports the current hash/version plus release state;--updaterunsforge self updatedirectly when an update is available.forge skills install --all
reconciles all managed skills from the release catalog.forge skills status
shows managed/unmanaged and health status for skills.forge codex install
installs the managed Forge baseline under~/.codex.forge codex diff
compares managed~/.codexfiles with installed versions.forge codex render
applies templated policy artifacts from managed files into local state.forge preference check windows-terminalchecks targeted Windows Terminal preferences without owning the completesettings.json.forge preference diff windows-terminalpreviews changes for the theme, default font, and Git Bash profile.forge preference apply windows-terminalexplicitly applies those changes while preserving unrelated JSONC settings and comments.mermaid doctorchecks whether the local Mermaid render toolchain is ready.mermaid render --input diagram.mmd --output diagram.svgrenders a Mermaid definition through the Forge-managed wrapper.forge bytefield installverifies and prefetches the pinnedbytefield-svgrunner through Forge.forge bytefield render --source <file> --output <file>renders a bytefield source file to SVG through the Forge wrapper.
Bytefield note:
forge bytefieldis the SVG-first contract- web sizing and the planned Typst-facing wrapper belong above that layer rather than inside the raw renderer
Quick reference:
forge doctor
forge self update-check
forge self update
forge tool update --dry-run
forge tool update
forge tool update codegraph
forge tool update tea
forge version
forge skills status
forge codex diff
mermaid doctor
forge bytefield installCommon maintenance commands:
forge skills list --source all
forge skills validate --all
forge skills diff design-algorithm --target user
forge skills diff linear-cli --target user
forge skills status --scope all
forge codex render
forge skills install --all --source repo
forge skills revert --all --target userIf you want Codex to use these CLIs and the Forge-managed consumer skills outside local development, install the binaries and then install the skills into the Codex USER skill directory at ~/.agents/skills.
If Forge is your first-party Codex source of truth, treat the repo docs plus the Forge-managed skills as the canonical portable policy surface. Repo-local AGENTS.md guidance can reinforce that behavior, but it should not be the only place where cross-repo routing rules live.
From a local checkout:
just install-dev-local
forge skills install --all --source repoWhen adding or removing CLIs, update the embedded list in scripts/install-forge-release.sh and ensure the repo check passes:
just install-list-checkFrom an installed Forge release or after pointing an agent at this repo:
forge skills install --all
forge skills status
forge codex diff
forge codex installForge-managed Codex user config is intentionally narrower than the skills surface. In v1, forge codex render, forge codex diff, and forge codex install manage only:
~/.codex/AGENTS.md~/.codex/rules/user-policy.rules
They do not take ownership of live ~/.codex/config.toml, session history, auth state, or plugin caches.
The important mental model:
forgeowns the portable, user-scoped Codex behavior you want available everywhere- skill
descriptionfrontmatter is part of the routing contract, not incidental prose - router skills such as
forge-toolstell Codex which narrower skill to use next - machine-local or private details should stay out of the Forge-managed surface
If Forge reports that ~/.config/forge/state.toml cannot be parsed after a local schema change during development, remove that file and reinstall the managed skills you want Forge to track.
If you use a non-user target as part of your primary managed install set, mark it explicitly:
forge skills install --all --source repo --target path:/opt/forge-skills --target-role mainline
forge skills status --target path:/opt/forge-skillsIf you temporarily install skills from a local checkout and want to switch back to the standard release-backed install:
forge skills revert --all --target userLocal development lifecycle is documented in docs/development.md.
Repo layout:
docs/contains product and design specs for each CLIcrates/contains Rust crates for each CLI implementation
Current CLIs:
forgefor shared config and self-managementcodex-threadsfor local Codex session archive search and retrievalslack-agentfor stricter assistant Slack workflowsslack-queryfor Slack research workflowslinearfor Linear issue, project, and milestone workflowsmermaidfor Mermaid diagram rendering and tool bootstrap
Internal support crates:
slack-coreas a shared library crate for Slack auth/config/client code used byslack-queryandslack-agent
Key design notes:
docs/agent-friendly-clis.mdfor the cross-repo CLI contractdocs/algorithm.mdfor the Forge design sequence: question, delete, simplify, accelerate, automatedocs/codex.mdfor Forge as the first-party source of truth for Codex skills, routing, and portable policy
Versioning:
- format:
YYYYMMDD.0.N(America/Phoenix calendar day)
Forge covers the Forge-authored CLIs and their managed skills. For adjacent work, a minimal high-value Codex setup should also include:
openai-docsfor OpenAI product, model, and API questions that need current official documentation- GitHub plugin skills plus the
ghCLI for issues, PR review threads, CI triage, and release-adjacent repository workflows
These are recommended companions, not part of Forge's managed skill lifecycle. Keep the boundary narrow:
- use Forge skills for Forge-authored CLIs and local Forge management
- use
openai-docswhen the task is about OpenAI products rather than the Forge toolchain - prefer
gh-driven GitHub workflows and GitHub plugin skills when the task is about repository hosting, PRs, issues, reviews, or CI - for substantial issue or PR bodies, prefer local markdown files with
gh ... --body-fileover inline multiline shell strings - avoid direct use of the native GitHub Codex app path when an equivalent
ghor plugin-skill workflow exists, because it is less deterministic and more likely to trigger extra permission prompts
For Forge-managed tools, prefer the Forge CLI first and use shell tools as fallbacks, not as the primary product interface.
- use Forge commands when the task is part of a stable contract and the output should be reusable, low-token, and deterministic
- use
jqfor one-off local reshaping after a CLI already returned the right data - use
rgfor repository and local-file exploration, not as a substitute for domain-specific CLI reads - when the same
jqcleanup keeps recurring, treat that as a signal to add a narrow Forge flag, subcommand, or output mode
The pattern is: repeated pain in agent runs should first be observed, then named as a narrow task, then folded into Forge as the smallest stable primitive that removes the repeated shell shaping.