blitz

module
v0.1.1-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0

README

Blitz ⚡

The zero-gimmick, high-performance Go coding agent.

Blitz reads your workspace, makes the change, checks it, and gets out of the way: no persona, no filler, no chatter. It's written in Go on Google's Agent Development Kit and runs Gemini, Claude, OpenAI-compatible or Ollama models.

Documentation: https://retail-cortex.github.io/blitz/

Why Blitz

  • Compiled Go. The CLI starts in about 20 ms and idles in about 40 MB; one static binary, no runtime to install.
  • Safe by default. Commands run in an OS sandbox (Seatbelt on macOS, bubblewrap on Linux), edits need your approval unless you've allowed them, and every turn can be undone.
  • Three ways in, one engine. blitz in the terminal, the per-user service blitzd (which also runs scheduled workers), and a desktop app laid out like an IDE. A session started in one continues in the others.
  • Works with what you have. AGENTS.md, CLAUDE.md and GEMINI.md load as project instructions; MCP servers, hooks, custom commands and Agent Skills all work.
  • Scriptable. JSON and streaming JSON output, limits on turns, cost and time, and distinct exit codes.

Install

Download the archive for your platform from the releases: macOS (darwin_arm64, darwin_amd64), Linux (linux_amd64, linux_arm64) or Windows (windows_amd64). Each holds blitz, blitzd, the blz shortcut and the license files; put its folder on your PATH. The desktop app is Blitz_<version>_macos_universal.dmg, or blitz-desktop_<version>_<arch>.deb for Ubuntu 24.04, Debian 13 and later.

Verify a download against this repository's release workflow:

cosign verify-blob --bundle checksums.txt.sigstore.json \
  --certificate-identity-regexp '^https://github.com/retail-cortex/blitz/\.github/workflows/release\.yml@refs/tags/v' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com checksums.txt
sha256sum --ignore-missing -c checksums.txt

The macOS command-line binaries aren't notarized: clear the quarantine flag with xattr -d com.apple.quarantine blitz blitzd.

Chromebooks (ChromeOS's Linux development environment)

The Linux .deb runs in ChromeOS's Linux container (Crostini): amd64 on Intel Chromebooks such as the Pixelbook, arm64 on ARM ones. It hasn't been tested there yet; reports are welcome.

  • Debian version. The container is Debian 12 or 13 (cat /etc/debian_version). The app needs WebKitGTK 4.1 at 2.40 or later, which current Debian 12 has; the package refuses an older one. A Chromebook past its last ChromeOS update keeps its container's Debian updates, but may never move to a newer Debian.
  • Install. sudo apt install ./blitz-desktop_<version>_amd64.deb bubblewrap. bubblewrap is the shell sandbox; gVisor is unlikely to run in the container, and in auto mode Blitz uses bubblewrap instead (blitz doctor says which).
  • A blank or garbled window. Some Chromebooks can't pass WebKitGTK's rendering through the VM: start the app with WEBKIT_DISABLE_DMABUF_RENDERER=1 blitz-desktop.
  • Projects. Linux sees its home directory and the folders shared with it in the Files app (under /mnt/chromeos/); open workspaces from there.
  • Keys. The container has no keyring, so API keys are kept in ~/.blitz/secrets.toml, readable only by you.
  • The service runs as a systemctl --user service in the container. ChromeOS stops the container when you shut down or leave Linux idle, so scheduled workers only run while it's up.

Quick start

blitz config init               # a commented ~/.blitz/.env.toml
blitz config set-key gemini     # your API key, into the OS keychain (or anthropic, openai)
blitz doctor                    # checks the settings, the key and the sandbox

cd ~/src/project
blitz                           # an interactive session
blitz "why does the build fail?"   # one prompt, then exit

In a session, ask for what you want. Blitz shows a diff before each edit and asks before commands run: y once, s for the session, a always, n no. /undo reverts the last turn and /help lists the commands. To use the desktop app and scheduled workers, start the service at login with blitz service install.

Getting started goes further, and the guide covers configuration, safety, models, extending and more.

Building from source

Blitz builds with Bazel 9.2, which downloads Go, Node, pnpm, buf, Hugo and every dependency at pinned versions. Install Bazelisk as bazel (it picks the version in .bazelversion); nothing else of that toolchain needs installing.

macOS (13 or later, Apple silicon or Intel)
xcode-select --install                   # or install Xcode, and: sudo xcode-select -s /Applications/Xcode.app
brew install bazelisk
git clone https://github.com/retail-cortex/blitz.git && cd blitz

The builds and tests are run with the full Xcode installed.

Linux (Ubuntu 24.04 or Debian 13 and later)
sudo apt-get install -y git bubblewrap pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev
sudo curl -fsSLo /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64
sudo chmod +x /usr/local/bin/bazel       # bazelisk-linux-arm64 on ARM
git clone https://github.com/retail-cortex/blitz.git && cd blitz

GTK and WebKitGTK are only for the desktop app; bubblewrap is the shell sandbox.

Windows

Building on Windows isn't supported: use WSL 2 and the Linux steps. The Windows archive cross-compiles on macOS or Linux (bazel build //release:archives).

Build, test and run
bazel build //:build-all                  # everything for this machine: //:build-all-linux or //:build-all-mac
bazel test //...                          # every test: Go, the desktop page, the protos

bazel run //:blitz -- doctor              # the CLI (arguments after --); built at bazel-bin/apps/cli/blitz
bazel run //:blitzd                       # the service, in the foreground
bazel run //:desktop                      # the desktop app, with its own blitzd
bazel run //:desktop-web                  # the desktop page in a browser, http://localhost:5173/?fake
bazel run //:docs                         # the docs site, http://localhost:1313

bazel build //:mac-app                    # macOS: Blitz.app (universal)
bazel build //:deb                        # Linux: bazel-bin/apps/desktop/packaging/blitz-desktop_amd64.deb
sudo dpkg -i bazel-bin/apps/desktop/packaging/blitz-desktop_amd64.deb   # reinstalls even at the same version
bazel build --config=release //:archives  # the release archives, every platform, version from git

The short names are aliases in the root BUILD.bazel, which lists them; the full labels still work.

Common problems
  • "bazel: command not found" or the wrong Bazel version. Install Bazelisk as bazel; don't install Bazel itself.
  • The desktop app fails to build on Linux with a missing gtk+-3.0 or webkit2gtk-4.1. Install libgtk-3-dev libwebkit2gtk-4.1-dev pkg-config. Older distributions only ship WebKitGTK 4.0, which isn't supported.
  • doctor says the sandbox is unavailable on Ubuntu 24.04. AppArmor restricts unprivileged user namespaces, which bubblewrap needs: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 (or an AppArmor profile for bwrap). Inside Docker, the default seccomp profile blocks them too.
  • The sandbox or gVisor tests skip. They need bubblewrap (Linux) and runsc (RUNSC_PATH); CI fails if they skip, locally they don't.
  • Out of disk space. A full build with tests and every platform's archive takes several gigabytes under Bazel's output base; bazel clean frees the build outputs.
  • go build fails. Use Bazel: the API's generated Go code exists only in the build.

More in building from source.

Contributing

See CONTRIBUTING.md and the development guide. Maintainers are listed in OWNERS.txt.

License

Apache License 2.0: see LICENSE, NOTICE, and THIRD_PARTY_NOTICES for the software Blitz includes. Every program shows them: blitz license (and /license), blitzd --license, and the desktop app's Settings › About.

Blitz began as a Go port of Code Puppy by Mike Pfaffenberger (MIT).

Directories

Path Synopsis
apps
cli command
Command blitz is Blitz's command line: an interactive session (the REPL) in the current directory, a one-shot run with a prompt (`blitz "…"`, `blitz exec`), and the commands around them: doctor, config, service, workers and license.
Command blitz is Blitz's command line: an interactive session (the REPL) in the current directory, a one-shot run with a prompt (`blitz "…"`, `blitz exec`), and the commands around them: doctor, config, service, workers and license.
cli/internal/tui
Package tui is the CLI's interactive session: the prompt with its history and completion, the slash commands, streamed Markdown output, approvals and questions answered at the terminal, and Ctrl+C to stop a turn.
Package tui is the CLI's interactive session: the prompt with its history and completion, the slash commands, streamed Markdown output, approvals and questions answered at the terminal, and Ctrl+C to stop a turn.
desktop command
Command blitz-desktop is Blitz's desktop app: a window laid out like an IDE (the workspace's files, an editor and the agent's chat), driving the per-user Blitz service (spec_desktop_024).
Command blitz-desktop is Blitz's desktop app: a window laid out like an IDE (the workspace's files, an editor and the agent's chat), driving the per-user Blitz service (spec_desktop_024).
service command
blitzd is the per-user Blitz service: it holds every workspace a client opens (the desktop app, and the CLI when it attaches) and runs the workers' schedules.
blitzd is the per-user Blitz service: it holds every workspace a client opens (the desktop app, and the CLI when it attaches) and runs the workers' schedules.
service/internal/daemon
Package daemon runs the Blitz service: every workspace a client opens, served over the per-user socket, and the workers' schedules.
Package daemon runs the Blitz service: every workspace a client opens, served over the per-user socket, and the workers' schedules.
service/internal/server
Package server serves Blitz's API (proto/blitz/v1) over Connect: one process holding every workspace a user opens, each an engine.Workspace.
Package server serves Blitz's API (proto/blitz/v1) over Connect: one process holding every workspace a user opens, each an engine.Workspace.
service/servicetest
Package servicetest runs the Blitz service in a test, for packages outside the service that test against it (the client, the CLI, the desktop app).
Package servicetest runs the Blitz service in a test, for packages outside the service that test against it (the client, the CLI, the desktop app).
build
analyzers/doccomment
Package doccomment is a nogo analyzer: every package has a package comment, and every exported declaration a doc comment (spec_release_readiness_030 RR-12).
Package doccomment is a nogo analyzer: every package has a package comment, and every exported declaration a doc comment (spec_release_readiness_030 RR-12).
pkg
api
Package api is the contract between Blitz's front ends and its engine: the Backend a front end drives, and the values, events and errors that cross it.
Package api is the contract between Blitz's front ends and its engine: the Backend a front end drives, and the values, events and errors that cross it.
client
Package client is a workspace held by the Blitz service, reached over its socket: an api.Backend, so front ends drive it exactly as they drive a local *engine.Workspace.
Package client is a workspace held by the Blitz service, reached over its socket: an api.Backend, so front ends drive it exactly as they drive a local *engine.Workspace.
config
Package config loads Blitz's settings: one TOML file, .env.toml, in ~/.blitz (or $MODENV_PREFIX, or --config), with a workspace's own settings laid over it from ~/.blitz/workspaces, API keys resolved from the OS keychain, and environment variables applied last.
Package config loads Blitz's settings: one TOML file, .env.toml, in ~/.blitz (or $MODENV_PREFIX, or --config), with a workspace's own settings laid over it from ~/.blitz/workspaces, API keys resolved from the OS keychain, and environment variables applied last.
engine
Package engine is Blitz without a user interface: it opens a workspace (registries, tools, sessions, the model and the engine) and exposes what a front end needs as an api.Backend.
Package engine is Blitz without a user interface: it opens a workspace (registries, tools, sessions, the model and the engine) and exposes what a front end needs as an api.Backend.
engine/agents
Package agents loads the agents a workspace offers: the built-in ones and Markdown files with YAML frontmatter from ~/.blitz/agents (and the project's, when it's trusted), each a name, a description, a system prompt, the tools it may use and optionally its own model (spec_agents_014).
Package agents loads the agents a workspace offers: the built-in ones and Markdown files with YAML frontmatter from ~/.blitz/agents (and the project's, when it's trusted), each a name, a description, a system prompt, the tools it may use and optionally its own model (spec_agents_014).
engine/agents/builtin
Package builtin holds the agents Blitz ships with, as Markdown files embedded in the binary.
Package builtin holds the agents Blitz ships with, as Markdown files embedded in the binary.
engine/audit
Package audit writes an append-only JSONL record of what tools did and what the user approved or denied.
Package audit writes an append-only JSONL record of what tools did and what the user approved or denied.
engine/breaker
Package breaker is a small circuit breaker for dependencies that fail persistently (MCP servers, model APIs): after a run of failures calls are refused for a cooldown that grows with each failed trial.
Package breaker is a small circuit breaker for dependencies that fail persistently (MCP servers, model APIs): after a run of failures calls are refused for a cooldown that grows with each failed trial.
engine/commands
Package commands loads custom slash commands: Markdown files whose body is a prompt, from the user's and the project's command directories, plus the bundled ones.
Package commands loads custom slash commands: Markdown files whose body is a prompt, from the user's and the project's command directories, plus the bundled ones.
engine/memory
Package memory loads project instruction files (AGENTS.md, CLAUDE.md, GEMINI.md, BLITZ.md), the files they import, and rule files, which are added to the agents' system prompt.
Package memory loads project instruction files (AGENTS.md, CLAUDE.md, GEMINI.md, BLITZ.md), the files they import, and rule files, which are added to the agents' system prompt.
engine/runtime
Package runtime runs the agent: it wraps Google's ADK runner, builds the agent tree with its tools and sub-agents, runs a prompt as a turn within its limits, delivers steering mid-turn, answers side questions without touching history, compacts history, and records usage and traces.
Package runtime runs the agent: it wraps Google's ADK runner, builds the agent tree with its tools and sub-agents, runs a prompt as a turn within its limits, delivers steering mid-turn, answers side questions without touching history, compacts history, and records usage and traces.
engine/session
Package session stores conversations: each session's metadata and its messages and events on disk, snapshots to branch from, search over a session's history, and the store ADK reads the conversation from (spec_sessions_017).
Package session stores conversations: each session's metadata and its messages and events on disk, snapshots to branch from, search over a session's history, and the store ADK reads the conversation from (spec_sessions_017).
engine/skills
Package skills loads the skills a workspace offers: a SKILL.md with frontmatter and instructions, optionally scripts, from the built-in set, ~/.blitz/skills and (when trusted) the project; and the policy that caps what their scripts may do (spec_skills_013).
Package skills loads the skills a workspace offers: a SKILL.md with frontmatter and instructions, optionally scripts, from the built-in set, ~/.blitz/skills and (when trusted) the project; and the policy that caps what their scripts may do (spec_skills_013).
engine/skills/builtin
Package builtin holds the skills Blitz ships with (a SKILL.md each), embedded in the binary.
Package builtin holds the skills Blitz ships with (a SKILL.md each), embedded in the binary.
engine/tools
Package tools is everything the agent can do and the rules it does it under: file tools through the workspace's sandbox (with checkpoints for undo), shell commands under the command policy and the OS sandbox, approvals and permission rules, web fetch and search, MCP servers, skill scripts, images, the task list and questions to the user (spec_filetools_006, spec_shell_007, spec_approvals_005).
Package tools is everything the agent can do and the rules it does it under: file tools through the workspace's sandbox (with checkpoints for undo), shell commands under the command policy and the OS sandbox, approvals and permission rules, web fetch and search, MCP servers, skill scripts, images, the task list and questions to the user (spec_filetools_006, spec_shell_007, spec_approvals_005).
engine/workers
Package workers reads workers: scheduled workflows a workspace defines in workers/<name>/WORKER.md (ROADMAP item 24).
Package workers reads workers: scheduled workflows a workspace defines in workers/<name>/WORKER.md (ROADMAP item 24).
i18n
Package i18n translates user-interface text.
Package i18n translates user-interface text.
images
Package images prepares pictures for vision models and keeps them out of session files.
Package images prepares pictures for vision models and keeps them out of session files.
legal
Package legal holds Blitz's license terms, embedded in every program: the Apache License 2.0, the NOTICE (Blitz's copyright and Code Puppy's MIT notice) and the notices of the third-party software the programs include.
Package legal holds Blitz's license terms, embedded in every program: the Apache License 2.0, the NOTICE (Blitz's copyright and Code Puppy's MIT notice) and the notices of the third-party software the programs include.
loginitem
Package loginitem starts the Blitz service (blitzd) at login and controls it: a launchd agent on macOS, a systemd user unit on Linux.
Package loginitem starts the Blitz service (blitzd) at login and controls it: a launchd agent on macOS, a systemd user unit on Linux.
observability
Package observability provides the diagnostic log and OpenTelemetry export.
Package observability provides the diagnostic log and OpenTelemetry export.
redact
Package redact masks secrets in text before it is written to disk.
Package redact masks secrets in text before it is written to disk.
secrets
Package secrets keeps Blitz's secrets (API keys) out of its settings files: in the macOS Keychain, in the Secret Service on Linux (GNOME Keyring, KWallet), or, where neither is available, in an owner-only file beside the settings.
Package secrets keeps Blitz's secrets (API keys) out of its settings files: in the macOS Keychain, in the Secret Service on Linux (GNOME Keyring, KWallet), or, where neither is available, in an owner-only file beside the settings.
socket
Package socket is where the per-user Blitz service listens and how clients reach it: a Unix socket that only its user can open.
Package socket is where the per-user Blitz service listens and how clients reach it: a Unix socket that only its user can open.
textutil
Package textutil holds small string helpers shared by tools and the TUI.
Package textutil holds small string helpers shared by tools and the TUI.
tools
codeowners command
Command codeowners writes .github/CODEOWNERS from OWNERS.txt, so GitHub requests reviews from the maintainers who own the paths a change touches (spec_release_readiness_030 RR-42).
Command codeowners writes .github/CODEOWNERS from OWNERS.txt, so GitHub requests reviews from the maintainers who own the paths a change touches (spec_release_readiness_030 RR-42).
coverage command
Command coverage summarizes the Go tests' coverage from the LCOV report `bazel coverage --combined_report=lcov` writes: the total and each package's and file's share of lines covered.
Command coverage summarizes the Go tests' coverage from the LCOV report `bazel coverage --combined_report=lcov` writes: the total and each package's and file's share of lines covered.
notices command
Command notices writes THIRD_PARTY_NOTICES: the license of every Go module linked into Blitz's programs and of every npm package bundled into the desktop app's page, from the copies Bazel fetched.
Command notices writes THIRD_PARTY_NOTICES: the license of every Go module linked into Blitz's programs and of every npm package bundled into the desktop app's page, from the copies Bazel fetched.
specs command
Command specs checks the specs against the repository (spec_release_readiness_030 RR-21): every spec is in the specs index, and every repository path a spec names in backquotes exists.
Command specs checks the specs against the repository (spec_release_readiness_030 RR-21): every spec is in the specs index, and every repository path a spec names in backquotes exists.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL