This guide covers the Veridock command-line interface (CLI) and its usage.
The veridock
CLI provides a convenient way to interact with the Veridock server and its components. It’s the primary tool for managing the server, services, and configurations.
The CLI is installed automatically when you install Veridock:
pip install veridock
Verify the installation:
veridock --version
veridock [OPTIONS] COMMAND [ARGS]...
--config FILE
: Specify a custom config file (default: .env
)--debug
: Enable debug output--version
: Show version and exit--help
: Show help message and exitveridock init
Initialize a new Veridock project.
veridock init [OPTIONS] [PATH]
Options:
--force
: Overwrite existing files--no-examples
: Skip example filesExample:
veridock init my-project
cd my-project
veridock run
Run a command in the Veridock runtime.
veridock run [OPTIONS] COMMAND [ARGS]...
Options:
--async
: Run command asynchronously--timeout SECONDS
: Command timeout in secondsExamples:
# Run a simple command
veridock run "echo 'Hello, Veridock!"
# Run a command with a timeout
veridock run --timeout 30 "long-running-command"
veridock service
Manage Veridock services.
veridock service [OPTIONS] COMMAND [ARGS]...
Subcommands:
list
: List available servicesstart <name>
: Start a servicestop <name>
: Stop a servicerestart <name>
: Restart a servicestatus <name>
: Show service statuslogs <name>
: View service logsExamples:
# List all services
veridock service list
# Start a service
veridock service start my-service
# View service logs
veridock service logs my-service --follow
veridock config
Manage Veridock configuration.
veridock config [OPTIONS] COMMAND [ARGS]...
Subcommands:
show
: Show current configurationget <key>
: Get a configuration valueset <key> <value>
: Set a configuration valueunset <key>
: Remove a configuration valuevalidate
: Validate configurationExamples:
# Show current config
veridock config show
# Set a config value
veridock config set LOG_LEVEL DEBUG
# Validate config
veridock config validate
veridock logs
View server logs.
veridock logs [OPTIONS] [SERVICE]
Options:
--follow, -f
: Follow log output--tail LINES
: Number of lines to show from the end--since TIME
: Show logs since a specific time--until TIME
: Show logs before a specific time--level LEVEL
: Filter by log levelExamples:
# Show recent logs
veridock logs
# Follow logs in real-time
veridock logs --follow
# Show logs for a specific service
veridock logs my-service
The CLI respects the following environment variables:
VERIDOCK_CONFIG
: Path to config fileVERIDOCK_DEBUG
: Enable debug modeVERIDOCK_HOST
: Server hostVERIDOCK_PORT
: Server portLOG_LEVEL
: Logging levelThe CLI looks for configuration in the following order:
.env
file in current directory~/.config/veridock/config
/etc/veridock/config
# Initialize a new project
veridock init my-project
cd my-project
# Start the server in development mode
VERIDOCK_DEBUG=1 veridock run
# Start all services
veridock service start --all
# Check service status
veridock service status
# View logs
veridock logs --follow
# Run a simple command
veridock run "ls -la"
# Run a command with environment variables
veridock run "echo $HOME"
# Run a command asynchronously
veridock run --async "long-running-process"
Create shell aliases for common commands:
# Add to ~/.bashrc or ~/.zshrc
alias vd='veridock'
alias vdr='veridock run'
alias vds='veridock service'
Enable debug output:
VERIDOCK_DEBUG=1 veridock --help
Enable shell completion:
# Bash
source <(veridock --completion=bash)
# Zsh
source <(veridock --completion=zsh)
# Fish
veridock --completion=fish | source
pip show veridock
which veridock
veridock status