restclient is a command-line HTTP client inspired by the VS Code REST Client extension. It lets you send requests directly from .http and .rest files, manage session-scoped environments, run scripts, and replay request history from the terminal.
- Parse and execute requests from
.httpand.restfiles - Interactive fuzzy-search selector for multi-request files and history replay
- JavaScript scripting for pre-request setup, post-response tests, and chaining requests
- Postman Collection v2.1.0 import/export
- Session-scoped environments, cookies, and script variables
- File variables,
.envsupport, system variables, and user input variables - Streaming multipart/form-data uploads and file uploads
- GraphQL support (queries, mutations, subscriptions)
- Basic, Digest, and AWS Signature v4 authentication
- PEM client certificates for mutual TLS (mTLS)
- TLS and proxy configuration per session
- Request history with replay
- Colored output with JSON/XML formatting and configurable default preview mode
- Shell completion for bash, zsh, fish, and PowerShell
- Commands - Usage of
send,env,history,session,completion,postman - HTTP File Format - Syntax guide, request metadata, query params, form data, GraphQL
- Variables - File, environment, system, and user input variables
- Scripting - Pre-request/post-response scripts, API reference, utility functions
- Authentication - Basic, Digest, AWS Signature v4
- Configuration - Global config, session config, TLS, proxy, client certificates
- Troubleshooting - Common errors and solutions
brew tap ideaspaper/tap
brew install --cask restclientgo install github.com/ideaspaper/restclient@latestgit clone https://github.com/ideaspaper/restclient.git
cd restclient
go build -o restclient .-
Create a request file (
api.http):@baseUrl = https://api.example.com ### Get users # @name getUsers GET {{baseUrl}}/users Authorization: Bearer {{token}} ### Create user # @name createUser POST {{baseUrl}}/users Content-Type: application/json { "name": "John Doe" }
-
Send a request:
# Interactive selection restclient send api.http # Send by name restclient send api.http --name getUsers # Show only headers for this run restclient send api.http --headers
restclient separates configuration into two layers:
- Global config:
~/.restclient/config.json- CLI display preferences such as
previewOptionandshowColors
- CLI display preferences such as
- Session config:
~/.restclient/session/<kind>/<id>/config.json- HTTP behavior such as timeouts, TLS, proxy, default headers, environments, and client certificates
Session state is stored alongside the session config, including:
environments.jsoncookies.jsonvariables.json
Persisted local state under ~/.restclient/ is stored with owner-only permissions.
For full details and examples, see docs/configuration.md.
MIT License - see LICENSE file for details.