https://github.com/tsubasaogawa/slsenv
Serverless Framework version manager
https://github.com/tsubasaogawa/slsenv
serverless-framework version-manager
Last synced: 2 months ago
JSON representation
Serverless Framework version manager
- Host: GitHub
- URL: https://github.com/tsubasaogawa/slsenv
- Owner: tsubasaogawa
- License: mit
- Created: 2023-06-21T15:19:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-25T13:53:14.000Z (almost 2 years ago)
- Last Synced: 2025-03-02T22:02:18.485Z (3 months ago)
- Topics: serverless-framework, version-manager
- Language: Shell
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slsenv
[Serverless Framework](https://www.serverless.com/framework) version manager inspired by/cloned from [Kopsenv](https://github.com/kilna/kopsenv).
## Installation
1. Check out slsenv into any path (here is `${HOME}/.slsenv`)
```sh
$ git clone https://github.com/tsubasaogawa/slsenv.git ~/.slsenv
```2. Add `~/.slsenv/bin` to your `$PATH` any way you like
```sh
$ echo 'export PATH="$HOME/.slsenv/bin:$PATH"' >> ~/.bash_profile
```## Usage
### slsenv install/uninstall [version]
```sh
$ slsenv install v3.34.0
$ slsenv install latest
```### slsenv use [version]
```sh
$ slsenv use v3.34.0
$ slsenv use latest
```### slsenv list
List installed versions
```sh
$ slsenv list
* v1.83.3 (set by /home/t_ogawa/.slsenv/version)
v3.34.0
v3.33.0
```### slsenv list-remote
List installable versions
```sh
$ slsenv list-remote
v3.34.0
v3.33.0
v3.32.2
v3.32.1
...
```## .sls-version file
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:`, the latest matching version currently installed will be selected.
```sh
$ 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
```## Upgrading
```console
$ git --git-dir=~/.slsenv/.git pull
```## Uninstalling
```console
$ rm -rf /some/path/to/slsenv
```