PHPackages                             allapps2/shortcuts - 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. allapps2/shortcuts

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

allapps2/shortcuts
==================

Console shortcuts for sets of commands

2.1.0(9mo ago)026MITPHPPHP &gt;=8.2

Since Jun 20Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/allapps2/shortcuts)[ Packagist](https://packagist.org/packages/allapps2/shortcuts)[ RSS](/packages/allapps2-shortcuts/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (9)Used By (0)

shortcuts
=========

[](#shortcuts)

Console tool to call sets of commands using short aliases.

A distinctive feature is that it is configured entirely in **PHP**, which means accessibility of **code-completion**, finding of **usage**, using of your application **constants**, **validation** and actually brings the whole range of PHP possibilities and your IDE features.

The disadvantage of this is that the configuration is more verbose compared to YAML and other simple formats, but it is negligible compared to the benefits that the integration into the host application brings.

installation
------------

[](#installation)

### requirements

[](#requirements)

- PHP 8.2+
    php-cli package is enough (for example on Alpine Linux it can be installed by `apk add php82-cli`).

### download

[](#download)

download `short.phar` from and put it into your project (for example to .for-auto-completion folder to be used by your IDE like PhpStorm for code auto-completion).

### global install

[](#global-install)

to make `sc` alias available everywhere:

`sudo php short.phar install-global`

or any custom alias:

`sudo php short.phar install-global myalias`

usage
-----

[](#usage)

in folder with shortcuts.php:

`sc [ []]`

### example of shortcuts.php:

[](#example-of-shortcutsphp)

```
use Shortcuts\Command\CommandsCollection;
use Shortcuts\IBuilder;
use Shortcuts\Shortcut;
use Shortcuts\ShortcutArg;
use Shortcuts\ShortcutsCollection;
use Shortcuts\ShortcutsCollectionFactory;

class Shortcuts extends ShortcutsCollection
{
    function shortcut1(): CommandsCollection
    {
        return (new CommandsCollection)->add('long command1');
    }

    #[Shortcut(description: 'Shortcut description')]
    function shortcut2(
        string $requiredArgument,
        #[ShortcutArg(description: 'Optional argument')]
        string $optionalArgument = 'default value'
    ): CommandsCollection
    {
        return (new CommandsCollection)
            ->add('long command2 ' . $requiredArgument)
            ->add('long command3 ' . $optionalArgument);
    }
}

return new class implements IBuilder {
    function build(ShortcutsCollectionFactory $factory): ShortcutsCollection {
        return $factory->create(Shortcuts::class);
    }
};
```

for contributors
----------------

[](#for-contributors)

see [CONTRIBUTING.md](/CONTRIBUTING.md)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance57

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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 ~58 days

Recently: every ~97 days

Total

8

Last Release

286d ago

Major Versions

1.4.1 → 2.0.02025-01-10

### Community

Maintainers

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

---

Top Contributors

[![allapps2](https://avatars.githubusercontent.com/u/152030297?v=4)](https://github.com/allapps2 "allapps2 (1 commits)")

### Embed Badge

![Health badge](/badges/allapps2-shortcuts/health.svg)

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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