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(3mo ago)6259.2k↑11.3%5[2 issues](https://github.com/kylekatarnls/carbon-cli/issues)9MITPHPPHP ^7.1 || ^8.0CI failing

Since Jul 12Pushed 3mo 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 3d ago

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

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

54

—

FairBetter than 96% of packages

Maintenance71

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community22

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

119d 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

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

10244.2k5](/packages/bitrix24-b24phpsdk)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[ymirapp/cli

Ymir command-line tool

2621.7k](/packages/ymirapp-cli)[pimcore/studio-backend-bundle

Pimcore Studio Backend Bundle

20203.9k22](/packages/pimcore-studio-backend-bundle)[japanese-date/japanese-date

日本の暦、祝日を取り扱うライブラリ

1610.0k](/packages/japanese-date-japanese-date)

PHPackages © 2026

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