Installation

Learn how to install the Scale CLI.

The Scale CLI is a command line interface for interacting with the Scale API and for working with Scale Functions locally.

The CLI is written in Golang and is Open Source.

Install the Scale CLI

The Scale CLI is the primary tool for interacting with Scale Functions and the Scale Registry. It can be easily installed using the following command:

curl -fsSL https://dl.scale.sh | sh

The CLI attempts to install itself to /usr/local/bin by default, but you can also specify a different directory by setting the INSTALL environment variable like so:

curl -fsSL https://dl.scale.sh | INSTALL=./ sh

To verify that the CLI was installed correctly, check the scale cli version by running the following command:

scale version

Building from Source

To build the CLI from source, you will need to have Go installed. Then, you can clone the source code:

git clone https://github.com/loopholelabs/scale-cli
cd scale-cli

The minimum supported version of Go for building the Scale CLI is 1.20.

Building the CLI can be done with the following command:

cd cmd
go build -o scale .

This will create a binary called scale in the cmd directory. You can then move this binary to a directory in your PATH to use it.

Using the Scale CLI

Once you have the Scale CLI installed, you can use it to interact with the Scale API and to build, run, and interact with Scale Functions locally.

Check out the Scale CLI Reference for more information on how to use the CLI.

Edit on GitHub

Last updated on

On this page