Terminal API client for HTTP/GraphQL/gRPC with support for SSH tunnels, WebSockets, SSE, Workflows, Profiling, OpenAPI, Kubernetes port-forwarding and headless
Terminal API client for HTTP/GraphQL/gRPC with support for SSH tunnels, WebSockets, SSE, Workflows, Profiling, OpenAPI, Kubernetes port-forwarding and headless
An API-as-code workbench for the terminal.
Resterm is a terminal API client that stores your requests in plain-text .http and .rest files you can diff, review and track in version control. Edit and send requests in the terminal, or run them from scripts and CI. Request files support workflows, assertions, mock servers, tracing and profiling. No accounts, cloud sync or telemetry.
Quick links: Screenshots, Quick Start, Request files, Installation, Documentation.
Workflows
Trace and Timeline
Profiler
Explain
RestermScript
Light Theme
OAuth browser demo (old UI design)
@when, @if/@elif/@else, @for-each), multi-step workflows (@workflow / @step), captures, variables and assertions (@capture, @var, @assert)..http files as requests or mock responses.Shift+k help under the cursor, / search and commands like :w, :q, :help and :docs.resterm run for scripted runs and CI, with JSON and JUnit output.Install Resterm (see Installation for scripts, Windows and manual installs).
brew install restermCreate a workspace.
mkdir my-api && cd my-api
resterm initresterm init gives you a small project that works without an internet connection. The generated requests.http includes local mock scenarios and a few requests that build on each other. They cover assertions, bearer auth, JSON matching, json-rules, and @for-each.
Open Resterm and send your first request.
restermPress Ctrl+Enter in the editor to send the highlighted request.
No files yet? Just run resterm, type a URL and press Ctrl+Enter. A pasted curl command works too.
Resterm request files use standard HTTP syntax plus # @ directives for configuration and automation:
# @setting base-url https://api.example.com/v1/
### Create users
// Send this request once for each name in the list.
# @for-each ["david", "tom"] as name
# @when env.mode == "development"
# @assert response.statusCode == 201
POST users
Content-Type: application/json
{"name":"{{= name }}"}Settings before the first request apply to the whole file. ### separates requests, and directives can repeat, limit or validate a request. More examples: _examples/.
Use resterm run to execute .http / .rest files from scripts or CI without opening the TUI.
resterm run --request CreateUser requests.httpThe generated project talks to a local mock server. Start it in another terminal first:
resterm mock requests.httpIn the TUI, press g Shift+m in normal mode to start the workspace mock server. Repeat to stop it.
The CLI documentation covers selectors, output formats and more examples.
These are the default bindings. + means hold keys together (Alt+v). A space means press them in sequence (g v: press g, release it, then press v). Letters are lowercase, and Shift is written explicitly when required (g Shift+z). Symbols such as ? and : mean type that character using your keyboard layout.
In the editor, i enters insert mode and Esc returns to normal mode. If completion is open, the first Esc dismisses it. Use normal mode for g sequences, Alt+v / Alt+h, ?, Shift+k, : and pane switching. Insert mode preserves character input, including text produced with Alt, and uses Tab for completion or indentation. Ctrl+Enter still sends requests in insert mode.
Tab / Shift+Tab: move between sidebar, editor and response.g r, g i, g p: jump to requests, editor normal mode or response.g h / g l: shrink or grow the sidebar when it is focused. Otherwise, move the editor/response divider left or right in the side-by-side layout.g j / g k: move the editor/response divider down or up when stacked, or collapse and expand branches when the navigator is focused.g v / g s: place the response beside or below the editor.g 1, g 2, g 3: minimize or restore sidebar, editor or response.g z: toggle zoom for the focused editor or response pane. g Shift+z: clear zoom.Ctrl+e: switch environments.Ctrl+g: inspect captured globals.?: open the searchable offline help index.Shift+k (editor normal mode): open help for the directive, template or keyword under the cursor.:help <topic> / :man <topic>: open an embedded topic; :docs <topic> opens the version-matched full manual.Ctrl+o: open the file/workspace popup. Type to filter, scroll with Up / Down, and use Tab to descend into directories.:: open the command line. Use Up / Down to select suggestions, Tab to complete one, or Enter to accept and run a selection. Path arguments such as :mock start --source and :edit browse the filesystem in the same popup.g e: open the current file, or the file selected in the navigator, in your external editor.Ctrl+Enter: send the active request, including from editor insert mode.Alt+v / Alt+h: split responses side by side or stack them for comparison. Repeat the same shortcut to close the split.Ctrl+Shift+c or g y (response focused): copy the whole Pretty, Raw or Headers tab.g x: show the Explain preview for the active request without sending it.[!TIP] If you only remember three shortcuts:
Ctrl+Entersends the requestTab/Shift+Tabswitches panesg pjumps to the response
Linux / macOS (Homebrew)
brew install resterm[!NOTE] Homebrew installs should be updated with Homebrew (
brew upgrade resterm). The built-inresterm --updatecommand is for binaries installed from GitHub releases or install scripts.
Linux / macOS (Shell script)
[!IMPORTANT] Pre-built Linux binaries depend on glibc 2.32 or newer. On an older distro, build from source with a newer glibc toolchain or upgrade glibc before using the release archives.
curl -fsSL https://raw.githubusercontent.com/unkn0wn-root/resterm/main/install.sh | bashor with wget:
wget -qO- https://raw.githubusercontent.com/unkn0wn-root/resterm/main/install.sh | bashWindows (PowerShell)
iwr -useb https://raw.githubusercontent.com/unkn0wn-root/resterm/main/install.ps1 | iexThe scripts detect your architecture, download the latest release and install the binary.
[!NOTE] The manual install helper uses
curlandjq. Installjqwith your package manager (brew install jq,sudo apt install jq, etc.).
Linux / macOS
# Find the latest release tag
LATEST_TAG=$(curl -fsSL https://api.github.com/repos/unkn0wn-root/resterm/releases/latest | jq -r .tag_name)
# Download the matching binary (Darwin/Linux + amd64/arm64)
curl -fL -o resterm "https://github.com/unkn0wn-root/resterm/releases/download/${LATEST_TAG}/resterm_$(uname -s)_$(uname -m)"
# Install on PATH
chmod +x resterm
sudo install -m 0755 resterm /usr/local/bin/restermWindows (PowerShell)
$latest = Invoke-RestMethod https://api.github.com/repos/unkn0wn-root/resterm/releases/latest
$asset = $latest.assets | Where-Object { $_.name -like 'resterm_Windows_*' } | Select-Object -First 1
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile resterm.exe
# Optionally move to a directory on PATH:
Move-Item resterm.exe "$env:USERPROFILE\bin\resterm.exe"go install github.com/unkn0wn-root/resterm/cmd/resterm@latestresterm --check-update
resterm --updateThe first command reports whether a newer release is available. The second downloads, verifies and installs it in place. On Windows the old binary stays next to the new one as resterm.exe.old and is cleaned up on the next update.
resterm.env.json) in the request directory, workspace root or current working directory. A file can define named environments or groups, such as api, app and credentials, that combine into one environment. Use --env-file to load dotenv files (.env, .env.*) for the current workspace. See grouped environments and the example in _examples/grouped/.RESTERM_CONFIG_DIR to use another location:~/Library/Application Support/resterm%APPDATA%\resterm~/.config/restermYou can define mock responses in the same .http files as your requests.
random, normal, or jitter.@expect or inspect received traffic from RestermScript.Two scenarios on one route:
### Payment accepted
# @mock method=POST path=/payments name=accepted default=true latency=150ms
HTTP/1.1 202 Accepted
Content-Type: application/json
{"id":"pay_123","status":"pending"}
### Payment declined
# @mock method=POST path=/payments name=declined
# @match query={"mode":"decline"} headers={"X-Tenant":"demo"} json={"amount":0}
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
{"error":"amount must be positive"}Serve one file or a whole directory:
resterm mock ./requests.http
resterm mock --recursive --addr 127.0.0.1:9090 ./requestsMore in the Mock Servers reference, the resterm mock CLI guide and the working example.
You can record your API traffic or other HTTP traffic and save it as requests or mock responses in a Resterm .http file.
resNo open issues yet, or sync has not completed.