Skip to main content

Installation

Get up and running with Dochia in under 60 seconds. Dochia is available through multiple installation methods to suit your development environment.

Installation Methods​

The easiest way to install Dochia on macOS and Linux is through Homebrew:

# Install Dochia via Homebrew
brew install dochia-dev/tap/dochia-cli

# Verify installation
dochia --version

Direct Binary Installation​

Download the latest binary directly from our releases:

macOS and Linux​

# Download latest release for your platform
wget https://github.com/dochia-dev/dochia-cli/releases/latest/dochia_platform_version.tar.gz
tar -xzf dochia_platform_version.tar.gz
chmod +x dochia
sudo mv dochia /usr/local/bin/dochia
rm dochia_platform_version.tar.gz

Windows​

Using PowerShell (recommended):

# Download and extract using PowerShell
Invoke-WebRequest -Uri "https://github.com/dochia-dev/dochia-cli/releases/latest/dochia_windows_version.tar.gz" -OutFile "dochia_windows.tar.gz"
tar -xzf dochia_windows.tar.gz
Move-Item dochia.exe C:\Windows\System32\dochia.exe
Remove-Item dochia_windows.tar.gz

Alternatively, using Command Prompt (Windows 10 1803+):

# Download using curl (available in modern Windows)
curl -L -o dochia_windows.tar.gz https://github.com/dochia-dev/dochia-cli/releases/latest/dochia_windows_version.tar.gz
tar -xzf dochia_windows.tar.gz
move dochia.exe C:\Windows\System32\dochia.exe
del dochia_windows.tar.gz

Or download manually:

  1. Download dochia_windows_version.tar.gz from the releases page
  2. Extract the archive using Windows built-in extraction or 7-Zip
  3. Copy dochia.exe to a directory in your PATH (e.g., C:\Windows\System32)

Containerized Environment​

Run Dochia in a containerized environment using Docker:

# Pull the latest Dochia image
docker pull dochiadev/dochia-cli:latest

# Run Dochia in a container
docker run --rm -v $(pwd):/workspace dochiadev/dochia-cli:latest test --contract /workspace/openapi.yaml --server http://localhost:8080

# Create an alias for easier usage
alias dochia='docker run --rm -v $(pwd):/workspace dochiadev/dochia-cli:latest'

Verification​

After installation, verify that Dochia is working correctly:

# Check version
dochia --version

# Display help information
dochia --help

# Run a quick test (requires an OpenAPI spec)
dochia test --contract your-api-spec.yaml --dry-run

Next Steps​

Once Dochia is installed:

  1. Learn Basic Concepts - Understand how Dochia works
  2. Run Your First Test - Execute your first API test
  3. Explore CLI Commands - Discover all available commands

Troubleshooting​

Command Not Found​

If you get a "command not found" error:

  1. Homebrew users: Ensure Homebrew's bin directory is in your PATH
  2. Binary users: Verify the binary is in /usr/local/bin/ or another directory in your PATH
  3. Container users: Make sure Docker is running and the image was pulled successfully

Permission Denied​

If you encounter permission issues:

# Make the binary executable
chmod +x /usr/local/bin/dochia

# Or reinstall with proper permissions
sudo chown $(whoami) /usr/local/bin/dochia

Version Conflicts​

If you have multiple versions installed:

# Check which version is being used
which dochia

# Uninstall via Homebrew
brew uninstall dochia

# Remove binary installation
sudo rm /usr/local/bin/dochia

Getting Help​