PHPackages                             concrete5/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. concrete5/cli

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

concrete5/cli
=============

concrete5 CLI tool

v0.1(5y ago)6134[3 issues](https://github.com/concrete5-community/cli/issues)[1 PRs](https://github.com/concrete5-community/cli/pulls)MITPHP

Since Jun 1Pushed 1y ago4 watchersCompare

[ Source](https://github.com/concrete5-community/cli)[ Packagist](https://packagist.org/packages/concrete5/cli)[ Docs](https://www.concrete5.org/)[ RSS](/packages/concrete5-cli/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Unifficial concrete5 Command Line Interface tools
=================================================

[](#unifficial-concrete5-command-line-interface-tools)

You may also be interested in the official CLI tool, available at

---

concrete5 wrapper
-----------------

[](#concrete5-wrapper)

This repository contains two shell scripts (`c5` for POSIX shells, `c5.bat` for Windows) that you can place in a directory of your path (for example `/usr/local/bin` for POSIX shells, or `C:\Windows\System32` for Windows).

Once you do it, you can run the concrete5 CLI commands by simply invoking `c5` from your shells. In order to detect the location of concrete5, the current working directory can be any of the following:

- the concrete5 webroot
- any sub-directory of the concrete5 webroot
- the parent directory of the concrete5 webroot (provided that the concrete5 webroot is a folder named `public` or `web`)

For example, if concrete5 is installed in `/var/sites/example/public`, `c5` will detect concrete5 if the current directory is any of the following locations:

- `/var/sites/example`
- `/var/sites/example/public`
- `/var/sites/example/public/packages`
- `/var/sites/example/public/packages/my_package/blocks/my_block`

(the same principle applies to Windows)

### POSIX-specific details

[](#posix-specific-details)

#### Running concrete5 as a different user

[](#running-concrete5-as-a-different-user)

You can let `c5` execute the concrete5 CLI commands as another user by using the `C5_SUDOAS` environment variable. It requires that the `sudo` command is available.

For example:

```
C5_SUDOAS=www-data c5 c5:info
```

#### *Sourcing* the script

[](#sourcing-the-script)

Instead of copying the `c5` script to a directory of your path, you can also *source* it (that is, preload it), for example in your shell initialization script (`~/.bashrc` for bash):

```
. /path/to/c5
```

Once you have reloaded your shell, you'll have the `c5` function available.

### Windows-specific details

[](#windows-specific-details)

At least under Windows 7, the c5 script is recognized when in `C:\Windows\System32` but it doesn't necessarily work for the composerpkg script (*see below for details about composerpkg*)

The first issue is that the script might be locked by the system.

**Click on the composerpkg script and bring up the properties screen. At the bottom you should see an option to unlock it if it's locked.**

Generally speaking, it is probably better to put both your scripts in a custom folder, make sure neither composerpkg or c5 are locked by the system, and add your custom folder to your path.

For instance:

- Add c5, c5.bat, composerpkg and composerpkg.bat to `C:\Dev\Util\Bin` (create the folder)
- Then add your folder `C:\Dev\Util\Bin` to your path.

You can [find out how to add a folder to your Path on this page](https://www.java.com/en/download/help/path.xml "Add a folder to your Windows Path") (it's Java specific but the process is the same for any folder)

composer wrapper for package dependencies
-----------------------------------------

[](#composer-wrapper-for-package-dependencies)

When writing packages for concrete5, you may require composer libraries. When using a composer-based concrete5 installation, this is not a problem, since composer will handle flawlessly your dependencies, and create an autoloader for you.

Problems arise when your package is going to be installed without composer, and you need to provide the composer libraries together with your package.

For example, let's assume that you have in your package `composer.json` file these requirements:

```
{
    "require": {
        "concrete5/core": "^8.5.1",
        "some_vendor/some_package": "1"
    }
}
```

This is totally legal: you are telling composer that your package requires concrete5 version 8.5.1 (or any later 8.x version), and that you need the `some_vendor/some_package` package. By the way, if you run a `composer install` because you want to distribute your package, composer will download concrete5 and install it in your vendor directory, which of course you don't want to.

Another problem arises when your package requires (directly or indirectly) a library that's already included in concrete5 vendor directory. That leads to having to having two running copies of the same library (one in the concrete5 vendor directory, and one in your package vendor directory). This is a waste of space, and the actual version being used may be undetermined.

To avoid these problems, you can run the `composerpkg` command included in this repository (for Windows users, you'll also need the `composerpkg.bat` file - to be saved in the same directory as the `composerpkg` file). `composerpkg` accepts the same arguments accepted by the plain `composer` command, but when you install/update the dependencies, you won't have duplicated stuff in your vendor directory.

By default, `composerpkg` will run Composer by invoking the `composer` command. If you need to customize it, you can use the `COMPOSERPKG_BIN` environment variable. For example:

```
# On Linux & Mac
COMPOSERPKG_BIN='/path/to/your/composer' composerpkg ...
# or
COMPOSERPKG_BIN='/path/to/your/composer'
export COMPOSERPKG_BIN
composerpkg ...

# On Windows (with cmd.exe)
set COMPOSERPKG_BIN="C:\path\to\your\composer"
composerpkg ...

# On Windows (with PowerShell)
$Env:COMPOSERPKG_BIN='C:\path\to\your\composer'
composerpkg ...
```

You can make composerpkg verbose by setting the `COMPOSERPKG_VERBOSE` to `1`.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance24

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.6% 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

Unknown

Total

1

Last Release

2174d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/842d2fe13512e82f0f9b6f0d79dba8eba1595a3cefd31dd51723960436133307?d=identicon)[KorvinSzanto](/maintainers/KorvinSzanto)

---

Top Contributors

[![mlocati](https://avatars.githubusercontent.com/u/928116?v=4)](https://github.com/mlocati "mlocati (17 commits)")[![KorvinSzanto](https://avatars.githubusercontent.com/u/1007419?v=4)](https://github.com/KorvinSzanto "KorvinSzanto (7 commits)")[![aembler](https://avatars.githubusercontent.com/u/527809?v=4)](https://github.com/aembler "aembler (3 commits)")[![a3020](https://avatars.githubusercontent.com/u/1431100?v=4)](https://github.com/a3020 "a3020 (1 commits)")[![mnakalay](https://avatars.githubusercontent.com/u/1488833?v=4)](https://github.com/mnakalay "mnakalay (1 commits)")

---

Tags

concrete5consolecliconcrete5concreteCMS

### Embed Badge

![Health badge](/badges/concrete5-cli/health.svg)

```
[![Health](https://phpackages.com/badges/concrete5-cli/health.svg)](https://phpackages.com/packages/concrete5-cli)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B11.3k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k239.8M286](/packages/nunomaduro-termwind)[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[wp-cli/php-cli-tools

Console utilities for PHP

68325.0M367](/packages/wp-cli-php-cli-tools)[socialengine/sniffer-rules

A Lumen 5 and Laravel 5 SquizLabs Code Sniffer 2.0 artisan command. Detect violations of a defined coding standard. It helps your code remains clean and consistent.

1248.2k1](/packages/socialengine-sniffer-rules)

PHPackages © 2026

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