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.
| Parameter | Type | Description |
|---|---|---|
| Linux x64 | linux-x64 | Prebuilt binary published on every release |
| macOS Apple silicon | darwin-arm64 | Prebuilt binary published on every release |
| macOS Intel | darwin-x64 | Prebuilt 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.
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 --versionDownload 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.
curl -fsSL -o platform \
https://s3.nupaas.com/downloads/platform-cli/latest/platform-darwin-arm64
chmod +x platform
sudo mv platform /usr/local/bin/platformSubstitute 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:
cd packages/cli
deno task compileThis 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 initplatform init is interactive by default. Pass --api-url and --api-key together to run it non-interactively, and --org to set the default organization.
platform init \
--api-url https://platform.nupaas.com \
--api-key "$PLATFORM_API_KEY" \
--org my-orgSign in
For interactive use, sign in with OIDC. This opens your browser and stores the resulting access token in your config file.
platform loginLogin 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:
| Parameter | Type | Description |
|---|---|---|
| PLATFORM_API_KEY | string | API key. Takes precedence over anything stored in the config file. |
| PLATFORM_API_URL | string | Platform 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_KEYenvironment 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.