Skip to content

Quickstart

This guide takes you from zero to a compiled native binary. You need a terminal and Node 20 or later.

Go to pure.dev and create an account. Email verification is required before you can create API keys.

The CLI is distributed via apt (Linux) or a curl installer (macOS), not npm — see Installation for the full setup. Quick version:

Linux:

Terminal window
curl -fsSL https://apt.pure.dev/install.sh | sudo sh

macOS:

Terminal window
curl -fsSL https://brew.pure.dev/install.sh | sh

Verify the install:

Terminal window
pure --version
Terminal window
pure login

This asks how you want to log in — generate a new key (opens your browser, mints one for you, no manual key-copying) or paste an existing one. Either way the key is verified against api.pure.dev and saved to your OS keychain (or ~/.config/pure/credentials, mode 0600, when no keychain is available). pure build looks for a key there (or in $PURE_API_KEY) — it does not prompt interactively.

Over SSH or in a remote/container session where the browser can’t reach your terminal, the page shows the key on-screen instead — copy it and run pure login --paste. See Log in for the full flow, including CI/headless setups with --api-key.

Create a file hello.ts:

console.log('hello from a native binary');
Terminal window
pure build hello.ts

The CLI writes progress to stderr and the compile log to stdout:

Packaging hello.ts…
Uploading 2 KiB…
Upload complete, compiling hello.ts…
Queued (job 477c4c8c-...). Reconnect anytime with: pure reconnect 477c4c8c
Wrote ./hello (3 work units)

By default the binary is written to ./hello — the entry filename without its extension, in the current directory. Use -o/--out to write it elsewhere. If that path already exists, pure appends ” (1)”, ” (2)”, etc. rather than overwriting it — pass -f/--force to overwrite instead.

Terminal window
./hello
# hello from a native binary

The binary has no runtime dependencies. Copy it to any compatible Linux or macOS machine and run it directly.