Skip to content

xAI’s Grok Build Licensed Under Apache 2.0 After Data Privacy Scandal

Bottom line: xAI has open-sourced Grok Build to restore trust following a critical data upload error – the project comprises 844,530 lines of Rust code with tools for terminal-based code generation.

After serious data protection issues with its CLI tool, xAI released the complete Grok Build codebase under Apache 2.0 license. The original flaw enabled uncontrolled uploads of entire directories to xAI’s Google Cloud buckets.

xAI’s Grok Build CLI tool came under massive criticism after users reported that running a command in a directory uploaded that entire folder to xAI’s Google Cloud infrastructure. One user documented that this transferred “SSH keys, password manager databases, documents, photos, videos – everything”. xAI responded with a statement from Elon Musk: “As a precautionary measure, all user data that has been uploaded to SpaceXAI so far will be completely deleted” and disabled the upload function.

Hours later, xAI released the entire Grok Build codebase publicly. In the official announcement, the company explained that data storage is now disabled by default and all previously stored data has been deleted. xAI emphasizes that Grok Build can now run entirely locally and open-source, enabling user control. Since July 12, 2026, data storage has been switched off for all users.

The open project consists of 844,530 lines of Rust code (measured without whitespace and comments), of which only approximately 3 percent are vendored dependencies. The repository currently contains only a single commit, making the development history impossible to trace. Grok Build includes implementations of code tools adapted from other AI code assistants – including features from Codex and Claude for file operations (grep, read, edit, write) as well as a custom-developed terminal renderer for Mermaid diagrams in Unicode.

The codebase still contains remnants of the upload functionality, such as the file xai-grok-shell/src/upload/gcs.rs, which contains code for Google Cloud uploads. However, the upload_session_state() function is blocked by a hardcoded error. The architecture of Grok Build with its extensive tools and agent prompts reveals the complexity of modern terminal-based code generators – for comparison, OpenAI’s Codex project comprises 950,933 lines of Rust code.


Source: simonwillison.net · Published July 16, 2026
Lumi AI News — AI-assisted curation pursuant to Art. 50 EU AI Act. Paraphrase and classification by Lumi News Pipeline v1.7.3.

Share on: