Unofficial open-source fork of xAI Grok Build, maintained by Surmount.
Terminal AI coding agent: full-screen TUI, headless/CI mode, and ACP for editors.
Not affiliated with or endorsed by xAI / SpaceXAI.
FORK.md · Contributing · Install · Build from source · Upstream
Upstream does not accept external pull requests; this fork does. Product name
and binary are grok-oss. Config and sessions stay under ~/.grok.
Fork additions include OpenRouter as a separate model option, shared rate
limits across processes, economic mode, and auto-run /implement follow-ups.
Detail: FORK.md.
If upstream ever accepts outside PRs, Surmount intends to contribute the useful work back.
SOURCE_REV at the repo root is a monorepo export pin (full SHA recorded
for an absorbed upstream-side tree), not a substitute for git rev-parse HEAD.
| Pillar | What we do |
|---|---|
| Faithful | Track xai-org/grok-build; keep crate layout for clean content alignment |
| Open | Public source, PRs accepted here, security-conscious review |
| Distinct | Product Grok OSS, CLI grok-oss, clear unofficial labeling |
| Compatible | Config/session state still under ~/.grok (shared with upstream CLI if both installed) |
Sources live in-tree under packaging/aur/. After the package
is published to the AUR:
yay -S grok-oss-git
# or: paru -S grok-oss-gitUntil AUR publish is live, build with makepkg from packaging/aur/grok-oss-git/.
git clone https://github.com/SurmountSystems/grok-oss.git
cd grok-oss
cargo install --path crates/codegen/xai-grok-pager-bin --locked --force
# installs: ~/.cargo/bin/grok-oss
grok-oss --versionnix develop # fenix toolchain from rust-toolchain.toml + build deps
nix build .#grok-oss # → ./result/bin/grok-oss (human packaging, not GHA)CI is for checks only (no release package in GitHub Actions — supply chain). Locally, the same quality gate:
just check # or: just ci — full gate; run before push
just test # fmt / clippy / tests without redoing full flake prepcurl -fsSL https://x.ai/cli/install.sh | bash # installs official `grok`That path is SpaceXAI’s release channel, not Grok OSS.
Requirements:
- Rust — pinned by
rust-toolchain.toml;rustupinstalls on first build. - DotSlash — hermetic tools under
bin/(notablybin/protoc). Install and putdotslashonPATHbefore building. - protoc — via DotSlash
bin/protoc, orPATH/$PROTOC. - macOS and Linux are supported; Windows is best-effort.
cargo run -p xai-grok-pager-bin # build + launch
cargo build -p xai-grok-pager-bin --release # target/release/grok-oss
cargo check -p xai-grok-pager-binPackage name remains xai-grok-pager-bin for upstream mergeability; the binary
artifact is grok-oss.
| Upstream | Grok OSS | |
|---|---|---|
| Repo | xai-org/grok-build | SurmountSystems/grok-oss |
| External PRs | Not accepted | Welcome |
| Binary | grok (official installer) |
grok-oss |
| Releases | Official channels / installers | No separate release train — upstream version + git SHA; grok-oss update --check vs Surmount main |
| License | Apache-2.0 | Apache-2.0 |
Sync and versioning: FORK.md, docs/upstream-history.md.
Users: grok-oss update --check. Maintainers: just upstream-detect / import or put-history scripts (never blind-merge xAI force-exports).
- Fork process and divergences:
FORK.md - User guide (mostly upstream tree):
crates/codegen/xai-grok-pager/docs/user-guide/ - Online upstream docs may still say “Grok Build”; CLI name and fork features differ as above.
just check # full quality gate (preferred before push)
cargo check -p <crate>
cargo test -p xai-grok-shell --test openrouter_credentials
cargo clippy -p <crate>
cargo fmt --allPRs against this repository are welcome. See CONTRIBUTING.md.
Normal git flow: feature branch → PR → main.
First-party code: Apache License 2.0 — LICENSE.
Third-party: THIRD-PARTY-NOTICES and
crates/codegen/xai-grok-tools/THIRD_PARTY_NOTICES.md.