OC-CLI commands use the form:
oc <namespace>:<command> [options] [arguments]Most commands support:
--opencart-root=/path/to/store- direct DB flags:
--db-host,--db-user,--db-pass,--db-name,--db-port,--db-prefix,--db-driver --format=table|json|yamlon commands that emit structured output
Runtime-backed commands bootstrap OpenCart 3.x models and require a real OpenCart 3.x installation root. DB-native commands such as db:info, db:backup, db:restore, db:check, db:repair, db:optimize, and db:cleanup can run with direct DB credentials alone.
Show OC-CLI and OpenCart version information.
oc core:version
oc core:version --opencart
oc core:version --format=jsonOptions:
--opencart--format
Check the local runtime and OpenCart installation requirements.
oc core:check-requirements
oc core:check-requirements --format=yamlOptions:
--format
Read and update configuration values stored in the shared OpenCart settings table.
oc core:config list
oc core:config get config_name
oc core:config set config_maintenance 1
oc core:config list --format=jsonArguments:
actionwithlistas the defaultkeyvalue
Options:
--format--admin
Notes:
--adminis deprecated and has no effect.- This command operates on shared settings rows, not separate catalog/admin scopes.
Show the resolved database connection details.
oc db:info
oc db:info --format=jsonOptions:
--format
Create a SQL backup.
oc db:backup
oc db:backup nightly.sql
oc db:backup nightly.sql --compress
oc db:backup products.sql --tables=oc_product,oc_product_descriptionArguments:
filenameoptional
Options:
--compress--tables--output-dir
Restore a SQL backup.
oc db:restore nightly.sql
oc db:restore nightly.sql --force
oc db:restore nightly.sql --ignore-errorsArguments:
filenamerequired
Options:
--force--ignore-errors
Run table checks against specific tables or all OpenCart tables.
oc db:check
oc db:check product order
oc db:check oc_product oc_order --format=jsonArguments:
tables...optional list of table names, with or without the configured prefix
Options:
--format
Run table repair against specific tables or all OpenCart tables.
oc db:repair
oc db:repair oc_product_descriptionArguments:
tables...optional list of table names, with or without the configured prefix
Options:
--format
Run table optimization against specific tables or all OpenCart tables.
oc db:optimize
oc db:optimize product product_description orderArguments:
tables...optional list of table names, with or without the configured prefix
Options:
--format
Delete only transient rows from *_session, *_api_session, and *_customer_online.
oc db:cleanup
oc db:cleanup --format=jsonOptions:
--format
Clear OpenCart cache artifacts. Requires a real OpenCart 3.x installation root.
oc cache:clear
oc cache:clear --type=data
oc cache:clear --type=theme
oc cache:clear --type=allOptions:
--type=data|theme|sass|all
Refresh the modification cache and optionally clear data, theme, and Sass cache artifacts. Requires a real OpenCart 3.x installation root.
oc cache:rebuild
oc cache:rebuild --type=modification
oc cache:rebuild --type=allOptions:
--type=modification|all
List enabled rows from the OpenCart extension table.
oc extension:list
oc extension:list payment
oc extension:list --format=jsonArguments:
typeoptional, for examplepayment,shipping, ormodule
Options:
--format
Import an OCMOD XML package into the modification table.
oc extension:install ./example.ocmod.xml
oc extension:install ./example.ocmod.xml --activateArguments:
extensionrequired path to.xmlor.ocmod
Options:
--activate
Notes:
- This is not a generic marketplace installer.
- Unsupported package/version combinations fail explicitly.
Insert an enabled extension row.
oc extension:enable payment:paypal
oc extension:enable shipping:flatArguments:
extensionrequired
Notes:
- Use
type:codewhen enabling a disabled extension that is not already present.
Delete an enabled extension row.
oc extension:disable payment:paypal
oc extension:disable paypalArguments:
extensionrequired
Notes:
- Use
type:codewhen multiple rows share the same code.
List installed modifications.
oc modification:list
oc modification:list --format=yamlOptions:
--format
List categories using the OpenCart admin category model. Requires a real OpenCart 3.x installation root.
oc category:list
oc category:list --name=Desktops
oc category:list --sort=name --order=desc --format=jsonOptions:
--name--sort=name|sort_order--order=asc|desc--page--limit--format
Create a category using the OpenCart admin category model. Requires a real OpenCart 3.x installation root.
oc category:create "CLI Specials"
oc category:create "Laptops / CLI" --parent-id=20 --description="Created from OC-CLI"
oc category:create "CLI Accessories" --store=0,1 --keyword=cli-accessories --status=enabledArguments:
name
Options:
--parent-id--description--meta-title--status=enabled|disabled--sort-order--top--column--store--keyword--image
List products with filtering. Requires a real OpenCart 3.x installation root.
oc product:list
oc product:list --status=enabled --limit=10
oc product:list Desktops --search=Mac
oc product:list 20 --format=jsonArguments:
categoryoptional category name or ID
Options:
--format--status=enabled|disabled|all--limit--search
Create a product using positional arguments and optional metadata flags. Requires a real OpenCart 3.x installation root.
oc product:create "Demo Product" "DEMO-001" "19.99"
oc product:create "Demo Product" "DEMO-001" "19.99" --quantity=5 --status=enabled
oc product:create "Demo Product" "DEMO-001" "19.99" --category=Desktops --format=json
oc product:create --interactiveArguments:
namemodelprice
Options:
--description--category--quantity--status--weight--sku--image--meta-title--format--interactive
Update an existing product by loading the current OpenCart product payload, overlaying supported fields, and writing it back through the admin product model. Requires a real OpenCart 3.x installation root.
oc product:update 100 --price=24.99 --quantity=5
oc product:update 100 --name="Updated CLI Product" --description="Updated from the CLI"
oc product:update 100 --category=20,24 --status=enabled --image=catalog/demo/updated.jpgArguments:
product-id
Options:
--name--model--price--quantity--status=enabled|disabled--sku--category--image--subtract=0|1--manufacturer-id--description--meta-title
Delete a product through the OpenCart admin product model. Requires a real OpenCart 3.x installation root.
oc product:delete 100
oc product:delete 100 --forceArguments:
product-id
Options:
--force
List orders using the OpenCart admin order model. Requires a real OpenCart 3.x installation root.
oc order:list
oc order:list --customer=John --status-id=2 --limit=10
oc order:list --date-added=2026-03-01 --sort=total --order=desc --format=jsonOptions:
--id--customer--status-id--date-added--date-modified--total--sort=order_id|customer|order_status|date_added|date_modified|total--order=asc|desc--page--limit--format
Show one order, including products, totals, and recent history. Requires a real OpenCart 3.x installation root.
oc order:view 1
oc order:view 1 --format=jsonArguments:
order-id
Options:
--format
Add order history and update an order status through the OpenCart checkout order model. Requires a real OpenCart 3.x installation root.
oc order:update-status 1 Processing
oc order:update-status 1 5 --comment="Approved from OC-CLI" --notify
oc order:update-status 1 Complete --comment="Released" --overrideArguments:
order-idstatusas an integer ID or exact current-language order status name
Options:
--comment--notify--override
List admin users from the OpenCart admin user model. Requires a real OpenCart 3.x installation root.
oc user:list
oc user:list --status=enabled
oc user:list --group=1 --sort=date_added --order=desc --format=jsonOptions:
--group--status=enabled|disabled|all--sort=username|status|date_added--order=asc|desc--page--limit--format
Create an admin user through the OpenCart admin user model. Requires a real OpenCart 3.x installation root.
oc user:create cli-admin cli-admin@example.com 'StrongPass!123' --firstname=CLI --lastname=Admin
oc user:create merch-admin merch@example.com 'AnotherPass!123' --firstname=Merch --lastname=Team --group-id=1 --status=enabledArguments:
usernameemailpassword
Options:
--firstname--lastname--group-id--status=enabled|disabled--image
Delete an admin user. The command protects the last enabled administrator-equivalent user unless --force is passed. Requires a real OpenCart 3.x installation root.
oc user:delete cli-admin
oc user:delete 7 --forceArguments:
useras a numeric user ID or exact username
Options:
--force