Install the CLI — NuPaaS Docs
Getting started

Install the CLI

The NuPaaS CLI is a single self-contained binary named platform. It manages projects, deploys, environment variables, databases, domains, storage and organizations from your terminal.

Supported platforms

Prebuilt binaries are published for three targets. There is no Windows build today — on Windows, use WSL and install the Linux x64 binary.

ParameterTypeDescription
Linux x64linux-x64Prebuilt binary published on every release
macOS Apple silicondarwin-arm64Prebuilt binary published on every release
macOS Inteldarwin-x64Prebuilt binary published on every release
Windows—No prebuilt binary. Use WSL, or build from source.

Install with npm

The CLI is published to the NuPaaS package registry rather than the public npm registry, so the registry has to be named explicitly.

Install with npm
npm install -g @type-driven/platform-cli \
  --registry https://gitea.nupaas.com/api/packages/type-driven/npm/

The wrapper package pulls the binary for your platform through optionalDependencies. Confirm the install:

platform --version

Download the binary

If you would rather not go through npm, every release is also uploaded to a public download bucket. Pick the file matching your platform, make it executable, and put it on your PATH.

Download the latest binary (macOS Apple silicon)
curl -fsSL -o platform \
  https://s3.nupaas.com/downloads/platform-cli/latest/platform-darwin-arm64
chmod +x platform
sudo mv platform /usr/local/bin/platform

Substitute platform-linux-x64 or platform-darwin-x64 for the other targets. Replace latest with v<version> to pin a specific release.

Build from source

The CLI is a Deno program. With Deno installed, compile it from the repository:

Compile the CLI
cd packages/cli
deno task compile

This produces a platform binary in the same directory.

Point the CLI at your platform

The CLI has no hard-coded API URL — it will refuse to run until one is configured. Run platform init once to write the API URL and your default organization to the config file.

platform init

platform init is interactive by default. Pass --api-url and --api-key together to run it non-interactively, and --org to set the default organization.

Non-interactive init
platform init \
  --api-url https://platform.nupaas.com \
  --api-key "$PLATFORM_API_KEY" \
  --org my-org

Sign in

For interactive use, sign in with OIDC. This opens your browser and stores the resulting access token in your config file.

platform login

Login is organization-scoped. If no default organization is set, platform login prompts for one; pass --org <slug-or-id> to skip the prompt.

Non-interactive use

In CI, skip platform login entirely and supply credentials through the environment. Both variables are read directly by the CLI:

ParameterTypeDescription
PLATFORM_API_KEYstringAPI key. Takes precedence over anything stored in the config file.
PLATFORM_API_URLstringPlatform API base URL. Takes precedence over the config file.

Where configuration lives

platform init and platform login write to ~/.platform/config.json, created with mode 0600. The file holds the API URL, the default organization, and whichever credential you signed in with.

Credential resolution order

When a command needs a token, the CLI checks, in order:

  • the PLATFORM_API_KEY environment variable;
  • the OIDC session token stored by platform login;
  • a long-lived API key stored in the config file.

If none is present the command fails with Not authenticated. Run `platform login` or set PLATFORM_API_KEY.