Skip to main content

No project description provided

Project description

Composer Version Manager

Composer 2 is here. It's time for a one stop shop for switching between major (and minor 👶) composer versions. Erase "using the right composer version" from your workflow.

But wait, what about composer self-update --1 and --2?

Well I'm glad you've asked!

There are some added benefits this CLI and shell hook will bring to you:

  1. Cached composer.phar for faster version toggling.
  2. Per-directory smart composer environments. It's as simple as cd my-project and the right composer version will be used.


Choose one of the options below to install cvm.

Homebrew (MacOS)

brew update
brew install composer-version-manager/cvm/cvm

Note: Watch for symlink errors. If you already have an existing Python3 installation you may be required to run the following command:

brew link --overwrite cvm

Chocolatey (Windows)


Download binary and update PATH


Hook onto your shell

Hooking onto your shell enables cvm Smart usage for per-directory automated composer verrsioning.

Find the instructions for your shell below. If your shell is not listed please feel free to submit a feature request issue and we will try and make it happen.


Add the following line to the end of your ~/.bashrc

eval "$(cvm hook bash)"


Add the following line to the end of your ~/.zshrc

eval "$(cvm hook zsh)"

Smart usage

Create a .cvm_config in any directory specifying the composer version you would like to use. Navigating to that directory or any nested directory will automatically enable that composer version in your current workspace.

cd my-project
echo '2.0.11' > .cvm_config

This file can be committed to your source control.

Global composer version

You can configure a global composer version. Which will be the default when no parent directory has a .cvm_config.

cvm list        # List available tags
cvm use 2.0.11  # Globally use a specific composer version


Morgan Wowk

Morgan is a Software Developer from the wintery lands of Canada 🇨🇦🍁. You can primarily find him on LinkedIn, writing open source or building apps to help tens of thousands of ecommerce stores.

Bhavek Budhia

Likewise, Bhavek resides in the frosty country of Canada ☃️. An avid developer 👨‍💻 with fortified experience in Python that has helped us develop a clean and extendable codebase.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

composer version manager-1.0.7.tar.gz (9.2 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page