Run inside an OpenCart 3.x root
Runtime-backed and root-aware commandsUse this mode for cache, category, product, order, user, and modification commands that bootstrap real OpenCart models.
cd /path/to/opencart && oc product:list --limit=5 $ oc help
This guide is aligned with the current CLI repo. It explains connection modes, command families, supported output formats, and the OpenCart 3.x boundary for runtime-backed workflows.
Stable commands
29
Structured output
16
Runtime boundary
OpenCart 3.x
OC-CLI is a Symfony Console CLI for OpenCart. The current stable surface covers store inspection, configuration, database operations, cache maintenance, extensions, modifications, catalog workflows, orders, and admin-user management.
The most important distinction in the current repo is execution mode: DB-native commands can run with direct database credentials, while runtime-backed commands bootstrap real OpenCart models and therefore require a real OpenCart 3.x installation root.
Use this mode for cache, category, product, order, user, and modification commands that bootstrap real OpenCart models.
cd /path/to/opencart && oc product:list --limit=5 Use `--opencart-root` when you are outside the installation but still need runtime-backed behavior.
oc order:list --opencart-root=/var/www/opencart --customer=John --limit=10 Use direct database credentials for `db:*`, `core:config`, and other DB-native flows when no store root is available.
oc db:info --db-host=localhost --db-user=oc_user --db-pass=secret --db-name=opencart All commands inherit the OpenCart root flag and the direct DB connection flags defined in the base command class.
--opencart-root
Path to an OpenCart installation directory for auto-discovery.
--db-host
Direct database connection flag.
--db-user
Direct database connection flag.
--db-pass
Direct database connection flag.
--db-name
Direct database connection flag.
--db-port
Direct database connection flag.
--db-prefix
Direct database connection flag.
--db-driver
Direct database connection flag.
Version, requirement, and configuration commands.
core:version
Works anywhereShow OC-CLI version details and optionally the detected OpenCart version.
core:check-requirements
Works anywhereCheck PHP runtime requirements and local installation readiness.
core:config
DB flags supportedList, read, and update shared OpenCart configuration settings stored in the database.
Connection inspection, backup, restore, and maintenance commands.
db:info
DB flags supportedShow the resolved database connection details.
db:backup
DB flags supportedCreate a SQL backup, optionally scoped to selected tables or compressed output.
db:restore
DB flags supportedRestore a SQL backup with optional force and error-tolerance flags.
db:check
DB flags supportedRun table checks against all OpenCart tables or a targeted list.
db:repair
DB flags supportedRun table repair against all OpenCart tables or a targeted list.
db:optimize
DB flags supportedRun table optimization against all OpenCart tables or a targeted list.
db:cleanup
DB flags supportedDelete transient rows from OpenCart session and online-tracking tables.
OpenCart cache clearing and modification rebuild workflows.
Extension row management and OCMOD import/list flows.
extension:list
DB flags supportedList enabled rows from the OpenCart extension table.
extension:install
DB flags supportedImport an OCMOD XML package into the modification table.
extension:enable
DB flags supportedInsert an enabled extension row by extension identifier.
extension:disable
DB flags supportedDelete an enabled extension row by extension identifier.
modification:list
OpenCart 3.x rootList installed OCMOD modifications.
Category and product workflows backed by OpenCart admin models.
category:list
OpenCart 3.x rootList categories with name, sort order, pagination, and structured output filters.
category:create
OpenCart 3.x rootCreate a category through the OpenCart admin category model.
product:list
OpenCart 3.x rootList products with category, status, search, and result-limit filters.
product:create
OpenCart 3.x rootCreate a product with positional arguments and optional catalog metadata.
product:update
OpenCart 3.x rootUpdate a product by overlaying supported fields on the existing OpenCart payload.
product:delete
OpenCart 3.x rootDelete a product through the OpenCart admin product model.
Order listing, inspection, and status update commands.
order:list
OpenCart 3.x rootList orders with filters for customer, status, dates, totals, paging, and sorting.
order:view
OpenCart 3.x rootShow one order, including products, totals, and recent history.
order:update-status
OpenCart 3.x rootAdd order history and update an order status by ID or exact status name.
Admin user management commands.
user:list
OpenCart 3.x rootList admin users with group, status, sort, paging, and structured output options.
user:create
OpenCart 3.x rootCreate an admin user through the OpenCart admin user model.
user:delete
OpenCart 3.x rootDelete an admin user, with protection against removing the last enabled administrator-equivalent user.
Many read-heavy commands expose `--format=table|json|yaml`. That is especially useful for automation, monitoring, and shell pipelines.
oc db:backup nightly.sql --compress
oc db:check --format=json
oc order:list --customer=John --limit=10 --format=json Not every command supports structured output. The API page lists options per command so you can see exactly where `--format` is available.
oc core:version
oc core:check-requirements
oc db:info --db-host=localhost --db-user=oc_user --db-pass=secret --db-name=opencart oc product:create "Demo Product" "DEMO-001" "19.99"
oc product:update 100 --price=24.99 --quantity=5
oc order:update-status 1 5 --comment="Approved from OC-CLI" --notify