Setting up the CLI


To install the Space CLI on MacOS, open a Terminal session and enter:

curl -fsSL | sh

This will download the binary which contains the CLI code. It will try to export the space command to your path. If it does not succeed, follow the directions output by the install script to export space to your path.


Once you have successfully installed the Space CLI, you’ll need to log in to Deta Space.

The Space CLI authenticates itself with ‘Access Tokens’. You can create an access token under Settings in your Space. Just type ‘settings’ in Teletype to open them.

After you have generated a new key you can add it to the CLI using space login. It will prompt you for the key and then store it safely.

From a terminal type:

space login

This command will ask for an ‘access token’ to authenticate your CLI.

? Enter access token >

To get an access token, enter your Space dashboard, open the Teletype (command bar) and click ‘Settings’:

This will open the Settings modal, where you can click ‘Generate Token’ to generate an access token:

Copy the resulting token:

You can paste this back into your CLI prompt. After you hit enter, you should be greeted by a success message.

👍 Login Successful!

Upon a successful log-in, you are ready to start building Space apps.

CLI Commands

Run space help to get a overview of the available commands or refer to the Reference section for a complete list of CLI commands and options.