TReq
A Terminal Request HTTP Client.
TReq is a user-friendly Command Line Interface (CLI) HTTP client, designed to be simple and a complete CLI tool to interact with APIs
[!NOTE] TReq, short for Terminal Request, is a user-friendly Command Line Interface (CLI) HTTP client that goes beyond the stateless nature of typical CLI HTTP clients. It's designed to offer a complete tool for interacting with APIs in the terminal.
While traditional CLI HTTP clients excel at quick tasks and small tests, TReq aims to bridge the gap by introducing statefulness, allowing users to store, handle, edit, view, and inspect requests seamlessly, all within the terminal.
Inspired by HTTPie, TReq seeks to implement and extend its main features, making the experience of making HTTP calls in the terminal as simple as possible, without the need for extensive graphical tools.
Features
- Made to APIs and REST: TReq is tailored for working with APIs, REST, and JSON with minimal effort.
- HTTPie based: The CLI interface is entirely based on HTTPie, ensuring familiarity for existing users.
- Easy payload generation : Quickly declare fields for the payload with user-friendly syntax.
- Persistent Request Storage: Save and edit frequently used requests with simple commands. View details of stored requests.
- Pretty Outputs: The UX is relevant in a CLI.
Installation
Linux
Go to last release page and install the right binary for your OS.
For most Linux distributions, treq.bin binary can work as expected. You can download it from here and copy to /usr/local/bin/. As the TReq has no many dependecies it should work on most part of the systems.
cp treq.bin /usr/local/bin/treq
Cargo
For any OS, the best way to install TReq is using cargo
Install cargo using rustup and then...
Usage
For more detailed information on commands and options, refer to the built-in help:
Basic GET request
Requests with additional data
# POST request with custom Content-Type header
# POST request passing a JSON object { "language": "Rust", "food": "pizza" }
Saving and storing requests
# After requesting you can save it to do the same request later
# You can also edit the fields and insert new datas in each submit
# Or save it as a new request
Contributing
Contributions and feature requests are welcome! Feel free to submit issues or pull requests on our GitHub repository.
Upcoming features
- TUI view like https://github.com/talis-fb/legacy_treq
- Enviroment Variables in Request payloads (like {{ .env.ENV_NAME }})