Serverless Framework version manager inspired by/cloned from Kopsenv.
- Check out slsenv into any path (here is
${HOME}/.slsenv)
$ git clone https://github.com/tsubasaogawa/slsenv.git ~/.slsenv- Add
~/.slsenv/binto your$PATHany way you like
$ echo 'export PATH="$HOME/.slsenv/bin:$PATH"' >> ~/.bash_profile$ slsenv install v3.34.0
$ slsenv install latest$ slsenv use v3.34.0
$ slsenv use latestList installed versions
$ slsenv list
* v1.83.3 (set by /home/t_ogawa/.slsenv/version)
v3.34.0
v3.33.0List installable versions
$ slsenv list-remote
v3.34.0
v3.33.0
v3.32.2
v3.32.1
...If you put a .sls-version file on your project root, or in your home directory, slsenv detects it and uses the version written in it. If the version is latest or latest:<regex>, the latest matching version currently installed will be selected.
$ echo v3.32.0 > .sls-version
$ sls --version
Framework Core: 3.32.0 (standalone)
Plugin: 6.2.3
SDK: 4.3.2
$ echo v3.34.0 > .sls-version
$ sls --version
Framework Core: 3.34.0 (standalone)
Plugin: 6.2.3
SDK: 4.3.2
$ echo latest:^v3.32 > .sls-version
$ sls --version
Framework Core: 3.32.0 (standalone)
Plugin: 6.2.3
SDK: 4.3.2$ git --git-dir=~/.slsenv/.git pull$ rm -rf /some/path/to/slsenv