The Space CLI

The Space CLI is a command line interface you can use to build apps for Deta Space from a development environment. This page provides instructions for installing and configuring the Space CLI into your development environment.


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

Terminal window
curl -fsSL | sh

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

❗️ If you encounter command not found: space after a successful installation, please try to restart your terminal session.


Once you have successfully installed the Space CLI, you’ll need to log in to Deta Space. From a terminal type:

Terminal window
space login

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

Terminal window
? 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.

Terminal window
👍 Login Successful!

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

CLI Reference

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.

Local Development

See the developing locally page for more information on how to develop your app locally with space dev.