Lunge is a powerful yet simple terminal-based HTTP client and performance testing tool written in Go. It combines curl's simplicity with Postman/Insomnia's power, featuring a comprehensive performance testing engine inspired by k6 and Gatling.
- Command-line simplicity with powerful request customization
- Multiple output formats - Text, JSON, YAML, JUnit XML
- Pretty formatting - Syntax-highlighted request/response output
- Detailed timing metrics - DNS, TCP, TLS, TTFB breakdown
- Request chaining - Use output from one request in another
- JSON/YAML configuration for request suites
- Environment variables and variable substitution
- Response validation - Status, headers, body, JSON schema
- Assertion testing with detailed pass/fail reporting
- Four executor types - K6/Gatling-style load testing:
constant-vus- Fixed virtual usersramping-vus- Variable VU stagesconstant-arrival-rate- Fixed RPS throughputramping-arrival-rate- Variable RPS stages
- HTML reports with Chart.js visualization
- Threshold support for pass/fail criteria
- TTY-aware console with real-time progress bars
- Lock-free metrics for high-performance collection
go install github.com/wesleyorama2/lunge/cmd/lunge@latestgit clone https://github.com/wesleyorama2/lunge.git
cd lunge
go build -o lunge ./cmd/lungedocker build -t lunge .
docker run --rm lunge get https://api.example.com/health# GET request
lunge get https://api.example.com/users
# GET with headers
lunge get https://api.example.com/users \
-H "Authorization: Bearer token" \
-H "Accept: application/json"
# POST with JSON body
lunge post https://api.example.com/users \
-j '{"name": "John", "email": "john@example.com"}'
# PUT request
lunge put https://api.example.com/users/123 \
-j '{"name": "Updated Name"}'
# DELETE request
lunge delete https://api.example.com/users/123
# Verbose output with timing details
lunge get https://api.example.com/users -v# Run a single request
lunge run -c examples/simple.json -e dev -r getUser
# Run a test suite
lunge test -c examples/simple.json -e dev -s userFlow# Quick load test
lunge perf --url https://api.example.com/health \
--vus 10 --duration 30s
# Ramping VUs stress test
lunge perf --url https://api.example.com/health \
--executor ramping-vus \
--stages "30s:10,2m:50,30s:0"
# Constant arrival rate (guaranteed RPS)
lunge perf --url https://api.example.com/health \
--executor constant-arrival-rate \
--rate 100 --duration 5m --max-vus 200
# Using a configuration file with HTML report
lunge perf -c examples/v2-stress-test.yaml --html --output report.html{
"environments": {
"dev": {
"baseUrl": "https://api-dev.example.com",
"variables": {
"userId": "1"
}
}
},
"requests": {
"getUser": {
"url": "/users/{{userId}}",
"method": "GET",
"headers": {
"Accept": "application/json"
}
}
},
"suites": {
"userFlow": {
"requests": ["getUser"],
"tests": [
{
"name": "User exists",
"request": "getUser",
"assertions": [
{ "status": 200 },
{ "path": "$.email", "exists": true }
]
}
]
}
}
}name: "API Load Test"
settings:
baseUrl: "https://api.example.com"
timeout: 30s
scenarios:
load_test:
executor: ramping-vus
stages:
- duration: 1m
target: 20
- duration: 3m
target: 50
- duration: 1m
target: 0
requests:
- name: "Health Check"
method: GET
url: "{{baseUrl}}/health"
thresholds:
http_req_duration:
- "p95 < 500ms"
http_req_failed:
- "rate < 0.01"Comprehensive documentation is available in the doc/ directory:
-
Getting Started
- Installation - Installation methods
- Getting Started - Quick start guide
-
Usage Guides
- Configuration - Configuration file format
- Variables - Environment variables and extraction
- Testing - Test assertions and validation
- JSON Schema Validation - Response schema validation
-
Performance Testing
- Performance Testing - Load testing guide
- Benchmarks - Performance benchmarks
- Rate Limiting - Rate limiting details
-
Reference
- Examples - Common usage examples
See the examples/ directory for ready-to-use configurations:
- HTTP Testing:
simple.json,httpbin-tests.json - Performance Testing:
v2-*.yamlfiles for various load patterns - Schema Validation:
schema-validation.json
Lunge is designed with a clean, modular architecture:
cmd/lunge/ # CLI entry point
internal/
├── cli/ # Command implementations
├── config/ # Configuration parsing
├── http/ # HTTP client
├── output/ # Output formatting
└── performance/v2/ # Performance testing engine
├── config/ # YAML/JSON config parsing
├── engine/ # Test orchestration
├── executor/ # Load generation executors
├── metrics/ # Metrics collection
├── output/ # Console output
├── rate/ # Rate limiting
└── report/ # HTML reporting
pkg/
├── jsonpath/ # JSONPath extraction
└── jsonschema/ # JSON Schema validation
See ARCHITECTURE.md for detailed architecture documentation.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Run tests
go test ./...
# Run tests with race detection
go test -race ./...
# Build
go build ./cmd/lunge
# Format code
go fmt ./...
# Vet code
go vet ./cmd/... ./internal/...Copyright (c) 2025, Wesley Brown. All rights reserved.