Setting up the CLI
Installation
To install the Space CLI on Linux, open a Terminal and enter:
curl -fsSL https://get.deta.dev/space-cli.sh | 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.
To install the Space CLI on MacOS, open a Terminal session and enter:
curl -fsSL https://get.deta.dev/space-cli.sh | 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.
To install the Space CLI on Windows, open PowerShell and enter:
iwr https://get.deta.dev/space-cli.ps1 -useb | iex
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.
Authentication
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.