Skip to content
Press.js Press.js Press.js Docs

Authentication

Press.js Cloud supports two authentication methods: interactive login for development and API keys for automation.

The fastest way to authenticate locally:

Terminal window
press login

Your default browser opens with the Press.js Cloud sign-in page. Sign in with GitHub or Google — done.

Check your current session:

Terminal window
press whoami

When you’re done:

Terminal window
press logout

Sessions persist between commands — you only need to log in once per machine.

For CI/CD and scripted deployments, use an API key instead of interactive login.

Create an API key from the Press.js Cloud dashboard (Settings → API Keys).

Use it with any cloud command:

Terminal window
press deploy report --token pcak_xxxxx

Or set it as an environment variable:

Terminal window
export PRESS_CLOUD_TOKEN=pcak_xxxxx
press deploy report
  • API keys are prefixed with pcak_ — they’re credential secrets. Treat them like passwords.
  • Store them securely: use your CI/CD platform’s secrets manager, never commit them to source control.
  • Rotate keys regularly. Revoke compromised keys from the dashboard immediately.
  • Each key can be revoked independently without affecting other keys or your interactive session.
MethodWhen to useHow it works
press loginLocal development, one-off tasksOAuth via browser — no secrets to manage
API key (--token / env var)CI/CD, scripts, productionBearer token — fully automated, no browser needed

Both methods work with all cloud commands and follow the same permission model. Your account’s usage, deploys, and billing are shared regardless of which method you use.