All Projects → dotboris → alt

dotboris / alt

Licence: MIT license
A simple version manager. Tool for switching between different versions of commands

Programming Languages

rust
11053 projects
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to alt

Installer
dmd installers for various systems
Stars: ✭ 74 (+4.23%)
Mutual labels:  version-manager
Asdf
Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
Stars: ✭ 12,594 (+17638.03%)
Mutual labels:  version-manager
svm-rs
Solidity-Compiler Version Manager
Stars: ✭ 114 (+60.56%)
Mutual labels:  version-manager
Chruby Fish
Thin wrapper around chruby to make it work with the Fish shell
Stars: ✭ 85 (+19.72%)
Mutual labels:  version-manager
Nvm
nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL.
Stars: ✭ 53,926 (+75852.11%)
Mutual labels:  version-manager
Fvm
Flutter Version Manager. Flutter 多版本管理工具。 本地缓存安装多个 Flutter 版本,随时快速切换
Stars: ✭ 170 (+139.44%)
Mutual labels:  version-manager
Jdk switcher
A yet another Ubuntu/Debian-specific tool that makes switching between multiple JDK versions a one liner
Stars: ✭ 69 (-2.82%)
Mutual labels:  version-manager
kebechet
I'm Kebechet bot, goddess of freshness - I will keep your source code fresh and up-to-date
Stars: ✭ 23 (-67.61%)
Mutual labels:  version-manager
Nodenv
Manage multiple NodeJS versions.
Stars: ✭ 1,687 (+2276.06%)
Mutual labels:  version-manager
Nvm Windows
A node.js version management utility for Windows. Ironically written in Go.
Stars: ✭ 18,587 (+26078.87%)
Mutual labels:  version-manager
Nodist
Natural node.js and npm version manager for windows.
Stars: ✭ 1,276 (+1697.18%)
Mutual labels:  version-manager
Zsh Nvm
Zsh plugin for installing, updating and loading nvm
Stars: ✭ 1,670 (+2252.11%)
Mutual labels:  version-manager
Plugin Nvm
Node version manager wrapper for Fish shell
Stars: ✭ 173 (+143.66%)
Mutual labels:  version-manager
Oo
Simple Go Version Manager.
Stars: ✭ 77 (+8.45%)
Mutual labels:  version-manager
chimera-framework
Simple Language Agnostic Framework for Stand Alone and Distributed Computing
Stars: ✭ 17 (-76.06%)
Mutual labels:  language-agnostic
Terraenv
Terraform & Terragrunt Version Manager
Stars: ✭ 72 (+1.41%)
Mutual labels:  version-manager
Dvm
🚀 Fast and simple version manger for Deno without runtime dependencies
Stars: ✭ 142 (+100%)
Mutual labels:  version-manager
zsh-lazyenv
Environments for lazy load commands and speed up start up time of zsh
Stars: ✭ 16 (-77.46%)
Mutual labels:  version-manager
nodenv-nvmrc
nodenv plugin that detects the node version based on .nvmrc.
Stars: ✭ 30 (-57.75%)
Mutual labels:  version-manager
Generator Loopback Vue
app版本管理,(热更新)前后端分离,vue page分页功能,authenticate 权限控制,accesstoken机制,credentials,CI,docker
Stars: ✭ 202 (+184.51%)
Mutual labels:  version-manager

alt the version switcher

GitHub All Releases GitHub release (latest SemVer) License

alt is a command line utility that lets you switch between different versions of commands based on your current directory.

Screencast demo of alt

Why?

As developers, we work with a large number of tools. When we move from codebase to codebase, those tools and their versions change. Switching between the different versions of those tools every time you change codebase is a nightmare.

This is where alt comes in. It will automatically switch the version of commands when you move to a different codebase.

There are other tools out there that solve this problem. alt distinguish itself in a few ways:

  • tool / language agnostic: Some version switching tools only work with a specific tool or programming language. alt is generic. It works for any command.
  • no shell pollution: Most version switching tools hook themselves into your shell. This can slow down your shell's start time. alt does not hook into your shell. You can use it without slowing down your shell start time.
  • only version switching: Unlike other tools, alt does not take responsibility for installing different versions of commands or managing their dependencies. How you install different versions of commands is entirely up to you.

Install

Debian / Ubuntu / Anything using DEBs

  1. Open the latest release page on Github

  2. Download the .deb file matching your system architecture

  3. Install the .deb file by double clicking on it

  4. OR Install the .deb file from the command line

    sudo apt install ./path/to/alt.deb

You will probably need to log out & log back in to your desktop session for alt to be configured.

OSX (Homebrew & Linuxbrew)

brew tap dotboris/alt
brew install alt-bin

Pay close attention to the "Caveats" messages as you'll need to add a line to your ~/.bashrc / ~/.zshrc files.

Pre-packaged binaries

See: doc/install-pre-packaged-bins.md

From source

See: doc/install-from-source.md

Usage

Using alt is done in two steps:

  1. First, you tell alt about the different versions of commands installed on your system.
  2. Second, you tell alt what version of your commands to use in a given directory.

Define command versions

alt can automatically scan your system to find different version of a command. This can be done with the alt scan command:

alt scan some-command

This will bring up a menu that lets you choose all the versions of the given command that you want to use with alt.

  • / or j / k: Move cursor
  • Space: Make version available to alt
  • Enter: Confirm and save selection

If alt is not able to find a version of a command automatically for you, you can always define the command version by hand.

This can be done with the alt def command:

alt def some-command version-name /path/to/command/bin

Switch command version

Remember that alt decides what version of a command to use based on the current directory. When you select a command version, it's for the current directory.

You can tell alt to use a specific version of a command in the current directory with the alt use command:

alt use some-command

This will bring up a menu that lets you choose the version of the specified command that you want to use.

  • / or j / k: Move cursor
  • Enter: Select version to use

If menus aren't your cup of tea, you can specify the version on the command line:

alt use some-command version-name

Note: If you want to use the system version without the menu, you can pass system as the version-name.

alt use some-command system

Show known commands & used versions

alt show

The above command will show you:

  • All commands alt knows about
  • The versions of those commands available
  • The versions being used in the current directory

Troubleshooting

If you are experiencing issues with alt, you should try running alt's built-in self-healing command:

alt doctor

This command will look for problems, report them to you and, in some cases, propose an automatic fix.

If alt doctor is not able to find or fix your problem, you can try looking at the sections below. If that doesn't help, feel free to open an issue. We'll be happy to help you out.

Warning about shims directory not being in PATH

Behind the scenes, alt manages a directory of "shims" ($HOME/.local/alt/shims). In order to switch the version of commands, it needs that directory to be at the top of your PATH environment variable.

During the install process, we install scripts that configure this automatically for you. These scripts are /etc/profile.d/alt.sh & /etc/fish/conf.d/alt.fish (the location of these scripts may vary on some platforms).

In some cases, you may need to force these scripts to re-load. You can try the following steps:

  1. Close & re-open your terminal
  2. Log out of your desktop session & log back in again

If either or both of these fail, you can put the shim directory on top of your PATH manually. This will vary depending on what shell you use.

# For BASH
echo 'export PATH="$HOME/.local/alt/shims:$PATH"' >> ~/.bashrc

# For ZSH
echo 'export PATH="$HOME/.local/alt/shims:$PATH"' >> ~/.zshrc

# For FISH
echo 'set -gx PATH "$HOME/.local/alt/shims" $PATH' >> ~/.config/fish/config.fish

.alt.toml file in git repositories

During it's normal operation, alt puts a file named .alt.toml in the current directory. You should not commit .alt.toml to git or any other VCS. To avoid getting those files all over your git repositories, you can add them to a global gitignore file.

If you don't know how to create a global gitignore file, see: https://help.github.com/articles/ignoring-files/#create-a-global-gitignore

echo '.alt.toml' >> path/to/your/global-gitgnore
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].