$ oc list --raw

OC-CLI API Reference

Every documented command below is sourced from the current audited `oc-cli` repository. Examples use the real package binary: `oc`.

Search across command names, summaries, arguments, and options.

Core

Version, requirement, and configuration commands.

core:version

Works anywhere

Show OC-CLI version details and optionally the detected OpenCart version.

Copy link

Usage

oc core:version [--opencart] [--format=table|json|yaml]

Execution notes

Works anywhere; `--opencart` needs a detectable store root.

Options

  • --opencart

    Include the detected OpenCart version in the output.

  • --format

    Render output as table, JSON, or YAML.

Examples

oc core:version
oc core:version --opencart
oc core:version --format=json

core:check-requirements

Works anywhere

Check PHP runtime requirements and local installation readiness.

Copy link

Usage

oc core:check-requirements [--format=table|json|yaml]

Execution notes

Works anywhere; richer installation checks need a detectable store root.

Options

  • --format

    Render output as table, JSON, or YAML.

Examples

oc core:check-requirements
oc core:check-requirements --format=yaml

core:config

DB flags supported

List, read, and update shared OpenCart configuration settings stored in the database.

Copy link

Usage

oc core:config [list|get|set] [key] [value]

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • [action]

    `list` by default, or `get` / `set`.

  • [key]

    Configuration key to read or update.

  • [value]

    Value used with `set`.

Options

  • --format

    Render structured output where supported.

  • --admin

    Deprecated compatibility flag; accepted but has no effect.

Examples

oc core:config list
oc core:config get config_name
oc core:config set config_maintenance 1
oc core:config list --format=json

Database

Connection inspection, backup, restore, and maintenance commands.

db:info

DB flags supported

Show the resolved database connection details.

Copy link

Usage

oc db:info [--format=table|json|yaml]

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Options

  • --format

    Render output as table, JSON, or YAML.

Examples

oc db:info
oc db:info --format=json
oc db:info --db-host=localhost --db-user=oc_user --db-pass=secret --db-name=opencart

db:backup

DB flags supported

Create a SQL backup, optionally scoped to selected tables or compressed output.

Copy link

Usage

oc db:backup [filename]

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • [filename]

    Optional output filename.

Options

  • --compress

    Compress the generated backup.

  • --tables

    Comma-separated table list to export.

  • --output-dir

    Write the backup into a specific directory.

Examples

oc db:backup
oc db:backup nightly.sql --compress
oc db:backup products.sql --tables=oc_product,oc_product_description

db:restore

DB flags supported

Restore a SQL backup with optional force and error-tolerance flags.

Copy link

Usage

oc db:restore <filename>

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • <filename>

    Backup file to restore.

Options

  • --force

    Skip confirmation prompts.

  • --ignore-errors

    Continue processing after SQL errors.

Examples

oc db:restore nightly.sql
oc db:restore nightly.sql --force
oc db:restore nightly.sql --ignore-errors

db:check

DB flags supported

Run table checks against all OpenCart tables or a targeted list.

Copy link

Usage

oc db:check [tables...]

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • [tables]

    Optional table names with or without the configured prefix.

Options

  • --format

    Render output as table, JSON, or YAML.

Examples

oc db:check
oc db:check product order
oc db:check oc_product oc_order --format=json

db:repair

DB flags supported

Run table repair against all OpenCart tables or a targeted list.

Copy link

Usage

oc db:repair [tables...]

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • [tables]

    Optional table names with or without the configured prefix.

Options

  • --format

    Render output as table, JSON, or YAML.

Examples

oc db:repair
oc db:repair oc_product_description

db:optimize

DB flags supported

Run table optimization against all OpenCart tables or a targeted list.

Copy link

Usage

oc db:optimize [tables...]

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • [tables]

    Optional table names with or without the configured prefix.

Options

  • --format

    Render output as table, JSON, or YAML.

Examples

oc db:optimize
oc db:optimize product product_description order

db:cleanup

DB flags supported

Delete transient rows from OpenCart session and online-tracking tables.

Copy link

Usage

oc db:cleanup [--format=table|json|yaml]

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Options

  • --format

    Render output as table, JSON, or YAML.

Examples

oc db:cleanup
oc db:cleanup --format=json

Cache

OpenCart cache clearing and modification rebuild workflows.

cache:clear

OpenCart 3.x root

Clear OpenCart cache artifacts for data, theme, Sass, or everything.

Copy link

Usage

oc cache:clear [--type=data|theme|sass|all]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Options

  • --type

    Select which cache area to clear.

Examples

oc cache:clear
oc cache:clear --type=data
oc cache:clear --type=all

cache:rebuild

OpenCart 3.x root

Refresh the modification cache and optionally clear related cache artifacts.

Copy link

Usage

oc cache:rebuild [--type=modification|all]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Options

  • --type

    Rebuild only the modification cache or perform the full rebuild flow.

Examples

oc cache:rebuild
oc cache:rebuild --type=modification
oc cache:rebuild --type=all

Extensions and Modifications

Extension row management and OCMOD import/list flows.

extension:list

DB flags supported

List enabled rows from the OpenCart extension table.

Copy link

Usage

oc extension:list [type]

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • [type]

    Optional extension type such as `payment`, `shipping`, or `module`.

Options

  • --format

    Render output as table, JSON, or YAML.

Examples

oc extension:list
oc extension:list payment
oc extension:list --format=json

extension:install

DB flags supported

Import an OCMOD XML package into the modification table.

Copy link

Usage

oc extension:install <extension>

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • <extension>

    Path to a `.xml` or `.ocmod` package.

Options

  • --activate

    Enable the imported modification after installation.

Examples

oc extension:install ./upload.ocmod.xml
oc extension:install ./upload.ocmod.xml --activate

extension:enable

DB flags supported

Insert an enabled extension row by extension identifier.

Copy link

Usage

oc extension:enable <extension>

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • <extension>

    Extension code, usually in `type:code` form.

Examples

oc extension:enable payment:paypal
oc extension:enable shipping:flat

extension:disable

DB flags supported

Delete an enabled extension row by extension identifier.

Copy link

Usage

oc extension:disable <extension>

Execution notes

Works with a detected store root or direct database flags.

Direct DB flags are supported for this command family.

Arguments

  • <extension>

    Extension code, either unique code or `type:code`.

Examples

oc extension:disable payment:paypal
oc extension:disable paypal

modification:list

OpenCart 3.x root

List installed OCMOD modifications.

Copy link

Usage

oc modification:list [--format=table|json|yaml]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Options

  • --format

    Render output as table, JSON, or YAML.

Examples

oc modification:list
oc modification:list --format=yaml

Catalog

Category and product workflows backed by OpenCart admin models.

category:list

OpenCart 3.x root

List categories with name, sort order, pagination, and structured output filters.

Copy link

Usage

oc category:list [--name=...] [--sort=...] [--order=...] [--page=...] [--limit=...]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Options

  • --name

    Filter by category name.

  • --sort

    Sort by `name` or `sort_order`.

  • --order

    Sort direction: `asc` or `desc`.

  • --page

    Page number.

  • --limit

    Results per page.

  • --format

    Render output as table, JSON, or YAML.

Examples

oc category:list
oc category:list --name=Desktops
oc category:list --sort=name --order=desc --format=json

category:create

OpenCart 3.x root

Create a category through the OpenCart admin category model.

Copy link

Usage

oc category:create <name> [options]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Arguments

  • <name>

    Category name.

Options

  • --parent-id

    Parent category ID.

  • --description

    Category description.

  • --meta-title

    Meta title override.

  • --status

    Category status: `enabled` or `disabled`.

  • --sort-order

    Sort order integer.

  • --top

    Show the category in the top navigation.

  • --column

    Top navigation column count.

  • --store

    Comma-separated store IDs.

  • --keyword

    SEO keyword for the current language.

  • --image

    Category image path relative to `image/`.

Examples

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=enabled

product:list

OpenCart 3.x root

List products with category, status, search, and result-limit filters.

Copy link

Usage

oc product:list [category] [--status=...] [--limit=...] [--search=...]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Arguments

  • [category]

    Optional category name or ID filter.

Options

  • --format

    Render output as table, JSON, or YAML.

  • --status

    Filter by `enabled`, `disabled`, or `all`.

  • --limit

    Limit the number of returned rows.

  • --search

    Search by product name or model.

Examples

oc product:list
oc product:list --status=enabled --limit=10
oc product:list Desktops --search=Mac

product:create

OpenCart 3.x root

Create a product with positional arguments and optional catalog metadata.

Copy link

Usage

oc product:create [name] [model] [price] [options]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Arguments

  • [name]

    Product name.

  • [model]

    Product model or SKU-like identifier.

  • [price]

    Product price.

Options

  • --description

    Product description.

  • --category

    Category name or ID.

  • --quantity

    Product quantity.

  • --status

    Product status: `enabled` or `disabled`.

  • --weight

    Product weight.

  • --sku

    Explicit SKU value.

  • --image

    Image path relative to `image/`.

  • --meta-title

    Meta title override.

  • --format

    Render output as table, JSON, or YAML.

  • --interactive

    Prompt for missing values interactively.

Examples

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 --interactive

product:update

OpenCart 3.x root

Update a product by overlaying supported fields on the existing OpenCart payload.

Copy link

Usage

oc product:update <product-id> [options]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Arguments

  • <product-id>

    Product ID to update.

Options

  • --name

    Product name.

  • --model

    Product model.

  • --price

    Product price.

  • --quantity

    Product quantity.

  • --status

    Product status: `enabled` or `disabled`.

  • --sku

    Product SKU.

  • --category

    Comma-separated category IDs.

  • --image

    Image path relative to `image/`.

  • --subtract

    Subtract stock flag, `0` or `1`.

  • --manufacturer-id

    Manufacturer ID.

  • --description

    Product description.

  • --meta-title

    Meta title override.

Examples

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.jpg

product:delete

OpenCart 3.x root

Delete a product through the OpenCart admin product model.

Copy link

Usage

oc product:delete <product-id> [--force]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Arguments

  • <product-id>

    Product ID to delete.

Options

  • --force

    Delete without prompting for confirmation.

Examples

oc product:delete 100
oc product:delete 100 --force

Orders

Order listing, inspection, and status update commands.

order:list

OpenCart 3.x root

List orders with filters for customer, status, dates, totals, paging, and sorting.

Copy link

Usage

oc order:list [--customer=...] [--status-id=...] [--date-added=...] [options]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Options

  • --id

    Filter by order ID.

  • --customer

    Filter by customer name.

  • --status-id

    Filter by order status ID.

  • --date-added

    Filter by creation date, `YYYY-MM-DD`.

  • --date-modified

    Filter by update date, `YYYY-MM-DD`.

  • --total

    Filter by exact order total.

  • --sort

    Sort by `order_id`, `customer`, `order_status`, `date_added`, `date_modified`, or `total`.

  • --order

    Sort direction: `asc` or `desc`.

  • --page

    Page number.

  • --limit

    Results per page.

  • --format

    Render output as table, JSON, or YAML.

Examples

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=json

order:view

OpenCart 3.x root

Show one order, including products, totals, and recent history.

Copy link

Usage

oc order:view <order-id>

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Arguments

  • <order-id>

    Order ID to inspect.

Options

  • --format

    Render output as table, JSON, or YAML.

Examples

oc order:view 1
oc order:view 1 --format=json

order:update-status

OpenCart 3.x root

Add order history and update an order status by ID or exact status name.

Copy link

Usage

oc order:update-status <order-id> <status> [options]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Arguments

  • <order-id>

    Order ID to update.

  • <status>

    Status ID or exact current-language status name.

Options

  • --comment

    Status history comment.

  • --notify

    Mark the new history entry as notified.

  • --override

    Bypass OpenCart status-guard behavior when allowed.

Examples

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" --override

Admin Users

Admin user management commands.

user:list

OpenCart 3.x root

List admin users with group, status, sort, paging, and structured output options.

Copy link

Usage

oc user:list [--group=...] [--status=...] [options]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Options

  • --group

    Filter by user group ID.

  • --status

    Filter by `enabled`, `disabled`, or `all`.

  • --sort

    Sort by `username`, `status`, or `date_added`.

  • --order

    Sort direction: `asc` or `desc`.

  • --page

    Page number.

  • --limit

    Results per page.

  • --format

    Render output as table, JSON, or YAML.

Examples

oc user:list
oc user:list --status=enabled
oc user:list --group=1 --sort=date_added --order=desc --format=json

user:create

OpenCart 3.x root

Create an admin user through the OpenCart admin user model.

Copy link

Usage

oc user:create <username> <email> <password> [options]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Arguments

  • <username>

    Admin username.

  • <email>

    Admin email address.

  • <password>

    Admin password.

Options

  • --firstname

    First name.

  • --lastname

    Last name.

  • --group-id

    User group ID.

  • --status

    User status: `enabled` or `disabled`.

  • --image

    User image path relative to `image/`.

Examples

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=enabled

user:delete

OpenCart 3.x root

Delete an admin user, with protection against removing the last enabled administrator-equivalent user.

Copy link

Usage

oc user:delete <user> [--force]

Execution notes

Requires a real OpenCart 3.x installation root.

Run from inside the store root or pass `--opencart-root=/path/to/store`.

Arguments

  • <user>

    Numeric user ID or exact username.

Options

  • --force

    Bypass the final confirmation and safety prompt.

Examples

oc user:delete cli-admin
oc user:delete 7 --force