PHPackages                             sunlight-cms/console - 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. sunlight-cms/console

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

sunlight-cms/console
====================

Sunlight CMS command-line utilities

v1.1.2(1y ago)01071MITPHPPHP &gt;=7.1

Since Sep 13Pushed 1y ago2 watchersCompare

[ Source](https://github.com/sunlight-cms/console)[ Packagist](https://packagist.org/packages/sunlight-cms/console)[ RSS](/packages/sunlight-cms-console/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (6)Used By (1)

SunLight CMS console
====================

[](#sunlight-cms-console)

This library provides various CLI commands to help develop and maintain a SunLight CMS project.

Contents

- [Installation](#installation)
- [Configuration](#configuration)
    - [Supported options](#supported-options)
        - [cms](#cms)
            - [version](#version)
            - [archive](#archive)
            - [plugins](#plugins)
            - [installer](#installer)
        - [commands](#commands)
            - [Commands from other packages](#commands-from-other-packages)
        - [is-fresh-project](#is-fresh-project)
- [Usage](#usage)
    - [Commands](#id1)
    - [Command name matching](#command-name-matching)

[Installation](#id2)
--------------------

[](#installation)

The [SunLight CMS skeleton](https://github.com/sunlight-cms/skeleton)provides this console already pre-configured.

If you want to add this console into a project not based on the skeleton, you can do so using [Composer](https://getcomposer.org/):

```
composer require sunlight-cms/console
```

[Configuration](#id3)
---------------------

[](#configuration)

The console will read configuration from your project's *composer.json* file.

```
{
    // ...
    "extra": {
        "sunlight-console": {
            "cms": {
                "version": "latest"
            }
        }
    }
}
```

### [Supported options](#id4)

[](#supported-options)

#### [cms](#id5)

[](#cms)

Options related to how the CMS files are downloaded.

##### [version](#id6)

[](#version)

Required

CMS version to download.

If `zip-url` is set in [cms.archive](#archive), the CMS will be downloaded from the specified URL. In that case the version string can have any format.

If [cms.archive](#archive) is configured to use a git repository, the version string can have these formats:

- `latest` - will download the latest supported version (and also update `cms.version` to that version)
- `8.0.0` - will download the exact tagged version
- `~8.0.0` - will find and download a tagged version matching the [constraint](https://getcomposer.org/doc/articles/versions.md)
- `dev-master` - will download the latest version of the specified branch

##### [archive](#id7)

[](#archive)

Default: configured to use

```
"archive": {
    "zip-url": null,
    "zip-paths-prefix": "sunlight-cms-%version%/",
    "git-url": "https://github.com/sunlight-cms/sunlight-cms.git",
    "git-branch-zip-url": "https://github.com/sunlight-cms/sunlight-cms/archive/refs/heads/%version%.zip",
    "git-tag-zip-url": "https://github.com/sunlight-cms/sunlight-cms/archive/refs/tags/v%version%.zip",
    "git-tag-pattern": "v8*"
}
```

- `zip-url` - CMS archive download URL or `null` to use a git repository
- `zip-paths-prefix` - prefix of the paths in the archive (can be empty)
- `git-url` - git repository URL to scan for tags or `null`
- `git-branch-zip-url` - URL that serves a branch as a .zip file or `null`
- `git-tag-zip-url` - URL that serves a tag as a .zip file or `null`
- `git-tag-pattern` - pattern for tag matching (used in git ls-remote) or `null`

Note

`zip-paths-prefix`, `git-branch-zip-url` and `git-tag-zip-url` may contain a `%version%` placeholder which will be replaced by the specified [cms.version](#version)

##### [plugins](#id8)

[](#plugins)

Default: no plugins

List of plugins to extract from the CMS archive. Templates will not be overwritten.

```
"plugins": {
    "extend": [
        "devkit",
        "codemirror",
        "lightbox"
    ],
    "templates": [
        "default",
        "blank"
    ],
    "languages": [
        "cs",
        "en"
    ]
}
```

##### [installer](#id9)

[](#installer)

Default: `true`

Boolean value indicating whether to extract the *install/* directory from the CMS archive.

Note

The installer will only be extracted if the CMS files don't already exist.

---

#### [commands](#id10)

[](#commands)

Default: `[]`

Map of custom commands to add to the console.

Example:

```
"commands": {
    "example.foo": {
        "class": "Example\\FooCommand"
    },
    "example.bar": {
        "class": "Example\\BarCommand"
    }
}
```

The command classes must extend `SunlightConsole\Command`.

Note

See *src/Config/ServiceConfig.php* for a full list of supported options.

##### [Commands from other packages](#id11)

[](#commands-from-other-packages)

Other installed Composer packages can define commands the same way in their *composer.json*.

In this case, only the `commands` option will be read and all others will be ignored.

The package can have any [type](https://getcomposer.org/doc/04-schema.md#type) other than "project".

#### [is-fresh-project](#id12)

[](#is-fresh-project)

Default: `false`

Boolean value indicating that this is a fresh project.

If set to `true`, the next time the CMS files are downloaded some additional updates will be made to *composer.json*:

- name, description and license will be unset
- the `is-fresh-project` option will be unset
- if a semver version constraint (or "latest") has been used to locate the CMS archive, the [cms.version](#version) will be automatically changed to the installed version number

[Usage](#id13)
--------------

[](#usage)

```
bin/console  [options] [args]
```

### [Commands](#id14)

[](#commands-1)

The console provides the following commands by default:

(Run `bin/console` or `bin/console help` to show more information about the available commands.)

```
backup.create          create a backup
cache.clear            clear the cache
cms.download           download CMS files
cms.info               show information about the CMS
cms.patch              apply a patch to CMS files in the project
config.create          create config.php with default contents
config.dump            dump config.php contents
config.set             modify an option in config.php
db.dump                dump database
db.import              import a SQL dump
db.query               execute a SQL query
log.monitor            continuously print out log entries
log.search             search log entries
plugin.action          perform a plugin action (or list actions if no action is given)
plugin.install         install plugin from a ZIP file or an URL
plugin.list            list all plugins
plugin.show            show information about a plugin
project.dump-config    dump resolved project configuration
user.reset-password    reset password for the given user
help                   show help
```

Tip

You can also pass `--help` to any command to show help for it.

### [Command name matching](#id15)

[](#command-name-matching)

It is possible to pass partial command names if it is not ambiguous.

For example:

- `bin/console ca.cl` will run the `cache.clear` command
- `bin/console pl.s devkit` will run the `plugin.show` command

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance48

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~147 days

Total

5

Last Release

387d ago

### Community

Maintainers

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

---

Top Contributors

[![shira-374](https://avatars.githubusercontent.com/u/1024071?v=4)](https://github.com/shira-374 "shira-374 (36 commits)")

### Embed Badge

![Health badge](/badges/sunlight-cms-console/health.svg)

```
[![Health](https://phpackages.com/badges/sunlight-cms-console/health.svg)](https://phpackages.com/packages/sunlight-cms-console)
```

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[nunomaduro/phpinsights

Instant PHP quality checks from your console.

5.6k10.8M426](/packages/nunomaduro-phpinsights)[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k69](/packages/humbug-box)[pantheon-systems/terminus

A command line interface for Pantheon

3391.5M13](/packages/pantheon-systems-terminus)[consolidation/self-update

Provides a self:update command for Symfony Console applications.

10457.0M22](/packages/consolidation-self-update)[wp-cli/extension-command

Manages plugins and themes, including installs, activations, and updates.

919.0M53](/packages/wp-cli-extension-command)

PHPackages © 2026

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