mtenv v0.0.3

Version manager for Myst language, inspired by rbenv and others.
  • v0.0.3 - April 13, 2018
  • v0.0.2 - April 2, 2018
  • v0.0.1 - April 2, 2018


mtenv is a version manager for the Myst programming language, inspired by rbenv and other similar version managers.


For platforms with a pre-built binary (see the releases page to find these), simply download the binary, place it on your PATH and you're good to go!

# macOS example:
curl -Lo mtenv
chmod +x mtenv
cp ./mtenv /usr/local/bin/mtenv

For other platforms, you'll need to compile from source. To do so, you can clone this repository and run shards build, then move the compiled binary onto your $PATH.

git clone
cd mtenv
shards build
cp ./bin/mtenv /usr/local/bin/mtenv

If you create a new pre-built binary, I'd appreciate you sending in the binary for others to download themselves. The Myst language discord is a great place to discuss this.

Once mtenv is on your PATH, the installation is complete.


mtenv uses sub-commands to perform its various tasks. To see these commands listed out, just run mtenv to see the usage instructions. Further explanations are given here.

Initial setup

When first installing mtenv, run mtenv setup to initialize the ~/.mtenv (or MTENV_HOME if set) directory and install the shims.

mtenv setup

mtenv setup will:

  • Ensure that ~/.mtenv/ (or MTENV_HOME if set) exists and add some basic configuration.
  • Prompt for where to put the the executable that mtenv manages to control myst versions, i.e. a directory in your PATH.

Now you are fully set up to use mtenv and install new versions of Myst.

Note: If you have existing versions of Myst installed via Homebrew or any other method, be sure to remove them from your PATH before using mtenv! Otherwise mtenv may not take precedence and may cause unexpected behavior._

Installing new versions of Myst

To install a new version of Myst, use mtenv install <version>. version can be a tagged release number (e.g., v0.5.0, v0.6.0), or a commit SHA from the official myst-lang repository. install also accepts an optional second argument for a different name to use for the installation.

$ mtenv install v0.5.0
Version v0.5.0 of Myst is now installed
$ mtenv versions
$ mtenv install v0.5.0 beta-5
Version beta-5 of Myst is now installed
$ mtenv versions

To uninstall a specific version of Myst, use mtenv uninstall <version>. This will remove the installation

$ mtenv versions
$ mtenv uninstall v0.4.0
Version v0.4.0 of Myst has been uninstalled.
$ mtenv versions

Switching versions

To see which version of Myst is currently active, use mtenv version.

To see which versions of Myst are currently installed, use mtenv versions.

To switch between active versions of Myst (i.e., what the myst command will use), use mtenv use <version>.

$ mtenv version
$ myst -v
$ mtenv versions
$ mtenv use v0.4.0
Active Myst version is now v0.4.0
$ mtenv version
$ myst -v

Uninstalling mtenv

To unlink mtenv from your PATH and remove all installations, use mtenv implode. This command removes everything relating to mtenv, except for the mtenv binary itself.

$ ./bin/mtenv implode
Are you sure you want to completely uninstall mtenv? This cannot be undone.
The `mtenv` command will remain installed, but all installations will be lost.
Type 'implode' to confirm your intent.
> implode


Just a normal Crystal project. This project uses Admiral for setting up the CLI, and each command lives in the src/commands folder.

github statistic
  • 1
  • 0
  • 2
  • 1
  • about 1 year ago
  • March 31, 2018

MIT License

Synced at

Thu, 02 Apr 2020 04:07:22 GMT