A lightweight, fast, and intuitive HTTP testing tool that reads .hit
files and executes HTTP requests with support for variables, comments, and parallel execution.
- 🚀 Simple Syntax: Easy-to-read
.hit
file format - 🔧 Variable Support: Define and reuse variables with
{{variable}}
syntax - 📝 Multiple Comment Styles:
#
,//
, and/* */
comments - ⚡ Parallel Execution: Run requests concurrently for faster testing
- 🎨 Rich CLI: Comprehensive command-line interface with colored output
- 📊 JSON Reports: Generate detailed execution reports
- 🔍 Dry Run Mode: Validate syntax without sending requests
- 🌐 Cross-Platform: Available for Linux, macOS, and Windows
- 🎯 VS Code Extension: Official extension with syntax highlighting and IntelliSense
Download from GitHub Releases →
- Linux (x86_64):
hitman-linux-x86_64.tar.gz
- Linux (ARM64):
hitman-linux-aarch64.tar.gz
- macOS (Intel):
hitman-macos-x86_64.tar.gz
- macOS (Apple Silicon):
hitman-macos-aarch64.tar.gz
- Windows (x86_64):
hitman-windows-x86_64.zip
# Rust/Cargo
cargo install hitman
# Homebrew (coming soon)
brew install hitman
# Define variables
DEFINE baseUrl="https://jsonplaceholder.typicode.com"
DEFINE userId=1
# Simple GET request
GET {{baseUrl}}/users/{{userId}}
# POST request with data
POST {{baseUrl}}/posts
WITH HEADER {
"Content-Type": "application/json"
}
WITH DATA {
"title": "My Post",
"body": "This is the post content",
"userId": {{userId}}
}
# Execute requests
hitman example.hit
# Dry run (validate without sending)
hitman example.hit --dry-run
# Verbose output
hitman example.hit --verbose
# Parallel execution
hitman example.hit --parallel
Enhance your .hit
file editing experience:
Install from VS Code Marketplace →
Features:
- 🎨 Syntax highlighting
- 📝 IntelliSense and autocomplete
- ❌ Error detection and validation
- 🔧 Code formatting
- 📋 Snippets and templates
DEFINE token="abc123"
DEFINE user={"name": "John", "age": 30}
GET https://api.example.com/profile
WITH HEADER {"Authorization": "Bearer {{token}}"}
WITH DATA {{user}}
GET https://api.example.com/users
POST https://api.example.com/users
PUT https://api.example.com/users/1
DELETE https://api.example.com/users/1
# Hash comments
// Double slash comments
/* Block comments */
GET https://api.example.com/users # Inline comments
# Basic usage
hitman requests.hit
# Common options
hitman requests.hit --dry-run # Validate without sending
hitman requests.hit --verbose # Detailed output
hitman requests.hit --parallel # Concurrent execution
hitman requests.hit --quiet # Minimal output
# Variable overrides
hitman requests.hit --define baseUrl="https://staging.api.com"
hitman requests.hit --env staging.env
# Reporting
hitman requests.hit --report results.json
Explore comprehensive examples in the examples/
directory:
simple.hit
- Basic HTTP requests and syntaxcomprehensive.hit
- Advanced features showcasereal-world-api-testing.hit
- Complete real-world API testing scenariosauthentication-patterns.hit
- Various authentication methodsrest-api-crud.hit
- Full CRUD operations exampleerror-handling.hit
- HTTP status codes and error scenariosvariables-and-environments.hit
- Advanced variable usagefast-performance-test.hit
- Optimized for speed testing
# Try the real-world example
hitman examples/real-world-api-testing.hit
# Test authentication patterns
hitman examples/authentication-patterns.hit --dry-run
# Run CRUD operations
hitman examples/rest-api-crud.hit --parallel
- Installation Guide - Detailed installation instructions
- Usage Guide - Examples and common patterns
- File Format - Complete
.hit
syntax reference - CLI Reference - All command-line options
- Cross-Platform Setup - Build and deployment info
We welcome contributions! Please see our Contributing Guide for details.
# Clone the repository
git clone https://github.com/Mahmoud-Emad/hitman-cli.git
cd hitman-cli
# Build and test
cargo build
cargo test
# Run locally
cargo run -- example.hit --dry-run
This project is licensed under the MIT OR Apache-2.0 license.
Made with ❤️ for developers who love simple, powerful HTTP testing tools.