PHPackages                             laradic/symfony-console-autocomplete - 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. laradic/symfony-console-autocomplete

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

laradic/symfony-console-autocomplete
====================================

Shell completion for Symfony Console based scripts

v1.4.0(6y ago)06MITPHP

Since Dec 13Pushed 6y agoCompare

[ Source](https://github.com/laradic/symfony-console-autocomplete)[ Packagist](https://packagist.org/packages/laradic/symfony-console-autocomplete)[ RSS](/packages/laradic-symfony-console-autocomplete/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (19)Used By (0)

Symfony console autocomplete
============================

[](#symfony-console-autocomplete)

> This fork includes `composer/xdebughandler`.

[![Travis Status](https://camo.githubusercontent.com/73ed5ecb9c4699681c0641e1a87676977371a37ddd7196d53579635a2f66dcda/68747470733a2f2f7472617669732d63692e6f72672f62616d61726e692f73796d666f6e792d636f6e736f6c652d6175746f636f6d706c6574652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bamarni/symfony-console-autocomplete)[![Latest Stable Version](https://camo.githubusercontent.com/8f9c5d5c1595ffc25f65d00739f5cdacc728ab775c87e44ad37f83a77019e326/68747470733a2f2f706f7365722e707567782e6f72672f62616d61726e692f73796d666f6e792d636f6e736f6c652d6175746f636f6d706c6574652f76657273696f6e2e706e67)](https://packagist.org/packages/bamarni/symfony-console-autocomplete)[![Total Downloads](https://camo.githubusercontent.com/fef320a18ce25eded7b8ba7a25545481b9ec728e9ea7f667d328c4b965ce4951/68747470733a2f2f706f7365722e707567782e6f72672f62616d61726e692f73796d666f6e792d636f6e736f6c652d6175746f636f6d706c6574652f642f746f74616c2e706e67)](https://packagist.org/packages/bamarni/symfony-console-autocomplete)

Enables shell autocompletion for tools based on the [Symfony Console](http://symfony.com/doc/master/components/console/introduction.html)(Symfony framework, Composer, PHPSpec, Behat, etc.)

[![](https://cloud.githubusercontent.com/assets/1205386/12221229/ecbda408-b791-11e5-8b2f-524763250a53.png)](https://cloud.githubusercontent.com/assets/1205386/12221229/ecbda408-b791-11e5-8b2f-524763250a53.png)

Prerequisites
-------------

[](#prerequisites)

- Make sure the global composer project is configured properly with your shell. Notably, the composer global bin directory needs to be in your path. See  for instructions on how todo that.
- If you're using bash, you'll have to make sure [programmable completion functions](https://github.com/scop/bash-completion) are available. Linux distributions usually ship it and enable it by default. On Mac OSX, you can install it with brew (`brew install bash-completion`) and enable it by adding `source $(brew --prefix)/etc/bash_completion` at the end of your `.bashrc`.

Installation
------------

[](#installation)

Install the tool globally with Composer :

```
composer global require bamarni/symfony-console-autocomplete

```

Quick setup
-----------

[](#quick-setup)

Add the following line at the end of your shell configuration file (`~/.bash_profile` or `~/.zshrc`) :

```
eval "$(symfony-autocomplete)"

```

Close / re-open your terminal window and you're ready to go!

Static setup
------------

[](#static-setup)

If you don't like all the magic from the quick setup and want to go with a more standard way, you can dump a static completion file for a given tool :

```
symfony-autocomplete composer

```

This will print the completion script for Composer to stdout. The output should be saved at a specific location depending on your OS / setup. Here are a few examples :

```
# BASH - Ubuntu / Debian
symfony-autocomplete composer | sudo tee /etc/bash_completion.d/composer

# BASH - Mac OSX (with Homebrew "bash-completion")
symfony-autocomplete composer > $(brew --prefix)/etc/bash_completion.d/composer

# ZSH - Config file
symfony-autocomplete composer > ~/.composer_completion && echo "source ~/.composer_completion" >> ~/.zshrc

# FISH
symfony-autocomplete composer > ~/.config/fish/completions/composer.fish

```

If you are running an environment that does not have automatic execution of PHP scripts, then you will need to call PHP and the script in question :

```
symfony-autocomplete "php ./artisan"

```

General tips
------------

[](#general-tips)

### Update

[](#update)

To update the tool to a new version use :

```
composer global update bamarni/symfony-console-autocomplete

```

### Symfony framework completion

[](#symfony-framework-completion)

In order to get completion running, you shouldn't prepend `php` at the begining of the command :

```
app/console [TAB]

```

Tips for Bash users
-------------------

[](#tips-for-bash-users)

### Alias support

[](#alias-support)

By default, completion for your aliases won't be enabled. If you're using aliases (eg. "c" for "composer", "pspec" for "phpspec", etc.), you have to pass them explicitly :

```
symfony-autocomplete --aliases=c --aliases=pspec

```

Tips for Docker users
---------------------

[](#tips-for-docker-users)

### Defining the `SHELL` environment variable

[](#defining-the-shell-environment-variable)

If you connect to your container using something similar to `docker exec -it container bash` then you may find that the completions cannot be built due to an inability to locate the `SHELL`environment variable. This has been reported in [bamarni#32](https://github.com/bamarni/symfony-console-autocomplete/issues/32)

A solution is to supply the `SHELL` environment variable as part of the `docker exec` command:

```
docker exec -e SHELL=bash -it container bash

```

Supported tools
---------------

[](#supported-tools)

All tools using the Symfony Console component are supported, here is a non-exhaustive list :

- composer
- php-cs-fixer
- behat
- phpspec
- robo
- deployer
- laravel's artisan

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 52.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

Every ~80 days

Recently: every ~127 days

Total

18

Last Release

2435d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/303828383a9c2bf382436a61f4471425428b28c095c6df9a9714444cbc163538?d=identicon)[radic](/maintainers/radic)

---

Top Contributors

[![bamarni](https://avatars.githubusercontent.com/u/1205386?v=4)](https://github.com/bamarni "bamarni (41 commits)")[![rquadling](https://avatars.githubusercontent.com/u/12801?v=4)](https://github.com/rquadling "rquadling (15 commits)")[![RobinRadic](https://avatars.githubusercontent.com/u/754732?v=4)](https://github.com/RobinRadic "RobinRadic (5 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (4 commits)")[![andytson-inviqa](https://avatars.githubusercontent.com/u/11387086?v=4)](https://github.com/andytson-inviqa "andytson-inviqa (3 commits)")[![TomaszGasior](https://avatars.githubusercontent.com/u/1395027?v=4)](https://github.com/TomaszGasior "TomaszGasior (2 commits)")[![dbu](https://avatars.githubusercontent.com/u/76576?v=4)](https://github.com/dbu "dbu (2 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (1 commits)")[![Slamdunk](https://avatars.githubusercontent.com/u/152236?v=4)](https://github.com/Slamdunk "Slamdunk (1 commits)")[![bbatsche](https://avatars.githubusercontent.com/u/500909?v=4)](https://github.com/bbatsche "bbatsche (1 commits)")[![ktomk](https://avatars.githubusercontent.com/u/352517?v=4)](https://github.com/ktomk "ktomk (1 commits)")[![vworldat](https://avatars.githubusercontent.com/u/650955?v=4)](https://github.com/vworldat "vworldat (1 commits)")[![samnela](https://avatars.githubusercontent.com/u/1852108?v=4)](https://github.com/samnela "samnela (1 commits)")

### Embed Badge

![Health badge](/badges/laradic-symfony-console-autocomplete/health.svg)

```
[![Health](https://phpackages.com/badges/laradic-symfony-console-autocomplete/health.svg)](https://phpackages.com/packages/laradic-symfony-console-autocomplete)
```

###  Alternatives

[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k69](/packages/humbug-box)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[mglaman/drupal-check

CLI tool for running checks on a Drupal code base

3426.6M42](/packages/mglaman-drupal-check)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)

PHPackages © 2026

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