A powerful CLI tool and documentation website for HTTP request management using YAML configuration files. Built with Bun for blazing-fast performance and featuring a modern documentation site powered by Next.js.
- π YAML Configuration: Define HTTP requests in simple, readable YAML files
- π Directory Support: Execute multiple requests from entire directories
- π Execution Modes: Sequential and parallel execution for optimal performance
- π§ Variable Interpolation: Dynamic values using environment variables and inline substitutions
- β Response Validation: Built-in assertions for status codes, headers, and response bodies
- π Beautiful Output: Clean, colorized console output with detailed metrics
- π Retry Logic: Automatic retry mechanisms for failed requests
- π Performance Metrics: Detailed timing and performance statistics
- π Comprehensive Docs: Complete documentation with examples and tutorials
- π¨ Modern Design: Beautiful, responsive UI built with Next.js and Tailwind CSS
- π Dark Mode: Built-in dark mode support
- π Interactive Examples: Live code examples and playground
- π± Mobile Friendly: Optimized for all screen sizes
- Bun v1.2.21 or higher
# Clone the repository
git clone https://github.com/yourusername/curl-runner.git
cd curl-runner
# Install all dependencies
bun install
# Build the CLI tool
bun run build:cli
# Run a single YAML file
bun run cli examples/simple.yaml
# Run all YAML files in a directory
bun run cli examples/
# Run with options
bun run cli -pv examples/ # Parallel + Verbose mode
Create a file called my-request.yaml
:
# Simple GET request
request:
name: Get User Data
url: https://jsonplaceholder.typicode.com/users/1
method: GET
expect:
status: 200
Run it:
bun run cli my-request.yaml
Create api-tests.yaml
:
global:
execution: sequential
variables:
BASE_URL: https://jsonplaceholder.typicode.com
collection:
name: API Integration Tests
description: Testing user management endpoints
requests:
- name: List All Users
url: ${BASE_URL}/users
method: GET
expect:
status: 200
- name: Get Specific User
url: ${BASE_URL}/users/1
method: GET
expect:
status: 200
- name: Create New User
url: ${BASE_URL}/users
method: POST
headers:
Content-Type: application/json
body:
name: John Doe
email: john@example.com
expect:
status: 201
curl-runner/
βββ packages/
β βββ cli/ # CLI tool package
β β βββ src/ # Source code
β β βββ examples/ # Example YAML files
β β βββ package.json
β βββ docs/ # Documentation website
β βββ app/ # Next.js app directory
β βββ components/ # React components
β βββ package.json
βββ package.json # Root workspace configuration
βββ biome.json # Code formatting and linting
βββ @README.md # This file
βββ CONTRIBUTE.md # Contribution guidelines
βββ LICENSE.md # MIT License
# Install dependencies for all packages
bun install
# Development mode
bun run dev # Run all packages in dev mode
bun run dev:cli # CLI only (watch mode)
bun run dev:docs # Documentation site only
# Building
bun run build # Build all packages
bun run build:cli # Build CLI to binary
bun run build:docs # Build documentation site
# Code quality
bun run format # Format code with Biome
bun run lint # Lint code with Biome
bun run check # Format and fix all issues
bun run check:ci # CI-friendly check
# Testing
bun test # Run all tests
bun test:cli # Run CLI tests only
# Start development server
bun run dev:docs
# Build and start production server
bun run build:docs
bun run start:docs
Visit http://localhost:3000 to view the documentation.
request:
name: Request Name
url: https://api.example.com/endpoint
method: GET|POST|PUT|DELETE|PATCH
headers:
Authorization: Bearer ${TOKEN}
Content-Type: application/json
body: |
{
"key": "value"
}
expect:
status: 200
headers:
Content-Type: application/json
body:
contains: "success"
global:
execution: sequential|parallel
continueOnError: true|false
variables:
API_KEY: ${API_KEY}
BASE_URL: https://api.example.com
output:
verbose: true
showHeaders: true
showMetrics: true
collection:
name: Collection Name
description: Collection description
requests:
- name: Request 1
url: ${BASE_URL}/endpoint1
method: GET
- name: Request 2
url: ${BASE_URL}/endpoint2
method: POST
body:
data: value
global:
variables:
API_VERSION: v1
USER_ID: 123
request:
name: Get User Profile
url: https://api.example.com/${API_VERSION}/users/${USER_ID}
method: GET
request:
name: API Health Check
url: https://api.example.com/health
method: GET
expect:
status: 200
headers:
Content-Type: application/json
body:
contains: "healthy"
json:
status: "ok"
version: "1.0.0"
request:
name: Flaky Endpoint
url: https://api.example.com/flaky
method: GET
retry:
attempts: 3
delay: 1000
exponential: true
expect:
status: 200
# Execution modes
-p, --parallel Execute requests in parallel
-s, --sequential Execute requests sequentially (default)
# Output control
-v, --verbose Show detailed output
-q, --quiet Suppress non-essential output
--show-headers Display response headers
--show-metrics Display timing metrics
# Error handling
-c, --continue Continue execution on errors
--fail-fast Stop on first error (default)
# Output formats
-o, --output <file> Save results to JSON file
--format json|yaml Output format for results
# Other options
-h, --help Show help information
--version Show version information
-w, --watch Watch files for changes
# Test a REST API with authentication
bun run cli examples/api-auth.yaml
# Load test with parallel requests
bun run cli -p examples/load-test/
# Integration test suite
bun run cli --verbose examples/integration/
# Set environment variables
export API_KEY=your-api-key
export BASE_URL=https://api.staging.example.com
# Run tests with environment variables
bun run cli examples/staging-tests.yaml
# CI-friendly execution with JSON output
bun run cli --quiet --output results.json --continue examples/
# Validate API contract
bun run cli --fail-fast examples/contract-tests/
- TypeScript for type safety
- Bun runtime for performance
- YAML parsing for configuration
- HTTP client with retry logic
- Validation engine for assertions
- Pretty printing for console output
- Next.js 15 with App Router
- React 19 with TypeScript
- Tailwind CSS for styling
- Radix UI for accessible components
- Shiki for syntax highlighting
- GSAP for animations
We welcome contributions! Please see our CONTRIBUTE.md for guidelines on:
- Setting up the development environment
- Code style and conventions
- Submitting pull requests
- Reporting bugs and feature requests
This project is licensed under the MIT License. See LICENSE.md for details.
- Bun - The fast all-in-one JavaScript runtime
- Next.js - The React framework for production
- Biome - Fast formatter and linter
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Low-level UI primitives
- π Report bugs
- π‘ Request features
- π View documentation
- π¬ Discussions
curl-runner - Making HTTP request management simple and powerful
Made with β€οΈ by the community
Made with β€οΈ by the community