>_ RESTERM
v1.10.2
resterm.md

docs Getting started

Quick start

Write a first request file, send it, and bootstrap a project with resterm init.

  1. Place one or more .http or .rest files in a working directory (or use the samples under _examples/).
  2. Run resterm --workspace path/to/project.
  3. Use the navigator sidebar to expand a file (→ or Space), highlight a request, and press Ctrl+Enter to send it (Enter runs, Space previews).
  4. Inspect responses in the Pretty, Raw, Headers, Diff, Compare, or History tabs on the right; press g+c to run the current request across the global --compare target list (or its inline @compare directive) and review the results without leaving the editor.

A minimal .http file looks like this:

http
### Fetch Status
# @name health
GET https://httpbin.org/status/204
User-Agent: resterm
Accept: application/json

### Create Resource
# @name create
POST https://httpbin.org/anything
Content-Type: application/json

{
  "id": "{{$uuid}}",
  "note": "created from Resterm"
}

Initializing a Project

The resterm init command creates a starter set of files in a directory so you can begin working with requests immediately.

shell
mkdir my-api && cd my-api
resterm init

This writes files based on the selected template. Two templates are available:

Template Files created
standard (default) requests.http, resterm.env.json, resterm.env.example.json, rts/helpers.rts, RESTERM.md
minimal requests.http, resterm.env.json

Both templates add resterm.env.json to .gitignore so secrets stay out of version control. If you prefer to manage .gitignore yourself, pass --no-gitignore.

Flags

Flag Description
-dir <path> Target directory. You can also pass the path as a positional argument, but not both.
-template <name> Template to use (standard or minimal).
-force Overwrite existing files instead of aborting. If any file cannot be written, no files are changed.
-dry-run Print actions without writing anything.
-no-gitignore Skip updating .gitignore.
-list Print available templates and exit.

Examples

shell
# Create files in a subdirectory
resterm init ./api-tests

# Use the minimal template
resterm init --template minimal

# Preview what would be created
resterm init --dry-run

# Overwrite existing files
resterm init --force

Once the files are in place, run resterm in the same directory. Press g Shift+M to start the local mock server, then use Ctrl+Enter to try the sample requests. Press Ctrl+E if you want to switch between the local dev and test environments.

Search

↑↓ moveEnter openEsc close

Help

These keys work like the ones in the TUI.

/
Search the docs (also Ctrl K)
j k
Scroll down and up
g g G
Jump to the top or the bottom
[ ]
Previous and next docs page
g d
Docs index
g h
Home page
t
Switch between dark and light
?
Show this help
Esc
Close a dialog