Skip to content

hars-21/reqsh

reqsh

Platform Rust License Status PRs Welcome

Interactive HTTP shell for API workflows. Send HTTP requests, manage headers and base URLs, and rerun past commands from a terminal REPL.

Features

  • Interactive REPL with tab completion
  • Send GET, POST, PUT, PATCH, DELETE requests (case-insensitive)
  • Multi-line request input for custom headers and body
  • Persistent session state (base URL, global headers, variables)
  • Variable interpolation with {{name}} syntax in paths, headers, and body
  • Query parameter support with param: key=value lines
  • Save and run requests in-session
  • Response time displayed per request
  • Full absolute URL support (base URL not required)
  • JSON response pretty-printing
  • Command history and rerun by index
  • Colored terminal output

Installation

Install script

curl -fsSL https://raw.githubusercontent.com/hars-21/reqsh/main/install.sh | sh

Pre-built binary

Download the latest binary for your platform from the releases page. macOS (Intel & Silicon), Linux (x86_64), and Windows (x86_64) are available.

Build from source

git clone https://github.com/hars-21/reqsh.git
cd reqsh
cargo build --release

The binary will be at target/release/reqsh.

Usage

CLI Options:

reqsh --help
reqsh --version

Start the REPL:

reqsh

Set a base URL (optional — you can use absolute URLs directly):

reqsh> base https://api.example.com

Send a GET request (relative path requires a base URL):

reqsh> GET /users

Or use an absolute URL directly:

reqsh> GET https://jsonplaceholder.typicode.com/posts

Send a POST request with headers and body:

reqsh> POST /users
.....> Content-Type: application/json
.....> Authorization: Bearer token123
.....>
.....> {"name": "john"}
.....> ::send

Commands

Command Description
GET <url> Send GET request
POST <url> Send POST request
PUT <url> Send PUT request
PATCH <url> Send PATCH request
DELETE <url> Send DELETE request
base <url> Set base URL for all requests
header <key> <value> Set a global header for all requests
set <name> <value> Set a session variable
unset <name> Remove a session variable
unset header <key> Remove a global header
save <name> Save the last request to memory
run <name> Execute a saved request
requests List saved requests
vars List session variables
headers List global headers
history Show command history
rerun <index> Re-run a command from history
help Show built-in help
exit Exit the REPL

Multi-line requests

When you type a method and path, the REPL enters multi-line mode (.....>). You can add headers as key: value pairs, followed by a blank line and the request body. End with ::send on its own line.

Query parameters can be added with param: lines:

reqsh> GET /users
.....> param: page=1
.....> param: limit=20
.....> ::send

Variables set with set are interpolated at request time using {{name}}:

reqsh> set token eyJhbGciOiJIUzI1NiJ9
reqsh> GET /users/{{token}}
.....> Authorization: Bearer {{token}}
.....> ::send

Contributing

Contributions are welcome. Please read CONTRIBUTING.md for guidelines on how to set up the project, run tests, and submit changes.

License

MIT. See LICENSE for details.

About

Interactive, persistent shell for HTTP requests. Built with Rust for ultimate speed and simplicity.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors