PHPackages                             custom-services-limited/oc-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. custom-services-limited/oc-cli

ActiveProject[CLI &amp; Console](/categories/cli)

custom-services-limited/oc-cli
==============================

Command line interface for OpenCart - Created by Custom Services Limited

v1.0.4(1mo ago)0371GPL-3.0-or-laterPHPPHP ^7.4|^8.0CI passing

Since Aug 11Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Custom-Services-Limited/oc-cli)[ Packagist](https://packagist.org/packages/custom-services-limited/oc-cli)[ Docs](https://github.com/Custom-Services-Limited/oc-cli)[ RSS](/packages/custom-services-limited-oc-cli/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (26)Versions (9)Used By (0)

OC-CLI
======

[](#oc-cli)

OC-CLI is a Symfony Console CLI for OpenCart. The current workspace ships a stable command surface for store inspection, configuration, database operations, extensions, modifications, products, categories, orders, cache maintenance, and admin-user management.

Created by [Custom Services Limited](https://support.opencartgreece.gr/).

Stable command surface
----------------------

[](#stable-command-surface)

Registered OpenCart-focused commands in this repository:

### Core

[](#core)

- `core:version`
- `core:check-requirements`
- `core:config`

### Database

[](#database)

- `db:info`
- `db:backup`
- `db:restore`
- `db:check`
- `db:repair`
- `db:optimize`
- `db:cleanup`

### Cache

[](#cache)

- `cache:clear`
- `cache:rebuild`

### Extensions and modifications

[](#extensions-and-modifications)

- `extension:list`
- `extension:install`
- `extension:enable`
- `extension:disable`
- `modification:list`

### Catalog

[](#catalog)

- `category:list`
- `category:create`
- `product:list`
- `product:create`
- `product:update`
- `product:delete`

### Orders

[](#orders)

- `order:list`
- `order:view`
- `order:update-status`

### Admin users

[](#admin-users)

- `user:list`
- `user:create`
- `user:delete`

Requirements
------------

[](#requirements)

- PHP 7.4 or newer
- Composer
- MySQL or MariaDB access for the target OpenCart database
- A real OpenCart installation root for runtime-backed commands

Support notes
-------------

[](#support-notes)

- OC-CLI reads OpenCart connection details from `config.php` and related installation files, or from direct DB flags such as `--db-host`, `--db-user`, and `--db-name`.
- Runtime-backed commands bootstrap real OpenCart 3.x models and cache paths. These commands require `--opencart-root=/path/to/opencart` or execution from inside a real OpenCart 3.x installation root:
    - `cache:*`
    - `category:*`
    - `order:*`
    - `product:*`
    - `user:*`
- `core:config --admin` is deprecated. OpenCart stores settings in shared rows, so the flag is accepted only for backward compatibility and has no effect.
- `extension:install` imports OCMOD XML packages into the `*_modification` table. It is not a generic marketplace or ZIP installer.
- Unsupported schema or version combinations fail explicitly instead of falling back to guessed SQL behavior.

Installation
------------

[](#installation)

Global install:

```
composer global require custom-services-limited/oc-cli
```

Project-local install:

```
composer require --dev custom-services-limited/oc-cli
```

From this repository:

```
git clone https://github.com/Custom-Services-Limited/oc-cli.git
cd oc-cli
composer install
chmod +x bin/oc
```

Quick start
-----------

[](#quick-start)

Run inside a real OpenCart 3.x root:

```
oc core:version
oc core:check-requirements
oc product:list --limit=5
```

Run DB-native commands from anywhere with direct DB credentials:

```
oc db:info \
  --db-host=localhost \
  --db-user=oc_user \
  --db-pass=secret \
  --db-name=opencart
```

Run runtime-backed commands from anywhere by pointing at a store root:

```
oc product:list --opencart-root=/var/www/opencart --status=enabled --limit=10
```

Common examples
---------------

[](#common-examples)

Version and configuration:

```
oc core:version --opencart
oc core:config list
oc core:config get config_name
oc core:config set config_maintenance 1
```

Database maintenance:

```
oc db:backup nightly.sql --compress
oc db:check
oc db:optimize oc_product oc_order
oc db:cleanup
```

Extensions and modifications:

```
oc extension:list payment
oc extension:disable shipping:flat
oc extension:enable shipping:flat
oc extension:install ./build/test.ocmod.xml --activate
oc modification:list
```

Categories and products:

```
oc category:list --name=Desktops
oc category:create "CLI Specials" --parent-id=20 --keyword=cli-specials
oc product:create "CLI Demo Product" "CLI-DEMO-001" "19.99" --category=20 --status=enabled
oc product:update 100 --price=24.99 --quantity=8 --status=enabled
oc product:delete 100 --force
```

Orders:

```
oc order:list --customer=John --limit=10
oc order:view 1
oc order:update-status 1 Processing --comment="Approved from CLI" --notify
```

Cache and admin users:

```
oc cache:clear --type=all
oc cache:rebuild --type=all
oc user:list --status=enabled
oc user:create cli-admin cli-admin@example.com 'StrongPass!123' --firstname=CLI --lastname=Admin
oc user:delete cli-admin --force
```

Output formats
--------------

[](#output-formats)

Commands that expose `--format` support:

- `table`
- `json`
- `yaml`

Example:

```
oc order:list --format=json
```

Development
-----------

[](#development)

Useful checks:

```
composer test
composer test:e2e
composer cs-check
composer analyze
```

Additional documentation:

- [Installation guide](docs/installation.md)
- [Commands reference](docs/commands.md)
- [Examples](docs/examples.md)
- [Development guide](docs/development.md)
- [Database schema notes](docs/database-schema.md)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance93

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~73 days

Total

5

Last Release

34d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.0

v1.0.3PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2bfee2a6b1b6178fe051096c162aa796d8da1d89cb90cc68c0cef68f3985d26?d=identicon)[botonakis](/maintainers/botonakis)

---

Top Contributors

[![konstantinosbotonakis](https://avatars.githubusercontent.com/u/37538071?v=4)](https://github.com/konstantinosbotonakis "konstantinosbotonakis (84 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

clicli-appopencartopencart-2xopencart-3xopencart-4xclicommand-lineecommerceopencart

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/custom-services-limited-oc-cli/health.svg)

```
[![Health](https://phpackages.com/badges/custom-services-limited-oc-cli/health.svg)](https://phpackages.com/packages/custom-services-limited-oc-cli)
```

###  Alternatives

[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M420](/packages/drupal-core-recommended)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
