restman: Web request TUI program.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

A Brick-based TUI HTTP client powered by wreq. restman lets you compose and send HTTP requests from the terminal, with support for custom methods, headers, and inline syntax-highlighted response rendering via Skylighting.


[Skip to Readme]

Properties

Versions 0.7.1.1, 0.7.1.2, 0.7.2.0, 0.7.2.1, 0.7.2.2, 0.7.3.0, 0.7.3.1, 0.7.4.0, 0.7.5.0, 0.7.5.1, 0.7.6.0, 0.7.7.0
Change log CHANGELOG.md
Dependencies aeson (>=2.2.5.0 && <2.3), aeson-pretty (>=0.8.11 && <0.9), ansi-terminal-types (>=1.1.3 && <1.2), base (>=4.7 && <5), binary (>=0.8.9.3 && <0.9), brick (>=2.9 && <2.10), bytestring (>=0.12.2.0 && <0.13), case-insensitive (>=1.2.1.0 && <1.3), containers (>=0.7 && <0.8), http-client (>=0.7.19 && <0.8), http-client-tls (>=0.3.6.4 && <0.4), http-types (>=0.12.5 && <0.13), lens (>=5.3.6 && <5.4), microlens (>=0.4.14.0 && <0.5), microlens-mtl (>=0.2.1.0 && <0.3), mime-types (>=0.1.2.2 && <0.2), mtl (>=2.3.1 && <2.4), optparse-applicative (>=0.18.1.0 && <0.19), restman, skylighting (>=0.14.7 && <0.15), text (>=2.1.3 && <2.2), text-zipper (>=0.13 && <0.14), time (>=1.12.2 && <1.13), unliftio (>=0.2.25.1 && <0.3), utf8-string (>=1.0.2 && <1.1), vector (>=0.13.2.0 && <0.14), vty (>=6.4 && <6.5), wai (>=3.2.4 && <3.3), warp (>=3.4.9 && <3.5), wreq (>=0.5.4.4 && <0.6) [details]
License BSD-2-Clause
Copyright Zac Slade or Boyd Stephen Smith Jr, 2024
Author Zac Slade
Maintainer krakrjak@gmail.com, boyd.stephen.smith.jr@gmail.com
Category Web
Home page https://gitlab.com/krakrjak/restman#readme
Bug tracker https://gitlab.com/krakrjak/restman/issues
Source repo head: git clone https://gitlab.com/krakrjak/restman
Uploaded by krakrjak at 2026-08-01T18:56:48Z

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
echo-server

Build the standalone restman-echo diagnostic server

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for restman-0.7.7.0

[back to package description]

pipeline status Latest Release License: BSD2

RESTMan

RESTMan is a keyboard-driven TUI HTTP client for the terminal. Compose and send HTTP(S) requests interactively — or script one-shot requests from the command line — without leaving your shell.

[[TOC]]


Features


TUI Preview

   Header(s)           Payload              Session           Help
================================================================================
 ╭── Verb ──╮ ╭─────────────────── URL to Query? ──────────────────────────╮
 │  GET    ▼│ │ https://api.example.com/v1/items                           │
 ╰──────────╯ ╰────────────────────────────────────────────────────────────╯
 ╭──────────────────────────────────────────────────────────────────────────╮
 │ [X] Use Default Headers                                                  │
 │  ┌──────────────────────────────────────────────────────────────────┐   │
 │  │ Accept-Encoding: gzip, deflate, br                               │   │
 │  │ User-Agent: Haskell wreq-0.5.4.1/0.0.0.0                        │   │
 │  └──────────────────────────────────────────────────────────────────┘   │
 ╰──────────────────────────────────────────────────────────────────────────╯
 ╭─ Active ──╮╭────────────── Name ─────────────╮╭──────── Value ───────────╮
 │    [X]    ││ Authorization                   ││ Bearer my-token           │
 │    [ ]    ││ X-Request-ID                    ││ deadbeef-cafe             │
 ╰───────────╯╰─────────────────────────────────╯╰───────────────────────────╯
 [+ Add Custom Header]
 ╭────────────────────────── Response Body ──────────────────────────────╮▲
 │ {                                                                     │ │
 │   "items": [                                                          │▓│
 │     { "id": 1, "name": "widget" }                                    │ │
 │   ]                                                                   │▼│
 ╰───────────────────────────────────────────────────────────────────────╯◄▓►

Platform Support

Platform Status
Linux ✓ Fully supported
macOS — Intel ✓ Supported
macOS — Apple Silicon (M1 / M2 / M3) ✓ Supported (requires llvm, see below)
Windows via WSL2 + Debian ✓ Supported — recommended Windows path
Windows native ⚠ Experimental — supported since Brick 2.0 / vty 6.0 via vty-windows, but builds have been unreliable; see Known Limitations

Prerequisites

Tool Version Notes
GHC 9.10.x Managed automatically by Stack
Stack any recent Primary build tool
llvm macOS Apple Silicon onlybrew install llvm

Stack will download and configure the correct GHC version (via Stackage LTS 24.38) on first run.


Quick Start

# 1. Clone the repository
git clone https://gitlab.com/krakrjak/restman.git
cd restman

# 2. Set up the compiler (once — downloads GHC 9.10.x if needed)
stack setup

# 3. Build RESTMan and all dependencies
stack build

# 4. Launch the TUI
stack exec restman

First build resolves and compiles all Haskell dependencies, which can take several minutes.


Installation

To install the restman binary to ~/.local/bin:

stack install

Add ~/.local/bin to your PATH so you can run restman directly:

# Add to ~/.bashrc, ~/.zshrc, etc.
export PATH="$HOME/.local/bin:$PATH"

RESTMan is also listed on Hackage as a package reference.


Usage

Modes of Operation

Mode How to invoke Description
Interactive TUI restman Full-screen TUI — compose and send requests interactively
Quick Request restman URI TUI launches with URI pre-filled; request fires immediately
Oneshot restman --oneshot URI Prints response body to stdout and exits — no TUI

Command-line Reference

Usage: restman [--help] [-m|--method METHOD]
                   [--no-default-headers | --default-headers]
                   [-h|--custom-header NAME_VALUE]
                   [--payload PAYLOAD | --payload-file PATHNAME]
                   [--oneshot] [URI]
Flag Short Default Description
--help Show help and exit
--method METHOD -m GET HTTP method / verb
--no-default-headers off Send only custom headers (suppress wreq defaults)
--default-headers on Append custom headers after wreq defaults
--custom-header NAME_VALUE -h Add a Name:Value header (repeatable)
--payload PAYLOAD Inline request body (UTF-8)
--payload-file PATHNAME Load request body from a file
URI Target URL (positional, optional)
--oneshot off Non-interactive one-shot mode (requires URI)

--custom-header format: Name:Value — the first colon separates the header name from its value. The flag may be repeated to supply multiple headers.

Examples

# Open the TUI (no arguments)
restman

# Open the TUI pre-loaded with a URL (request fires immediately)
restman https://httpbin.org/get

# One-shot GET — print the response body to stdout
restman --oneshot https://httpbin.org/get

# One-shot POST with a JSON payload
restman --oneshot -m POST \
  -h 'Content-Type:application/json' \
  --payload '{"key":"value"}' \
  https://httpbin.org/post

# PUT with a binary payload file, suppressing default headers
restman -m PUT \
  --no-default-headers \
  -h 'Content-Type:application/octet-stream' \
  --payload-file ./data.bin \
  https://example.com/upload

TUI Keybindings

Global

Key Action
Esc / Ctrl+Q Quit RESTMan
Tab Move focus to the next widget
Shift+Tab Move focus to the previous widget
Enter (URL editor focused) Send the HTTP request

Method Selector Popup

Key Action
(on Method field) Open the method selector popup
/ Navigate the method list
Enter Confirm selection and close the popup
Esc Close the popup without changing the method

Custom Headers

Key Action
Space on [+ Add Custom Header] Add a new empty header row
Space on a header checkbox Enable / disable that header
Tab into a Name or Value cell Begin editing the cell
/ Scroll cell content horizontally

Default Headers Toggle

Key Action
Tab to [X] Use Default Headers Move focus to the toggle
Space Toggle default headers on / off

Response Viewport

Key Action
/ j Scroll down one line
/ k Scroll up one line
/ l Scroll right one column
/ h Scroll left one column
Page Down Scroll down one page
Page Up Scroll up one page
Mouse scroll Scroll three lines up / down

Building from Source

Linux / Debian (and Windows WSL2)

Install the required system packages:

apt install haskell-stack libtinfo-dev libz1g-dev

Upgrade to the latest Stack release, then set up the compiler and build:

stack upgrade          # may prompt for sudo
stack setup            # downloads GHC 9.10.x
stack build

macOS — Intel

stack setup
stack build

macOS — Apple Silicon (M1 / M2 / M3)

Install ghcup and LLVM:

brew install llvm

Export the LLVM paths (add these to your shell profile):

export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"

Then build with the aarch64 target:

stack --arch aarch64 --system-ghc build

Windows

WSL2 (recommended): Use WSL2 with a Debian distribution and follow the Linux / Debian steps above.

Windows native (experimental): Native Windows support was introduced in vty 6.0 / Brick 2.0 via vty-windows, which RESTMan picks up transitively through Brick. However, vty-windows has a tightly pinned Win32 dependency and build failures have been reported. If you want to attempt a native build, install GHCup for Windows, then:

stack setup
stack build

Please report any success or failure in the issue tracker.


Running Tests

stack test

The test suite uses Tasty with HUnit unit tests, Hedgehog property tests, and an in-process HTTP echo server for integration tests.


Known Limitations


Contributing

Bug reports and feature requests: gitlab.com/krakrjak/restman/issues

Before submitting a merge request, please ensure:


License

BSD 2-Clause — © Zac Slade, Boyd Stephen Smith Jr.