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

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

carbon-cli/carbon-cli
=====================

CLI tool for Carbon

1.4.0(2mo ago)6237.6k—7.4%5[2 issues](https://github.com/kylekatarnls/carbon-cli/issues)8MITPHPPHP ^7.1 || ^8.0CI failing

Since Jul 12Pushed 2mo agoCompare

[ Source](https://github.com/kylekatarnls/carbon-cli)[ Packagist](https://packagist.org/packages/carbon-cli/carbon-cli)[ GitHub Sponsors](https://github.com/kylekatarnls)[ Fund](https://opencollective.com/Carbon)[ RSS](/packages/carbon-cli-carbon-cli/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (9)Used By (8)

carbon-cli
==========

[](#carbon-cli)

CLI tool for Carbon

Install
-------

[](#install)

```
composer require carbon-cli/carbon-cli
```

Note that if you have `nesbot/carbon` installed yet and try to run a command, Carbon will automatically try to install the CLI using global composer command.

Usage
-----

[](#usage)

### macro

[](#macro)

Generate macro helpers files for your IDE.

```
./vendor/bin/carbon macro NameSpace1\\Class1 NameSpace2\\Class2 src/macro-file.php
```

You can pass classes and files to the `macro` commands, classes will be loaded into Carbon as mixin, files will be loaded via `include` so you can run `Carbon::macro()` inside.

It will create **\_ide\_carbon\_mixin\_instantiated.php** and **\_ide\_carbon\_mixin\_macro.php** with all mixin/macro methods signatures, so your IDE will be able to auto-complete them on Carbon facade and instances.

You can commit those files into your project. And you should re-run the command when adding a new mixin/macro.

You also can store the list in your **composer.json**:

```
{
  "extra": {
    "carbon": {
      "macros": [
        "NameSpace1\\Class1",
        "NameSpace2\\Class2",
        "src/macro-file.php"
      ]
    }
  }
}
```

Then run:

```
./vendor/bin/carbon macro --composer true
```

By default, the command will only consider the current directory (app, sources, tests, vendor, etc.) and so will also include the composer settings of your installed vendor packages.

To restrict to a given directory, use:

```
./vendor/bin/carbon macro --source-path app/Carbon
```

This will consider only mixin/macro declared inside **app/Carbon** directory.

This option can be used either with `--composer` option, with arguments list or both.

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance79

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~347 days

Recently: every ~606 days

Total

8

Last Release

73d ago

Major Versions

0.1.1 → 1.0.02019-07-14

### Community

Maintainers

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

---

Top Contributors

[![kylekatarnls](https://avatars.githubusercontent.com/u/5966783?v=4)](https://github.com/kylekatarnls "kylekatarnls (39 commits)")[![adnweedon](https://avatars.githubusercontent.com/u/81413869?v=4)](https://github.com/adnweedon "adnweedon (11 commits)")[![balda38](https://avatars.githubusercontent.com/u/12472148?v=4)](https://github.com/balda38 "balda38 (1 commits)")[![marshall-davis](https://avatars.githubusercontent.com/u/3332576?v=4)](https://github.com/marshall-davis "marshall-davis (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[n98/magerun

Tools for managing Magento projects and installations

1.4k264.7k7](/packages/n98-magerun)[yzh52521/schedule

task schedule,schedule,thinkphp schedule,任务调度

3611.2k1](/packages/yzh52521-schedule)[longman/geopayment

PHP library for working with Georgian payment providers and banks

451.4k](/packages/longman-geopayment)

PHPackages © 2026

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