Skip to content

hars-21/reqsh

Repository files navigation

reqsh

Last Update Rust License Status

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, DELETE requests
  • Multi-line request input for custom headers and body
  • Persistent session state (base URL, global headers)
  • 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 from the releases page.

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:

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

Send a GET request:

reqsh> GET /users

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 <path> Send GET request
POST <path> Send POST request
PUT <path> Send PUT request
DELETE <path> Send DELETE request
base <url> Set base URL for all requests
header <key> <value> Set a global header for all requests
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.

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

Contributing

Stars

Watchers

Forks

Contributors