An open API service indexing awesome lists of open source software.

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

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
```