Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

This Symfony2 bundle provides a simple way of autocompleting your commands in your shell.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 Command
Octocat-spinner-32 Resources
Octocat-spinner-32 KnplabsConsoleAutocompleteBundle.php
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown


This bundle provides a simple way of autocompleting your commands in your shell.


Download the bundle and put it under the Knplabs/ namespace.

If you use git submodules:

git submodule add git:// src/Bundle/Knplabs/ConsoleAutocompleteBundle

Then, like for any other bundle, include it in your Kernel class:

public function registerBundles()
    $bundles = array(
        // enable third-party bundles
        new Bundle\Knplabs\ConsoleAutocompleteBundle\KnplabsConsoleAutocompleteBundle(),

        // register your bundles


The first time you install ConsoleAutocompleteBundle in a project, you should add Resources/Shells/symfony2-completion.bash in your bash profile (in ~/.bash_profile on MacOS):

source /path-to-symfony2-completion.bash

That's it! Now when you type:

./app/console doc[TAB], you should see an autocompletion of the command name.

./app/console doctrine:data:load --[TAB], you should see an autocompletion of the option names.

Valid executable names are:

  • console
  • console-dev
  • console-prod
  • console-staging
  • console-test
  • Symfony

If none of these names do it for you, you can enable completion for your own executable. Add this line to your bash profile, just below where you sourced symfony2-completion.bash:

complete -F _console my-console-name

Copyright & Credits

ConsoleAutocompleteBundle Copyright (c) 2011 knpLabs.
See LICENSE for details.


Something went wrong with that request. Please try again.