reqo is a friendly HTTP client that groups requests into projects, supports environments, reusable header sets and saved aliases. Think of it as curl, but with project organization and saved calls.
- 🗂️ Project-based organization - Group related API calls into projects
- 🌍 Environment management - Switch between dev, staging, production environments
- 📋 Header sets - Reusable header configurations (auth tokens, API keys, etc.)
- 💾 Saved calls - Create aliases for frequently used requests
- 🔧 Ad-hoc requests - Make one-off requests without saving
- 🐚 Curl export - Generate equivalent curl commands
- 📝 Template variables - Use
${var}syntax for dynamic values - 🎨 Pretty output - Automatic JSON formatting and colored output
git clone https://github.com/suprbdev/reqo.git
cd reqo
make build # Build for current platform
# or
make dev # Build for development (current directory)go install github.com/suprbdev/reqo/cmd/reqo@latest # Install to home from GitHub
make install # Install to GOBIN or GOPATH/bin
make install-system # Install to /usr/local/bin (requires sudo)make build-all # Build for all platforms (Linux, macOS, Windows)
make build-linux # Build for Linux
make build-darwin # Build for macOS (Intel + Apple Silicon)
make build-windows # Build for Windowsmake dev-setup # Setup development environment (tidy, fmt, lint)
make test # Run tests
make test-coverage # Run tests with coverage report
make lint # Run linter
make fmt # Format code
make tidy # Tidy dependencies
make clean # Clean build artifacts
make help # Show all available targets-
Build and install reqo:
git clone https://github.com/suprbdev/reqo.git cd reqo make build && make install
-
Initialize a project:
reqo init my-api
-
Add an environment:
reqo env add prod --base-url https://api.example.com
-
Create a saved call:
reqo call create get-users GET /users
-
Execute the call:
reqo call run get-users --env prod
-
Make an ad-hoc request:
reqo req GET https://httpbin.org/get
Create a new reqo project.
reqo init my-api # Local project
reqo init my-api --global # Global project (~/.reqo/projects/)Set the active project for the current directory.
reqo use my-apiAdd a new environment to the current project.
reqo env add dev --base-url https://dev-api.example.com
reqo env add prod --base-url https://api.example.comList all environments in the current project.
reqo env listCreate or update a header set.
reqo header set --name auth "Authorization: Bearer token123"
reqo header set --name api "X-API-Key: abc123" "Content-Type: application/json"List all header sets.
reqo header listRemove a header set.
reqo header rm authCreate a saved call (alias).
reqo call create get-users GET /users
reqo call create create-user POST /users --use-headers auth
reqo call create update-user PUT /users/${id} --desc "Update user by ID"
# Use @ for base URL only (useful for GraphQL APIs)
reqo call create graphql-query POST @ --json '{"query": "${query}"}'
# Save calls with request payloads
reqo call create create-user POST /users --json '{"name": "${name}", "email": "${email}"}'
reqo call create upload-file POST /upload --form "file=@${file_path}" --form "description=${desc}"
reqo call create update-config PUT /config --data '{"setting": "${value}"}'List all saved calls in the current project.
reqo call listRemove a saved call.
reqo call rm old-callExecute a saved call with optional overrides. You can also omit run and use the shorthand form.
reqo call get-users
reqo call get-users --env prod
reqo call run get-users --header "X-Custom: value"
reqo call run get-users --var id=123
reqo call run get-users --as-curl
# Run calls with saved payloads and variable expansion
reqo call run create-user --var name="John Doe" --var email="john@example.com"
reqo call run upload-file --var file_path="/path/to/file.txt" --var desc="My file"
reqo call run update-config --var value="production"Make an ad-hoc HTTP request without saving.
reqo req GET https://httpbin.org/get
reqo req POST /users --json '{"name": "John"}'
reqo req PUT /users/123 --data '{"name": "Jane"}'Set a global configuration value.
reqo config set default_timeout 60Get a global configuration value.
reqo config get default_timeoutWhen you run reqo init, it creates a .reqo/ directory with:
.reqo/
├── project.yaml # Project configuration
└── current # Active project name
version: 1
name: my-api
default_env: dev
environments:
dev:
base_url: https://dev-api.example.com
prod:
base_url: https://api.example.com
header_sets:
auth:
- "Authorization: Bearer ${TOKEN}"
api:
- "X-API-Key: ${API_KEY}"
- "Content-Type: application/json"
calls:
get-users:
method: GET
path: /users
uses_header_set: auth
description: "Get all users"
create-user:
method: POST
path: /users
uses_header_set: api
body:
json: '{"name": "${name}", "email": "${email}"}'
description: "Create a new user"
upload-file:
method: POST
path: /upload
uses_header_set: api
body:
form:
file: "@${file_path}"
description: "${desc}"
description: "Upload a file"
graphql-query:
method: POST
path: "@"
uses_header_set: api
body:
json: '{"query": "${query}", "variables": "${variables}"}'
description: "GraphQL query"Use ${variable} syntax for dynamic values:
- Command-line variables:
--var key=value - Environment variables:
${REQO_TOKEN},${REQO_USER}, etc. (falls back to${TOKEN},${USER}ifREQO_version is not set) - Project variables: (future feature)
reqo run get-user --var id=123
reqo req GET /users/${USER_ID}For APIs that use a single endpoint (like GraphQL), use @ as the path to use just the base URL:
# GraphQL API example
reqo call create graphql-query POST @ --json '{"query": "${query}", "variables": "${variables}"}'
reqo call run graphql-query --var query="query { users { name } }"You can save request payloads (JSON, raw data, or form fields) with your saved calls:
# Save a call with JSON payload
reqo call create create-user POST /users --json '{"name": "${name}", "email": "${email}"}'
# Save a call with raw data payload
reqo call create update-config PUT /config --data '{"setting": "${value}"}'
# Save a call with form data
reqo call create upload-file POST /upload --form "file=@${file_path}" --form "description=${desc}"When running saved calls, variables in payloads are automatically expanded:
# The saved JSON payload will have variables replaced
reqo call run create-user --var name="John Doe" --var email="john@example.com"
# Results in: {"name": "John Doe", "email": "john@example.com"}
# Form fields with variables
reqo call run upload-file --var file_path="/path/to/file.txt" --var desc="My file"
# Results in: file=@/path/to/file.txt, description=My file
# Variables in JSON files are also expanded
reqo call run create-user --json @user-template.json --var name="Jane" --var email="jane@example.com"
# If user-template.json contains: {"name": "${name}", "email": "${email}"}
# Results in: {"name": "Jane", "email": "jane@example.com"}Command-line flags always override saved payloads:
# This will use the command-line JSON instead of the saved one
reqo call run create-user --json '{"name": "Override", "email": "override@example.com"}'--json <data|@file>- JSON request body (variables in files are expanded)--data <data|@file>- Raw request body (variables in files are expanded)--form <key=value>- Multipart form data
--header "Key: Value"- Add headers--query "key=value"- Add query parameters--env <name>- Use specific environment (defaults toREQO_ENVif set)--timeout <seconds>- Request timeout (default: 30)--retries <count>- Retry count (default: 0)
--include/-i- Show response headers--raw- Raw response body (no formatting)--as-curl- Print equivalent curl command
# 1. Initialize project
reqo init my-api
# 2. Add environments
reqo env add dev --base-url https://dev-api.example.com
reqo env add prod --base-url https://api.example.com
# 3. Set up authentication
reqo header set --name auth "Authorization: Bearer ${API_TOKEN}"
# 4. Create saved calls
reqo call create list-users GET /users --use-headers auth
reqo call create create-user POST /users --use-headers auth --json '{"name": "${name}", "email": "${email}"}'
reqo call create get-user GET /users/${id} --use-headers auth
# 5. Test the API
reqo call run list-users --env dev
reqo call run create-user --env dev --var name="John" --var email="john@example.com"
reqo call run get-user --env dev --var id=123
# 6. Generate curl for debugging
reqo call run list-users --env prod --as-curl# Test external APIs
reqo req GET https://httpbin.org/get
reqo req POST https://httpbin.org/post --json '{"test": "data"}'
# Test with custom headers
reqo req GET https://api.github.com/user --header "Authorization: token ${GITHUB_TOKEN}"
# Test with form data
reqo req POST https://httpbin.org/post --form "name=John" --form "email=john@example.com"Global configuration is stored in ~/.reqo/config.yaml:
default_timeout: 60
default_retries: 3The project includes a comprehensive Makefile with the following targets:
make build- Build binary for current platformmake dev- Build binary for development (current directory)make build-all- Build for all platforms (Linux, macOS, Windows)make build-linux- Build for Linux (amd64)make build-darwin- Build for macOS (Intel + Apple Silicon)make build-windows- Build for Windows (amd64)
make install- Install to GOBIN or GOPATH/binmake install-system- Install to /usr/local/bin (requires sudo)
make test- Run testsmake test-coverage- Run tests with coverage reportmake bench- Run benchmarksmake lint- Run linter (golangci-lint or go vet)make fmt- Format code (go fmt + goimports)make tidy- Tidy dependenciesmake clean- Clean build artifacts
make dev-setup- Setup development environment (tidy, fmt, lint)make release-prep- Prepare for release (clean, test, lint, build-all)make run- Build and run the applicationmake help- Show all available targets
You can customize the build with these variables:
make build BINARY_NAME=my-reqo BUILD_DIR=distAvailable variables:
BINARY_NAME- Name of the binary (default: reqo)BUILD_DIR- Build directory (default: build)VERSION- Version from git tags (default: dev)
The makefile automatically detects your Go environment:
- Uses
GOBINif set, otherwise falls back toGOPATH/bin - Uses
go envto get current Go settings
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Setup development environment:
make dev-setup - Make your changes
- Run tests:
make test - Run linter:
make lint - Format code:
make fmt - Add tests if applicable
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Submit a pull request
- Go 1.22 or later
- Git
- Make (optional, for using the Makefile)
For enhanced development experience, install these tools:
# Linter
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Code formatting
go install golang.org/x/tools/cmd/goimports@latestThis project is licensed under the MIT License - see the LICENSE file for details.