Hyrapi is a CLI-based REST API client powered by a YAML collection file. It's designed to simplify making HTTP requests by organizing endpoints, headers, tokens, and parameters in a single configuration file.
You can install hyr in two ways:
git clone https://github.com/hwisnu222/hyrapi.git
cd hyrapi
make build
cd dist/
chmod +x hyr
sudo mv hyr /usr/local/bin/curl -fsSL https://raw.githubusercontent.com/hwisnu222/hyrapi/main/install.sh | shTo use hyrapi, you need to provide a YAML collection file:
hyr -c collections.ymlservers:
- url: http://localhost:3000/api/v1
name: development
description: development server
- url: http://example.com/api/v1
name: staging
description: staging server
- url: http://example.com/api/v1
name: production
description: production server
variables:
global_variable: value
development:
token: value
staging:
token: value
production:
token: value
paths:
- endpoint: /incomes
name: getIncomes
method: GET
auth:
type: bearer
token: "{{token}}"
headers:
Content-Type: application/json
- endpoint: /incomes/4
name: deleteIncomes
method: DELETE
auth:
type: bearer
token: "{{token}}"
headers:
Content-Type: application/jsonDefines base URLs for your API. You can use multiple environments (dev, staging, prod).
Declare reusable variables like tokens, API keys, etc.
List of API requests:
endpoint: the path to the API routename: a label to identify this requestmethod: HTTP method (GET,POST,PUT,DELETE, etc.)auth: authentication configurationtype:bearer(currently supported)token: value or reference using{{variable}}
headers: optional headers to send with the request
The auth section allows you to configure how each request is authenticated. Below are the supported types and their configuration:
auth:
type: bearer
token: "{{token}}"Sends an Authorization: Bearer <token> header.
auth:
type: basic
username: admin
password: secretSends an Authorization: Basic <base64-encoded-credentials> header.
auth:
type: apikey
api_key: abc123
api_key_header: X-API-KeySends X-API-Key: abc123 in the request header. The header name can be customized using api_key_header.
auth:
type: digest
username: admin
password: secretSupports HTTP Digest Authentication.
- YAML-based API collection
- Built-in support for Bearer Token authentication
- Easily switch between environments
- CLI interface for fast request execution
- Support for:
basicandcustomauth types- Request body for
POST,PUT,PATCH - Path parameters and query strings
- Response highlighting
- Response time and size display
- Collection management (similar to Postman)
- Output formatting (JSON / Table / Raw)
Hyrapi by @hwisnu222
Contributions and feedback are welcome!

