PHPackages                             brace/command - 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. brace/command

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

brace/command
=============

Provides a cli brace command to access di context

0789PHP

Since Jul 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/brace-project/brace-command)[ Packagist](https://packagist.org/packages/brace/command)[ RSS](/packages/brace-command/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

brace-mod-body
==============

[](#brace-mod-body)

Offers `brace`-command on command line

Example
-------

[](#example)

```
 $app->command->addCommand("analyze", function (array $arguments = []) {

    if ($arguments["--thread_id"] !== null) {

    }

}, "", [new CliValueArgument("--thread_id", "Thread ID to analyze")]);
```

Example
-------

[](#example-1)

Add this to `10_di.php`

```
$app->addModule(new CommandModule())

```

And create `30_command.php`

```
$app->command->addCommand("command1", function() {
    echo "Hello World";
});

// Execute command1 every 5 seconds
$app->command->addInterval(5, "command1");

// Support Cron format
$app->command->addInterval("* * * * *", "command1");

// Execut once per hour
$app->command->addInterval("5 * * * *", "command1");
$app->command->addInterval("5,10,15,20 * * * *", "command1");
```

Run the Scheduler
-----------------

[](#run-the-scheduler)

```
brace scheduler
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/878a384d056698a2400e4b7c8858db05a6caebb2c560e67151be36d46d58def0?d=identicon)[dermatthes](/maintainers/dermatthes)

---

Top Contributors

[![dermatthes](https://avatars.githubusercontent.com/u/13380559?v=4)](https://github.com/dermatthes "dermatthes (19 commits)")

### Embed Badge

![Health badge](/badges/brace-command/health.svg)

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

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)

PHPackages © 2026

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