CLI Commands
Complete command-line interface reference for curl-runner with all available commands, options, and usage examples.
Complete command-line interface reference for curl-runner with all available commands, options, and usage examples.
Basic Usage
The curl-runner CLI provides a simple interface for executing HTTP requests defined in YAML files.
# Run a single YAML file
curl-runner simple.yaml
# Run with verbose output
curl-runner simple.yaml --verbose
# Run multiple files
curl-runner file1.yaml file2.yaml file3.yaml
# Run all YAML files in current directory
curl-runner *.yaml
# Run all files in a directory
curl-runner tests/
# Run with short options
curl-runner tests/ -pvcCommands
curl-runner
Main command to execute HTTP requests from YAML files.
Usage
curl-runner [files...] [options]Examples
curl-runner simple.yaml
curl-runner tests/ -pv
curl-runner *.yaml --output results.jsonSubcommands
| Command | Description |
|---|---|
curl-runner init [url] | Quick create a new YAML file; add --wizard for the full interactive wizard. See YAML Wizard |
curl-runner edit <file.yaml> | Edit an existing YAML file |
curl-runner validate | Validate YAML files against the curl-runner schema. See YAML Validation |
curl-runner convert | Convert between curl commands, shell scripts and YAML, or import a Postman collection or an OpenAPI spec. See Curl and YAML Conversion |
curl-runner diff <label1> <label2> [file.yaml] | Compare two stored baselines without making requests. See Response Diffing |
curl-runner upgrade | Upgrade to the latest version. See Upgrade |
Options
Available command-line options to customize curl-runner's behavior. The full reference, with types, defaults and examples, is on the CLI Options page.
| Option | Type | Default | Description |
|---|---|---|---|
-h, --help | boolean | false | Show help information and usage examples |
-v, --verbose | boolean | false | Enable verbose output with detailed request/response information |
-q, --quiet | boolean | false | Suppress non-error output (opposite of verbose) |
-p, --execution parallel | string | sequential | Execute requests in parallel instead of sequential |
-c, --continue-on-error | boolean | false | Continue execution when individual requests fail |
--all | boolean | false | Recursively find all YAML files in directories |
-o, --output <file> | string | undefined | Save execution results to a file |
--output-format <format> | string | pretty | Set output format: json, pretty, or raw |
--pretty-level <level> | string | minimal | Set pretty format detail level: minimal, standard, or detailed |
--show-headers | boolean | false | Include response headers in output |
--show-body | boolean | true | Include response body in output |
--show-metrics | boolean | false | Include performance metrics in output |
--timeout <ms> | number | undefined | Set global timeout for all requests in milliseconds |
--retries <count> | number | 0 | Set maximum number of retries for failed requests |
--retry-delay <ms> | number | 1000 | Set delay between retry attempts in milliseconds |
--no-retry | boolean | false | Disable retry mechanism completely |
--version | boolean | false | Display the curl-runner version |
File Patterns
curl-runner supports various file patterns and glob expressions for flexible file selection.
# Glob patterns
curl-runner "api-*.yaml" # Files starting with "api-"
curl-runner "**/*.yaml" # All YAML files recursively
curl-runner "tests/**/*.yml" # All YML files in tests/ recursively
# Directory patterns
curl-runner tests/ # All YAML/YML files in tests/
curl-runner tests/ --all # Recursive search in tests/
curl-runner . --all # All files recursively from current dir
# Multiple patterns
curl-runner "api-*.yaml" "user-*.yaml" tests/Execution Modes
Sequential (default). Requests are executed one after another in the order they appear in the YAML file. Useful for dependent requests or when order matters.
Parallel. All requests are executed simultaneously. Significantly faster for independent requests but may overwhelm the target server.
# Sequential execution (default)
curl-runner tests/
# Parallel execution
curl-runner tests/ --execution parallel
curl-runner tests/ -p
# Continue on errors
curl-runner tests/ --continue-on-error
curl-runner tests/ -c
# Parallel + continue on error
curl-runner tests/ -pcOutput Options
Control how curl-runner displays results and saves output data.
# Verbose output
curl-runner tests/ --verbose
curl-runner tests/ -v
# Quiet mode (suppress output)
curl-runner tests/ --quiet
curl-runner tests/ -q
# Save results to file
curl-runner tests/ --output results.json
curl-runner tests/ -o results.json
# Output format options
curl-runner tests/ --output-format json # JSON output
curl-runner tests/ --output-format pretty # Pretty output (default)
curl-runner tests/ --output-format raw # Raw response bodies only
# Pretty level options (when using pretty format)
curl-runner tests/ --pretty-level minimal # Compact output (default)
curl-runner tests/ --pretty-level standard # Standard detail
curl-runner tests/ --pretty-level detailed # Full detail with metrics
# Control what's shown
curl-runner tests/ --show-headers # Include headers
curl-runner tests/ --show-metrics # Include metrics
curl-runner tests/ --show-body false # Hide response body
# Combine options
curl-runner tests/ --output-format pretty --pretty-level detailed --show-metricsTimeout & Retry Options
Configure timeout and retry behavior for robust request handling.
# Set global timeout (milliseconds)
curl-runner tests/ --timeout 10000
# Set maximum retries
curl-runner tests/ --retries 3
# Set retry delay (milliseconds)
curl-runner tests/ --retry-delay 2000
# Disable retries completely
curl-runner tests/ --no-retry
# Combine timeout and retry options
curl-runner tests/ --timeout 5000 --retries 3 --retry-delay 1000Advanced Usage
Complex examples combining multiple options and environment variables.
# Environment-specific execution (loads .env.production)
curl-runner api-tests.yaml --env production
# Using environment variables
API_KEY=secret123 curl-runner auth-tests.yaml
# Complex execution with all options
curl-runner tests/ \
--execution parallel \
--continue-on-error \
--verbose \
--timeout 30000 \
--retries 3 \
--output test-results.json \
--allExit Codes
curl-runner returns specific exit codes to indicate execution results.
0Success: all requests completed successfully, or--continue-on-errorwas used.1Error: one or more requests failed and--continue-on-errorwas not used.
For CI/CD, --strict-exit, --fail-on <count> and --fail-on-percentage <pct> control when a run exits with 1. See CI/CD Integration.
Cloud Commands
curl-runner Cloud is in private preview. See Cloud for the full guide.
curl-runner login [--server <url>] [--email <address> | --browser]
curl-runner logout [--server <url>]
curl-runner publish [DIR...] [--collection <slug>] [--team <slug>] [--server <url>] [--dry-run]
curl-runner pull [LINK] [DIR] [--force]login asks for your email address, sends a 6-digit code and saves the session on this computer. Without a terminal, pass --email and send the code on standard input. If neither is possible, set CURL_RUNNER_TOKEN. login --browser opens the dashboard sign-in page, where you can use GitHub, Google or email. Paste the code it shows back into the terminal. If the browser doesn't open, open the printed link yourself. Self-hosted servers advertise their dashboard URL, and older servers without one need the email flow. logout signs out on the server and removes the saved session, even if the server cannot be reached.
publish checks the folder, then uploads it as a new version of the collection named in its cloud: block. It's meant for CI. --dry-run shows what would change and sends nothing. The team comes from --team, else CURL_RUNNER_TEAM.
pull downloads a shared collection into a folder. Run it again in that folder to update it. --force replaces local changes without asking.
The server is --server, else CURL_RUNNER_SERVER, else https://api.curl-runner.com. Sessions are saved in ~/.config/curl-runner/credentials.json ($XDG_CONFIG_HOME is honored, %APPDATA%\curl-runner on Windows) with owner-only permissions. CURL_RUNNER_TOKEN overrides the saved session.
publish exits with 0 on success, 1 for invalid files, 2 for a sign-in or token problem or a suspended team, with a bad option or --server always 1, 3 for a plan limit, 4 for a collection edited in Cloud and 5 when the server can't be reached. With several folders, publish goes on after a refusal and exits with the most severe code (5, 2, 4, 3, 1). pull uses 0, 1, 2 and 5.
Configuration Alternatives
Many CLI options can also be configured using files or environment variables.
Studio (preview)
curl-runner studio is a macOS app for your YAML request files: live validation, runs, checks, retries, environments and history. Download the dmg.
CLI Options
Complete reference for all curl-runner command-line options including execution control, output formatting, and debugging flags.