Skip to content

ZideStudio/avm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

avm logo

Table of Contents

Intro

Auto Version Manager is a command-line tool that allows you to easily manage your versionning tools on your terminal. AVM checks your current files to find out which version is based on (rc files, your Dockerfile or your json and tome configuration).

Example:

$ avm run # Avm will update your language versions
AVM Node.js • Now using v22.14.0
AVM Go • Now using v1.24.1
[...]

$ node -v
v22.14.0

$ go version
go version go1.24.1 darwin/arm64

Simple as that! 😏

Installation

To install avm, you should run the install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command:

curl -sSL https://github.com/ZideStudio/avm/releases/latest/download/install.sh | bash
wget -qO- https://github.com/ZideStudio/avm/releases/latest/download/install.sh | bash

When you run the install script, it will prompt you with several questions to set up AVM according to your preferences. You will have the option to configure AVM to run automatically each time you open a terminal, and to enable automatic updates.

Compatibility

AVM deals with the following version managers :

  • Node.js: nvm
  • Go: gvm
  • Rust: rustup
  • Ruby: rbenv
  • Python: pyenv
  • Java: jenv
  • PHP: phpenv

How It Works

AVM is a command-line utility designed to automate the updating of version managers for various programming languages. It identifies version files in your project directory and updates the relevant version managers based on the versions detected.

Language versions can be identified from the following files:

  • Node.js: .nvmrc, .node-version, package.json
  • Go: go.mod
  • Rust: rust-toolchain
  • Ruby: .rbenv, .rvmrc, .ruby-version, .ruby-gemset
  • All languages: Dockerfile (used if no other files are found)

Commands

  • avm run: Scans for version files and updates all your language version managers based on the detected versions.
  • avm run --managers [nvm gvm rustup rbenv]: Executes the avm run command but limits the updates to the specified version managers.
  • avm version: Displays the current version of the AVM CLI.
  • avm update: Updates the AVM CLI to the latest version.
  • avm help: Shows the help message with usage instructions.

Uninstall

To uninstall AVM, simply remove the installation script from your system :

rm -rf ~/.avm

Don't forget to delete the AVM alias from your rc file, such as ~/.bashrc or ~/.zshrc.

The section to remove looks like this:

# AVM - Auto Version Manager
avm() { source ~/.avm/bin/avm "$@"; }
avm run --managers all # Automatically call avm cli each time terminal opens
avm update --auto # Auto-update AVM daily

Contributing

You can contribute to the project by submitting pull requests or opening issues on the GitHub repository.

To run the project locally, first clone the repository and then use the following command:

source ./avm.sh

About

Auto Version Manager - No need to worry about version managers for your languages!

Resources

License

Stars

Watchers

Forks

Contributors

Languages