CLI Reference
Complete reference documentation for all Dochia CLI commands. This section provides detailed information about every command, flag, and option available in the Dochia CLI tool.
Available Commands
test - Main Testing Command
The primary command for executing API tests against your OpenAPI specifications. This is the core functionality of Dochia.
Key Features:
- Execute comprehensive API testing with 100+ fuzzing playbooks
- Support for authentication, rate limiting, and custom configurations
- Flexible output formats and detailed reporting
- Parallel execution and performance optimization
Common Usage:
dochia test --contract api.yml --server https://api.example.com
list - List Available Resources
Display available playbooks, mutators, and other testing resources.
Key Features:
- List all available playbooks by category
- Show mutator information and capabilities
- Filter and search available resources
- Export lists for documentation or automation
Common Usage:
dochia list --playbooks
dochia list --mutators
replay - Replay Previous Tests
Re-execute specific test scenarios from previous test runs.
Key Features:
- Replay individual test cases or entire test suites
- Reproduce specific error conditions
- Debug and investigate test failures
- Validate fixes and improvements
Common Usage:
dochia replay --test-id 12345 --server https://api.example.com
info - System Information
Display system information, version details, and environment configuration.
Key Features:
- Show Dochia version and build information
- Display system environment details
- Check configuration and connectivity
- Troubleshoot installation issues
Common Usage:
dochia info
dochia info --verbose
fuzz - Random Fuzzing
Execute continuous random fuzzing with mutators rather than structured playbooks.
Key Features:
- Continuous random mutation testing
- Configurable mutation strategies
- Real-time feedback and monitoring
- Discovery of unexpected vulnerabilities
Common Usage:
dochia fuzz --contract api.yml --server https://api.example.com --duration 30m
explain - Explain Results
Get detailed explanations of test results, error codes, and response codes.
Key Features:
- Explain custom response codes (9XX series)
- Detailed error code descriptions
- Playbook and mutator explanations
- Troubleshooting guidance
Common Usage:
dochia explain --type response_code 953
dochia explain --type playbook BypassAuthenticationPlaybook
Command Categories
Core Testing Commands
- test - Primary testing functionality
- fuzz - Random mutation testing
- replay - Re-execute specific tests
Information & Discovery Commands
- list - List available resources
- info - System and version information
- explain - Explain results and codes
Common Patterns
Basic Test Execution
# Simple test with minimal configuration
dochia test --contract openapi.yml --server https://api.example.com
# Test with authentication
dochia test --contract api.yml --server https://api.example.com --header "Authorization: Bearer token"
# Test with custom configuration
dochia test --contract api.yml --server https://api.example.com --config dochia.properties
Advanced Testing Scenarios
# Specific playbooks only
dochia test --contract api.yml --server https://api.example.com --playbooks SecurityPlaybooks
# Custom output location
dochia test --contract api.yml --server https://api.example.com --output ./test-results
# Rate limited testing
dochia test --contract api.yml --server https://api.example.com --rate-limit 10
Debugging and Analysis
# List available playbooks
dochia list --playbooks
# Explain a specific error
dochia explain --type response_code 954
# Get system information
dochia info --verbose
Global Options
Most commands support these common options:
--help- Display command-specific help--verbose- Enable verbose output--config- Specify configuration file--output- Set output directory--server- Target server URL
Exit Codes
Dochia uses standard exit codes:
0- Success, no errors found191- Usage error (invalid arguments, missing files)192- Internal error (system or configuration issues)ERR- Number of errors found during testing
Quick Reference
Most Common Commands
# Run comprehensive tests
dochia test --contract api.yml --server https://api.example.com
# List available playbooks
dochia list --playbooks
# Explain an error code
dochia explain --type response_code 953
# Get version information
dochia info
Getting Help
# General help
dochia --help
# Command-specific help
dochia test --help
dochia list --help
Next Steps
- User Guide - Comprehensive usage documentation
- Examples - Real-world usage scenarios
- Playbooks - Understanding testing strategies
- Advanced Configuration - Expert-level setups
Need Help?
- Check the Troubleshooting Guide
- Review the FAQ
- Join our Community for support