oCoreoCore Docs

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 version

Command Overview

CommandDescription
ocore serverRegister, list, validate, and remove managed servers
ocore instanceProvision, configure, start, stop, and delete Odoo instances
ocore backupCreate, list, restore, and schedule backups
ocore deployTrigger deployments and view deployment history
ocore configView and update CLI configuration
ocore projectManage projects and environments
ocore domainConfigure custom domains and TLS certificates
ocore dbManage PostgreSQL databases
ocore authLog in, log out, and manage authentication tokens
ocore versionPrint the CLI and server version

Global Flags

These flags are available on every command:

FlagShortDescription
--help-hShow help for any command
--output-oOutput format: table (default), json, yaml
--quiet-qSuppress non-essential output
--verbose-vEnable verbose/debug logging
--server-soCore server URL (overrides config)
--no-colorDisable 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 json

Configuration

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: table

Manage configuration with the config command:

# View current configuration
ocore config list

# Set the server URL
ocore config set server https://ocore.example.com

Environment Variables

Environment variables take precedence over the config file. All variables use the OCORE_ prefix:

VariableDescription
OCORE_SERVERoCore server URL
OCORE_TOKENAuthentication token (useful for CI/CD)
OCORE_OUTPUTDefault output format
OCORE_NO_COLORDisable 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 status

See the API Keys guide for creating tokens suitable for automation.

Was this page helpful?