Blitz Logo Blitz Docs v0.2.0
⚡ Open Source • Local-First • 100% Offline

Blitz Documentation & Reference Guide

Blitz is an ultra-fast, local-first API client and testing platform built with Rust and Dioxus. It delivers sub-150ms native startup, a ~10MB memory footprint, multi-protocol execution (HTTP, WebSockets, gRPC, MQTT, SSE, GraphQL, Socket.IO), native OS keychain encryption, branch-based Git synchronization, and a built-in 37-tool Model Context Protocol (MCP) server for AI coding agents.

💡 Why Blitz exists:

Mainstream API clients increasingly force cloud logins, upload proprietary company payloads to remote servers, charge hefty per-seat subscription invoices, and consume hundreds of megabytes of RAM running Electron/Node.js runtimes. Blitz runs completely on your own hardware, saves data as clean JSON on disk, uses your own Git repositories for team sync, and exposes a native stdio MCP server for autonomous AI agents (Cursor, Claude, Antigravity, Windsurf).

Core Architecture

Blitz avoids Electron entirely. It is written 100% in safe Rust, compiling to a lean native binary with zero webview overhead in headless mode.

Frontend / GUI

Dioxus Native 0.6 with cross-platform renderer. Renders at 60+ FPS with minimal GPU/CPU load.

Execution Engine

Tokio asynchronous runtime + Reqwest (HTTP/1.1 & HTTP/2) + Hyper-util client.

JavaScript Sandbox

Embedded Boa engine for Postman-compatible pre-request and test script execution.

Protocols & MCP

tokio-tungstenite (WS), hyper/prost (gRPC), rumqttc (MQTT), JSON-RPC 2.0 stdio (MCP).

Installation & Builds

macOS (Apple Silicon & Intel)
# Download prebuilt DMG or universal release binary from GitHub Releases:
curl -L -O https://github.com/h3ma209/Blitz/releases/latest/download/Blitz-macOS.dmg
Linux (x86_64 & aarch64)
curl -L -O https://github.com/h3ma209/Blitz/releases/latest/download/blitz-linux-x86_64.tar.gz
tar -xzf blitz-linux-x86_64.tar.gz && sudo mv blitz /usr/local/bin/
Build from Source (Rust 1.83+)
git clone https://github.com/h3ma209/Blitz.git
cd Blitz
cargo build --release
# Binary available at target/release/blitz

Collections & Request Workspace

Blitz organizes API suites into nested trees of Collections, Folders, Subfolders, and Request items. All items support custom headers, query parameters, authorization schemes, pre-request scripts, and test scripts.

Blitz Cockpit • Quick Actions & Nested Collections Desktop UI
Blitz Cockpit and Collection Hierarchy

The sidebar search input provides real-time, debounced filtering across request names, URLs, HTTP methods, headers, and payloads with zero UI lag. Filter by specific item types directly inside the search bar using inline prefix syntax:

Prefix Syntax Shorthand Example Query Filter Behavior
folder:<query> f:<query> folder:auth Filters folders only (keeps parent collection visible). folder: alone lists all folders.
req:<query> request:, r: req:users Filters request items only by name, URL, method, or payload. req: alone lists all requests.
col:<query> collection:, c: col:store Filters top-level collections only. col: alone lists all collections.
is:<type> / type:<type> — is:folder auth Alternative semantic filter syntax for folders, requests, or collections.

Request Body Modes

Select from standard request formats in the body tab:

  • none: No body sent (standard GET/HEAD).
  • raw: Payload with automatic Content-Type headers for JSON, Text, JavaScript, HTML, or XML.
  • form-urlencoded: Key-value parameters encoded into URL percent-escaped format.
  • form-data: Multipart upload supporting text values and binary file uploads.
  • graphql: Dual-pane editor for GraphQL query document and JSON variables.

Supported Authentication Schemes (8 Methods)

Authorization can be defined at the request level or inherited hierarchically from parent collections:

Scheme Parameters Header Generated
Inherit Auth None Uses parent collection / folder authorization
Bearer Token token, prefix Authorization: Bearer <token>
Basic Auth username, password Authorization: Basic <base64>
API Key key, value, in (Header/Query) X-API-Key: <value>
OAuth 2.0 access_token, token_type Authorization: Bearer <access_token>
AWS Signature v4 access_key, secret_key, region, service Authorization: AWS4-HMAC-SHA256 ...
Hawk Authentication auth_id, auth_key, algorithm Authorization: Hawk id=... ts=...
Digest Auth username, password, realm, nonce Authorization: Digest username=...

Multi-Protocol Execution Engine

Blitz is engineered from the ground up for modern microservices and real-time architectures:

WebSockets (ws:// & wss://) tokio-tungstenite

Full bi-directional frame streaming with live connection log, automatic UTF-8 string/binary frame decoding, and manual or script-driven frame transmission.

Blitz WebSocket and streaming frame inspection interface
gRPC (HTTP/2 Unary & Streaming) hyper + prost-types

Native gRPC unary RPC calls using google.protobuf.Struct JSON serialization. Returns exact gRPC status codes (0=OK, 1=CANCELLED, 14=UNAVAILABLE, etc.), status messages, and latency.

Server-Sent Events (SSE / EventSource) HTTP stream reader

Connect to event streaming APIs (e.g. OpenAI / Anthropic streaming responses). Collects event:, data:, and id: lines into structured timelines.

MQTT (IoT Broker Publish / Subscribe) rumqttc v0.24

Connects to standard brokers (Mosquitto, EMQX, HiveMQ) over TCP. Supports QoS 0, 1, and 2 publish operations and timeout-bounded topic subscriptions.

Socket.IO Client rust_socketio

Performs Engine.IO engine handshake, executes custom event emits with JSON arguments, and listens for targeted inbound server events.

GraphQL Subscriptions over WebSocket graphql-transport-ws

Connects to modern GraphQL subscription servers with connection_init handshake, executes subscription queries, and streams real-time updates.

Variables & Dynamic Faker System

Variables can be referenced anywhere in URLs, parameters, headers, or body payloads using {{variable_name}} syntax.

Variable Precedence Hierarchy

When resolving a variable token, Blitz inspects scopes in the following strict order (matching Postman convention):

Local / Script Scope > Data Iteration File > Active Environment > Collection Scope > Global Scope > Dynamic Faker > Unresolved

Postman-Compatible Dynamic Variables ($faker)

Blitz includes native evaluation for Postman dynamic pseudo-variables. These can be used in templates or generated inside scripts via pm.variables.replaceIn("{{$guid}}") or pm.variables.get("$guid"):

Variable Output Example Description
{{$guid}} d3b07384-d113-467f-9488-34863f684cf0 Fresh random UUID v4 string
{{$timestamp}} 1749281023 Current Unix epoch timestamp in seconds
{{$isoTimestamp}} 2026-10-26T14:30:00.000Z Current UTC timestamp in ISO-8601 format
{{$randomInt}} 482 Random integer between 1 and 1000
{{$randomEmail}} user_b7a9f1c2@example.com Realistic random email address
{{$randomFullName}} Emma Williams Random first and last name combination
{{$randomCity}} San Francisco Random world city name
{{$randomCountry}} Canada Random country name
{{$randomIP}} 192.168.1.42 Random IPv4 address
{{$randomBoolean}} true Random boolean string ("true" / "false")
{{$randomPrice}} 49.99 Random price currency float string
{{$randomAlphaNumeric}} k9x2m4p8q1 Random 10-character alphanumeric token
{{$randomPhoneNumber}} +1-555-0199 Random formatted phone number
{{$randomColor}} #3b82f6 Random hex color code

OS Keychain Secrets / Vault ({{vault:key}})

Sensitive tokens or passwords can be kept out of Git collection repositories entirely by prefixing them with {{vault:key}}. Blitz encrypts and resolves these directly from macOS Keychain, Linux Secret Service (libsecret), or Windows Credential Manager.

Scripting & Test Sandbox (blitz.* Native API)

Blitz includes an embedded JavaScript engine (Boa) that executes pre-request and test scripts. The native namespace is blitz.*, with pm.* and epm.* fully aliased for 100% backward compatibility with imported Postman collections:

// Native Blitz test script (also supports legacy pm.* syntax)
blitz.test("Status code is 200", function() {
blitz.response.to.have.status(200);
});

blitz.test("Payload schema and latency validation", function() {
var data = blitz.response.json();
blitz.expect(data).to.have.property("token");
blitz.expect(blitz.response.responseTime).to.be.below(500);
// Set extracted token into active environment
blitz.environment.set("authToken", data.token);
});

Available blitz.* Sandbox Objects

All objects below are available under blitz.* (and aliased as pm.*):

  • blitz.environment.get(k) / .set(k, v) / .unset(k) / .clear()
  • blitz.collectionVariables.get(k) / .set(k, v)
  • blitz.globals.get(k) / .set(k, v)
  • blitz.variables.get(k): Resolves across all scopes including dynamic $guid.
  • blitz.variables.replaceIn(str): Replaces {{variables}} in a string.
  • blitz.response.code: HTTP status integer (e.g. 200).
  • blitz.response.json(): Parsed response JSON object.
  • blitz.response.text(): Raw response body string.
  • blitz.response.headers.get("Content-Type"): Response header inspection.
  • blitz.sendRequest(url, callback): Execute sub-requests inside pre-request scripts.
  • blitz.visualizer.set(template, data): Render interactive HTML response visualizers.
  • require("crypto-js"): Native SHA-256 and HMAC-SHA256 crypto support.
NEW

Model Context Protocol (MCP) Server for AI Agents

Blitz includes a built-in Model Context Protocol (MCP) server over standard input/output (blitz mcp). Autonomous AI coding assistants (Cursor, Claude Desktop, Antigravity / Gemini, Windsurf, VS Code, and Zed) can query collection schemas, execute HTTP and multi-protocol endpoints, run load benchmarks, extract environment variables, and manage cookies locally without cloud dependencies.

Automatic IDE Configuration (blitz mcp setup)

Blitz can scan your machine for installed AI IDEs and automatically inject the MCP server configuration:

# Interactive scanner & configuration tool:
blitz mcp setup

# Configure all detected IDEs automatically:
blitz mcp setup --all

Complete MCP Tools Reference (37 Tools)

The Blitz MCP server exposes 37 atomic tools via JSON-RPC 2.0 stdio:

Tool Name Parameters Description
blitz_list_collections filter (optional) Lists all collections, folders, and request names with breadcrumb paths.
blitz_get_collection collection (required) Retrieves complete collection tree (requests, scripts, variables, auth).
blitz_create_folder collection, name, parent_folder, description Creates nested organizational folders inside a collection.
blitz_delete_folder collection, folder Recursively deletes a folder and all contained requests.
blitz_delete_collection collection (required) Permanently deletes a collection by ID or name.
blitz_export_collection collection, format, file_path Exports collection as Postman v2.1 or OpenAPI 3.0.
blitz_generate_docs collection, format, file_path Generates standalone HTML documentation (static single-file or Swagger UI).
blitz_get_request request_id, collection, name Retrieves full definition (URL, method, headers, params, body, auth).
blitz_upsert_request collection, name, method, url, headers, body, folder Creates or updates a request in a collection or subfolder.
blitz_delete_request collection, request_id Deletes an existing request from a collection.
blitz_send_request request_id, environment, save_to_env Executes a saved request through the pipeline with variable extraction.
blitz_execute_http url, method, headers, body, environment, save_to_env Executes an ad-hoc HTTP request through the Blitz engine.
blitz_run_collection collection, environment, iterations, delay_ms, bail Runs an entire collection test suite headless and returns pass/fail metrics.
blitz_websocket_send url, message, timeout_ms, max_messages Connects to WebSocket (ws:// / wss://), transmits frame, collects streaming inbound messages.
blitz_grpc_unary endpoint, method, body Executes gRPC unary call over HTTP/2 with JSON Protobuf encoding and latency stats.
blitz_sse_listen url, headers, max_events, timeout_ms Captures Server-Sent Events stream (event, data, id) from HTTP endpoint.
blitz_mqtt_publish broker_url, topic, payload, client_id Publishes a message to an MQTT broker topic with QoS 1 confirmation.
blitz_mqtt_subscribe broker_url, topic, client_id, timeout_seconds Subscribes to an MQTT topic on a broker and awaits inbound message.
blitz_graphql_ws_subscribe ws_url, query, variables, max_events, timeout_ms Executes GraphQL subscription over WebSocket protocol and streams responses.
blitz_socketio_emit url, emit_event, emit_payload, listen_event, listen_ms Connects to Socket.IO server, emits event, and captures reply events.
blitz_list_environments none Lists configured environments, active flag, and variable names.
blitz_set_env_var key, value, environment Sets or updates an environment variable directly from agent actions.
blitz_set_active_environment environment Switches active variable environment.
blitz_create_environment name, variables, set_active Creates a new environment with key-value dictionary.
blitz_delete_environment environment Deletes a named environment.
blitz_import_curl curl, collection Parses raw cURL command into an executable request.
blitz_import_har har, collection Ingests HTTP Archive (.har) JSON or file path into collection items.
blitz_sync_openapi spec, collection Non-destructively reconciles OpenAPI 3.0 spec while preserving custom tests & auth.
blitz_suggest_assertions status, headers, body, elapsed_ms Analyzes response payload and generates automated Postman test scripts.
blitz_perf_test url, method, request_id, vus, duration_seconds Runs local load benchmark with concurrent virtual users, RPS, and latency p50/p95/p99.
blitz_diff_responses body_a, body_b, request_id, env_a, env_b Calculates line-by-line diff and semantic comparison between two response payloads.
blitz_list_history limit Returns recent execution history logs.
blitz_clear_history request_id (optional) Clears request execution history globally or for a specific request.
blitz_manage_cookies action ('list'/'clear'), domain Inspects or purges persistent session cookies in Blitz's global cookie jar.
blitz_start_mock port Spins up local mock HTTP server serving collection examples.
blitz_stop_mock none Terminates the active local mock HTTP server.
blitz_generate_code language, url, method, headers, body Generates production snippets in Python, TypeScript, Rust, Go, Java, or C#.

Git Sync & Headless CI/CD Automation

Blitz treats Git as a first-class storage provider. Workspaces can be synchronized directly to GitHub, GitLab, Gitea, or self-hosted remotes without proprietary cloud intermediaries.

Team Collaboration & Git Cloud Sync Activity Git Cloud
Blitz Team Collaboration & Git Cloud Sync Activity

Headless CLI Runner (blitz run)

Execute test suites directly inside GitHub Actions, GitLab CI, or local terminals:

# Run collection with staging environment:
blitz run ./collections/api.json --env ./environments/staging.json

# Run with 10 iterations, data CSV, and JUnit report output:
blitz run ./collections/api.json -d ./test_data.csv -n 10 --reporters cli,junit --reporter-junit-export ./report.xml

Exit Codes

  • 0: All requests and assertions passed.
  • 1: One or more assertions failed or request network error occurred.