SpaceXAI がコーディング CLI の基盤をオープンソース化
SpaceXAI(xai-org)が、ターミナルベースの AI コーディングエージェント「Grok Build」のソースコードを Apache 2.0 ライセンスで公開し、ローカル推論やカスタマイズ可能なエージェント構築を可能にした。
キーポイント
フルオープンソース化とライセンス
Grok Build のエージェントハッチス、TUI(ターミナルユーザーインターフェース)、CLI シェル、および開発者ツールが GitHub で公開され、Apache 2.0 ライセンスの下でフォークや修正が可能になった。
ローカルファーストの実現
設定ファイル(config.toml)を介して任意のモデルを指定し、完全なローカル環境での実行と推論が可能となり、企業内のセキュリティ要件やコスト管理に対応できる。
構造化されたアーキテクチャ
Rust で構築された複数のクレート(コード生成、TUI、シェルランタイム、ツール実装、ワークスペース管理)で構成され、拡張性のあるプラグインシステムと MCP サーバーをサポートする。
多様な運用モード
対話型 TUI モードに加え、スクリプトや CI/CD 向けのヘッドレスモード、およびエディタ埋め込み用の Agent Client Protocol(ACP)を提供し、開発ワークフローに柔軟に統合できる。
主要なユースケースとセキュリティ対策
規制されたリポジトリでの実行前にツールを監査するか、内部ハーンとしてフォークして使用することが推奨されています。
オフライン環境とCI自動化への対応
Air-gapped 環境ではローカルコンパイルと内部エンドポイントの設定が可能で、ヘッドレスモードにより構造化された出力を CI パイプラインに直接フィードできます。
柔軟なインストールと実行方法
curl スクリプトによるプリビルドバイナリのインストールや、Rust ツールチェーンを使用したソースからのビルドが可能で、設定ファイルを通じてモデルを切り替える機能も備えています。
重要な引用
Grok Build was launched as an early beta on May 25, 2026. It is an agent that understands your codebase, edits files, executes shell commands, and searches the web.
Building on that framing, SpaceXAI lists four published areas. The agent loop covers context assembly, response parsing, and tool-call dispatch.
Audit before adoption: Read xai-grok-tools before letting an agent run shell commands in a regulated repo.
Air-gapped runs: Compile locally, set base_url to an internal endpoint, and skip api.x.ai.
影響分析・編集コメントを表示
影響分析
このリリースは、大規模テック企業が自社の AI エージェント技術をオープンソース化し、エコシステム全体を強化する傾向を象徴しています。特にローカルファーストの実現と Rust による堅牢なアーキテクチャは、セキュリティが重視される開発現場や、オンプレミス環境での AI 活用において大きな影響を与えるでしょう。
編集コメント
SpaceXAI(xai-org)が、コードベースの理解やファイル編集を行うエージェント「Grok Build」を Apache 2.0 で公開しました。これは、ローカル推論を前提とした堅牢な Rust ベースの実装であり、開発者が自社のワークフローに合わせてカスタマイズできる点で注目されます。
SpaceXAI は、自社の grok CLI の背後にあるターミナルベースの AI コーディングエージェント「Grok Build」をオープンソース化しました。ソースコードは本日 GitHub に公開され、エージェントハッチ、TUI(ターミナルユーザーインターフェース)、CLI シェル、そして開発者向けツールが Apache 2.0 ライセンスの下でリリースされています。
Grok Build とは何か?
ハッチとはモデルを取り巻く足場のようなものです。コンテキストの構築からモデルへの呼び出し、レスポンスのパース、そしてツールの呼び出し実行までを一貫して担います。
Grok Build は 2026 年 5 月 25 日に早期ベータ版として発表されました。これはコードベースを理解し、ファイル編集やシェルコマンドの実行、Web 検索を可能にするエージェントです。また、長時間実行されるタスクの管理も担います。動作はフルスクリーンのマウス操作対応 TUI です。
主要なインターフェースは 3 つあります。1 つは対話型の TUI、もう 1 つはスクリプトや CI(継続的インテグレーション)向けのヘッドレスモードです。さらに、エディタは「エージェントクライアントプロトコル(ACP)」を通じてこれを埋め込むことができます。
window.addEventListener('message',function(e){
if(e.data&&e.data.frame==='mtp-gbloop'&&e.data.mtpHeight){
var f=document.getElementById('mtp-gbloop-frame');
if(f)f.style.height=e.data.mtpHeight+'px';
}
});
公開された範囲には何が含まれるのか?
この枠組みに基づき、SpaceXAI は 4 つの公開領域をリストアップしています。エージェントループはコンテキストの構築、レスポンスのパース、ツール呼び出しの実行を担当します。ツールの領域では、コードの読み込み、編集、検索の方法が定義されています。ターミナル UI ではレンダリング、入力処理、プランの確認、インライン差分ビューアの表示を扱います。拡張システムにはスキル、プラグイン、フック、MCP サーバー、サブエージェントが含まれます。
これらの領域は、それぞれ特定のクレート(Rust のパッケージ単位)に対応しています:
PathContents
crates/codegen/xai-grok-pager-bin
コンポーネントのルートパッケージ。xai-grok-pager バイナリをビルドします。
crates/codegen/xai-grok-pager
TUI(ターミナルユーザーインターフェース):スクロールバック、プロンプト、モーダル、レンダリング機能。
crates/codegen/xai-grok-shell
エージェントのランタイムと、リーダー/stdio/ヘッドレス用のエントリーポイント。
crates/codegen/xai-grok-tools
ツール実装(ターミナル操作、ファイル編集、検索など)。
crates/codegen/xai-grok-workspace
ホストファイルシステム、バージョン管理システム(VCS)、実行環境、チェックポイント機能。
third_party/Vendored upstream source (Mermaid diagram stack)
サードパーティのベンダー済みソースコード(Mermaid 図描画スタック)。
この表は、読み進める順序として捉えてください。まずは xai-grok-shell でループ処理を開始し、次に xai-grok-tools を扱います。ビルドに関する注意点が一つ、見落としがちです。ルートディレクトリの Cargo.toml は生成されたファイルであり、README にはこれを「読み取り専用」として扱うよう明記されています。
では、ローカルファーストの仕組みはどうなっているのでしょうか?
単なる調査機能を超え、SpaceXAI が提示する実用的な成果の一つがこれです。Grok Build は今や完全にローカルファーストで動作可能になりました。自分でコンパイルし、ローカルの推論エンジンに接続し、設定ファイル(config.toml)からすべてを制御できます。
# ~/.grok/config.toml (Windows: %USERPROFILE%\.grok\config.toml)
[model.my-model]
model = "model-id"
base_url = "https://api.example.com/v1"
name = "Display Name"
env_key = "API_KEY"
[models]
default = "my-model"grok inspect コマンドを実行すると、ハッチが現在のディレクトリで検出した情報を表示します。これには設定ソース、指示書、スキル、プラグイン、フック、そして MCP サーバーが含まれます。
Grok Build と比較するとどうなるでしょうか?
| 項目 | Grok Build |
|---|---|
| エージェント | 第一級ライセンス |
| フォークと改変 | 可能 |
| モデル選択 | 自由 |
| 外部 PR | 受け付け |
Grok Build (xai-org/grok-build) は Apache 2.0 ライセンスの下、config.toml を経由して誰でも利用可能です。ただし、外部からのプルリクエストは受け付けていません。
Codex CLI (openai/codex) も同様に Apache 2.0 で公開されており、OpenAI モデルの利用が許可されていますが、オープンなプルリクエストキューが存在します。
OpenCode (anomalyco/opencode) は MIT ライセンスで、75 以上のプロバイダーをサポートするコミュニティプロジェクトです。
Claude Code は専用モデルに限定されたプロプライエタリ製品であり、利用許可は下りていません。
これらの背景を踏まえると、現在特に有効な 4 つのユースケースが浮かび上がります。
まず「導入前の監査」です。エージェントが規制対象のリポジトリでシェルコマンドを実行する前に、必ず xai-grok-tools のドキュメントを確認してください。
次に「社内ハネスとしてのフォーク」です。Apache 2.0 ライセンスによりフォークは可能ですが、オリジナルリポジトリへのマージは想定されていません。
3 つ目は「エアギャップ環境での実行」です。ローカルでコンパイルし、base_url を社内エンドポイントに設定すれば、api.x.ai への接続を回避できます。
最後に「CI 自動化」です。ヘッドレスモードでは構造化された出力がパイプラインステップへ直接フィードされます。
プリビルドバイナリ (macOS, Linux, Windows)
curl -fsSL https://x.ai/cli/install.sh | bash
grok --version
またはソースからビルド (protoc と固定された Rust ツールチェーンが必要)
cargo build -p xai-grok-pager-bin --release # -> target/release/xai-grok-pager
監査用パス: crate ごとのコマンド実行。フルワークスペースのビルドは時間がかかるため
cargo check -p xai-grok-tools
cargo test -p xai-grok-config
cargo clippy -p xai-grok-shell
マシン可読な出力を伴うヘッドレス実行
grok -p "Explain the architecture" --output-format streaming-json
~/.grok/config.toml に定義されたモデルを指定して 1 回だけ実行
grok inspect
grok -p "Hello" -m my-model
GitHub リポジトリ、発表記事、そしてドキュメントもぜひご覧ください。
SpaceXAI がコーディング CLI の背後にある Rust ベースのエージェントハネス、TUI、ツールレイヤーをオープンソース化した「Grok Build」についての記事は、MarkTechPost で公開されました。
原文を表示
SpaceXAI has open-sourced Grok Build, the terminal-based AI coding agent behind its grok CLI. The source landed on GitHub today. The release covers the agent harness, TUI, CLI shell, and developer tooling under the Apache 2.0 license
What is Grok Build?
A harness is the scaffolding around a model. It assembles context, calls the model, parses the reply, and dispatches tool calls.
Grok Build was launched as an early beta on May 25, 2026. It is an agent that understands your codebase, edits files, executes shell commands, and searches the web. It also manages long-running tasks. It runs as a full-screen, mouse-interactive TUI.
Three surfaces exist. There is the interactive TUI, headless mode for scripting and CI. Editors embed it through the Agent Client Protocol (ACP).
window.addEventListener('message',function(e){
if(e.data&&e.data.frame==='mtp-gbloop'&&e.data.mtpHeight){
var f=document.getElementById('mtp-gbloop-frame');
if(f)f.style.height=e.data.mtpHeight+'px';
}
});
What does the published area contain?
Building on that framing, SpaceXAI lists four published areas. The agent loop covers context assembly, response parsing, and tool-call dispatch. The tools cover how the agent reads, edits, and searches code. The terminal UI covers rendering, input handling, plan review, and the inline diff viewer. The extension system covers skills, plugins, hooks, MCP servers, and subagents.
Those areas map onto named crates:
PathContents
crates/codegen/xai-grok-pager-binComposition-root package; builds the xai-grok-pager binary
crates/codegen/xai-grok-pagerThe TUI: scrollback, prompt, modals, rendering
crates/codegen/xai-grok-shellAgent runtime plus leader/stdio/headless entry points
crates/codegen/xai-grok-toolsTool implementations (terminal, file edit, search)
crates/codegen/xai-grok-workspaceHost filesystem, VCS, execution, checkpoints
third_party/Vendored upstream source (Mermaid diagram stack)
Read that table as a reading order. Start at xai-grok-shell for the loop, then xai-grok-tools. One build note is easy to miss. The root Cargo.toml is generated, and the README says to treat it as read-only.
How does the local-first path work?
Beyond inspection, SpaceXAI frames one practical outcome. Grok Build can now run fully local-first. Compile it yourself, point it at local inference, and drive everything from config.toml.
Copy CodeCopiedUse a different Browser
~/.grok/config.toml (Windows: %USERPROFILE%\.grok\config.toml)
[model.my-model]
model = "model-id"
base_url = "https://api.example.com/v1"
name = "Display Name"
env_key = "API_KEY"
[models]
default = "my-model"
grok inspect then prints what the harness discovered in the current directory. That covers config sources, instructions, skills, plugins, hooks, and MCP servers.
How does Grok Build compare?
AgentFirst-party licenseFork and modifyModel choiceExternal PRs
Grok Build (xai-org/grok-build)Apache 2.0PermittedAny, via config.tomlNot accepted
Codex CLI (openai/codex)Apache 2.0PermittedOpenAI modelsOpen PR queue
OpenCode (anomalyco/opencode)MITPermitted75+ providersCommunity project
Claude CodeProprietaryNot grantedAnthropic modelsn/a
Use cases and examples
Given all of that, four uses hold up today.
Audit before adoption: Read xai-grok-tools before letting an agent run shell commands in a regulated repo.
Fork for an internal harness: Apache 2.0 permits it; upstream merge is not on offer.
Air-gapped runs: Compile locally, set base_url to an internal endpoint, and skip api.x.ai.
CI automation: Headless mode feeds structured output into a pipeline step.
Copy CodeCopiedUse a different Browser
Prebuilt binary (macOS, Linux, Windows)
curl -fsSL https://x.ai/cli/install.sh | bash
grok --version
Or build from source (needs protoc and the pinned Rust toolchain)
cargo build -p xai-grok-pager-bin --release # -> target/release/xai-grok-pager
Audit path: per-crate commands, because full-workspace builds are slow
cargo check -p xai-grok-tools
cargo test -p xai-grok-config
cargo clippy -p xai-grok-shell
Headless run with machine-readable output
grok -p "Explain the architecture" --output-format streaming-json
Route one run through a model declared in ~/.grok/config.toml
grok inspect
grok -p "Hello" -m my-model
Check out the GitHub Repo, the announcement, and the documentation.
The post SpaceXAI Open-Sources Grok Build: The Rust Agent Harness, TUI, and Tool Layer Behind Its Coding CLI appeared first on MarkTechPost.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み