Skip to content

Commands

Beyond standard HTTP methods (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS), reqsh provides specific REPL commands to manage your session.

Command Reference

CommandUsageDescription
basebase <url>Set the global base URL for the session.
headerheader <key> <value>Add a persistent header applied to all requests.
setset <name> <value>Store a variable for interpolation.
unsetunset <name>Remove a variable.
unset headerunset header <key>Remove a global header.
savesave <name>Save the last executed request to memory.
runrun <name>Execute a saved request.
varsvarsList all session variables.
headersheadersList all global headers.
requestsrequestsList all saved requests.
historyhistoryView the numbered history of past commands.
rerunrerun <id>Instantly re-execute a request from history.
timeouttimeout <seconds>Set the request timeout for the session.
clearclearReset the entire session state (base URL, headers, variables, saved requests).
helphelpDisplay syntax and command documentation.
exitexitTerminate the shell session.

Session Management

Save and Run

Save any request after executing it, then replay it instantly.

reqsh
1
reqsh> GET /users/{{id}}
2
.....> ::send
3
reqsh> save get-user
4
saved
5
reqsh> run get-user

History

View all commands executed in the current session.

reqsh
1
reqsh> history
2
1: base https://api.example.com
3
2: header Authorization Bearer sk_test
4
3: GET /users

Rerun

Re-execute a command from history by its ID.

reqsh
1
reqsh> rerun 3

Variables

Set and Use

Store values and reference them with {{name}} syntax.

reqsh
1
reqsh> set token eyJhbGciOiJIUzI1NiJ9
2
reqsh> GET /users/{{token}}
3
.....> ::send

List and Remove

reqsh
1
reqsh> vars
2
reqsh> unset token

Timeout

Set a request timeout for all requests in the session.

reqsh
1
reqsh> timeout 10
2
Request timeout set to 10 seconds

Clear

Reset the entire session, base URL, headers, variables and saved requests.

reqsh
1
reqsh> clear
2
Session cleared

Help

Display the built-in help with all available commands and syntax.

reqsh
1
reqsh> help