CLI Reference
Command-line interface reference for the oCore CLI
Full CLI reference documentation with detailed subcommand descriptions and examples is being generated. This page provides a quick overview of all available commands and global options.
Installation
Install the oCore CLI as part of the standard setup process. See the Installation guide for platform-specific instructions.
# Verify your installation
ocore versionCommand Overview
| Command | Description |
|---|---|
ocore server | Register, list, validate, and remove managed servers |
ocore instance | Provision, configure, start, stop, and delete Odoo instances |
ocore backup | Create, list, restore, and schedule backups |
ocore deploy | Trigger deployments and view deployment history |
ocore config | View and update CLI configuration |
ocore project | Manage projects and environments |
ocore domain | Configure custom domains and TLS certificates |
ocore db | Manage PostgreSQL databases |
ocore auth | Log in, log out, and manage authentication tokens |
ocore version | Print the CLI and server version |
Global Flags
These flags are available on every command:
| Flag | Short | Description |
|---|---|---|
--help | -h | Show help for any command |
--output | -o | Output format: table (default), json, yaml |
--quiet | -q | Suppress non-essential output |
--verbose | -v | Enable verbose/debug logging |
--server | -s | oCore server URL (overrides config) |
--no-color | Disable colored output |
Quick Examples
# List all servers
ocore server list
# Provision a new Odoo 17 instance
ocore instance create --name my-store --odoo-version 17.0 --server srv-01
# Create a backup
ocore backup create --instance my-store
# Deploy from a Git branch
ocore deploy --instance my-store --branch main
# Output as JSON for scripting
ocore instance list --output jsonConfiguration
The CLI stores its configuration in ~/.config/ocore/config.yaml. You can also set values through environment variables.
Config File
# ~/.config/ocore/config.yaml
server: https://ocore.example.com
output: tableManage configuration with the config command:
# View current configuration
ocore config list
# Set the server URL
ocore config set server https://ocore.example.comEnvironment Variables
Environment variables take precedence over the config file. All variables use the OCORE_ prefix:
| Variable | Description |
|---|---|
OCORE_SERVER | oCore server URL |
OCORE_TOKEN | Authentication token (useful for CI/CD) |
OCORE_OUTPUT | Default output format |
OCORE_NO_COLOR | Disable colored output when set to 1 or true |
Authentication
Log in interactively or provide a token directly:
# Interactive login (opens browser or prompts for credentials)
ocore auth login
# Use a token directly (e.g., in CI/CD)
export OCORE_TOKEN="ocore_k_abc123..."
ocore server list
# Check authentication status
ocore auth statusSee the API Keys guide for creating tokens suitable for automation.