A powerful HTTP CLI that supports .http files, variables, and multiple authentication methods
Project description
httpgo
A powerful HTTP command-line tool that supports .http files, inspired by httpie.
Built with Typer for a great CLI experience.
Features
- 📁
.httpfile support - Parse and execute requests from.http/.restfiles (VS Code REST Client format) - 🔄 Multiple requests - Execute single or all requests from a file
- 📝 Variables - Support for file variables, environment variables, and dynamic variables
- 🔐 Authentication - Basic, Bearer, API Key, and Digest authentication
- 🎨 Beautiful output - Colorized, httpie-style output with syntax highlighting
- ⚡ Fast - Built on httpx for high performance
- 🐚 Shell completion - Auto-completion for Bash, Zsh, Fish, and PowerShell
Installation
# Install with pip
pip install -e .
# Or using uv
uv pip install -e .
Usage
Running .http files
# Run first request in file
httpgo run api.http
# Run all requests
httpgo run api.http --all
# Run specific request by name
httpgo run api.http --name "Get User"
# Run specific request by index
httpgo run api.http --index 2
# With variables
httpgo run api.http -v baseUrl=http://localhost:3000 -v token=abc123
# With environment file
httpgo run api.http --env .env.local
Direct HTTP requests (httpie-style)
# GET request
httpgo get https://httpbin.org/get
# POST with JSON data
httpgo post https://httpbin.org/post name=John age:=30
# POST with form data
httpgo post https://httpbin.org/post --form name=John email=john@example.com
# With headers
httpgo get https://api.example.com/data -H "Authorization: Bearer token123"
# With authentication
httpgo get https://api.example.com/data -a user:password
httpgo get https://api.example.com/data -a mytoken --auth-type bearer
List requests in a file
httpgo list api.http
.http File Format
# Variables
@baseUrl = https://api.example.com
@token = your-api-token
### Get all users
GET {{baseUrl}}/users
Authorization: Bearer {{token}}
### Create a user
POST {{baseUrl}}/users
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "John Doe",
"email": "john@example.com"
}
### Get user by ID
GET {{baseUrl}}/users/{{$uuid}}
Variable Types
- File Variables: Defined with
@name = value - Environment Variables: From system environment or
.envfile - Dynamic Variables:
{{$uuid}}/{{$guid}}- Random UUID{{$timestamp}}- Unix timestamp{{$isoTimestamp}}- ISO 8601 timestamp{{$randomInt}}- Random integer (0-1000){{$randomString}}- Random 10-character string
Environment Files
httpgo supports http-client.env.json (VS Code REST Client format):
{
"$shared": {
"apiVersion": "v1"
},
"dev": {
"baseUrl": "http://localhost:3000",
"token": "dev-token"
},
"prod": {
"baseUrl": "https://api.example.com",
"token": "prod-token"
}
}
Output Options
# Verbose mode (show request details)
httpgo run api.http --verbose
# Quiet mode (only show response body)
httpgo run api.http --quiet
# Show only headers
httpgo run api.http --headers
# Show only body
httpgo run api.http --body
# Disable colors
httpgo run api.http --no-color
Authentication
Basic Auth
GET https://api.example.com/data
Authorization: Basic dXNlcjpwYXNz
Or via CLI:
httpgo get https://api.example.com/data -a user:password
Bearer Token
GET https://api.example.com/data
Authorization: Bearer your-token-here
Or via CLI:
httpgo get https://api.example.com/data -a your-token --auth-type bearer
API Key
GET https://api.example.com/data
X-API-Key: your-api-key
Options
| Option | Description |
|---|---|
--verbose |
Show request details |
--quiet, -q |
Only show response body |
--no-color |
Disable colored output |
--timeout, -t |
Request timeout in seconds (default: 30) |
--insecure, -k |
Disable SSL verification |
--env, -e |
Path to .env file |
--var, -v |
Set variable: name=value |
Shell Completion
httpgo supports auto-completion for Bash, Zsh, Fish, and PowerShell.
# Install completion for your current shell
httpgo --install-completion
# Show completion script (to customize)
httpgo --show-completion
After installing, restart your shell or source the completion script.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file httpgo_cli-0.1.1.tar.gz.
File metadata
- Download URL: httpgo_cli-0.1.1.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e1b74fd69aa698e4b7f903ad6a866ed1c2746663023945c110f8f37b099c102
|
|
| MD5 |
fc904876cc5dd69dba8dd10cfd702175
|
|
| BLAKE2b-256 |
a4cd24b30a36d9723c6969fdd13bcd00414b7c7ffdd782efdbf1cd60e94be9d8
|
File details
Details for the file httpgo_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: httpgo_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cc11c14408fc7d2ff20fcb5190959ed41d350c3c2264731eba306ca1a8acc34
|
|
| MD5 |
1f2ef3ad88c5bfc81f57b0e8d23a10db
|
|
| BLAKE2b-256 |
642c4d459db0ab22290596b3cd8a341471bde9a7165733aadeb825c99324cba1
|