Authentication

The pd4castr CLI supports two authentication methods: an interactive browser-based login for local development, and client credentials for CI/CD pipelines and automation. Both methods store credentials locally for subsequent commands.

Interactive Login

Run the following command to authenticate:

pd4castr login

The CLI starts a device authorization flow and displays a verification URL and a login code:

ℹ Please open the login link in your browser:
	https://pdview.au.auth0.com/activate?user_code=ABCD-EFGH
ℹ Your login code is:
	ABCD-EFGH
⠋ Waiting for login to complete...

To complete the login:

  1. Open the verification URL in your browser.
  2. Enter the login code shown in your terminal.
  3. Sign in with your pd4castr credentials.

The CLI waits automatically and confirms when the login succeeds:

✔ Successfully logged in to the pd4castr API

Client Credentials Login

For non-interactive environments (CI pipelines, scripts, etc.), you can authenticate using client credentials instead of the browser flow:

pd4castr login --client-credentials --client-id <id> --client-secret <secret>

You can also provide credentials via environment variables to avoid exposing secrets in command arguments or logs:

export PD4CASTR_CLIENT_ID=<id>
export PD4CASTR_CLIENT_SECRET=<secret>
 
pd4castr login --client-credentials
✔ Successfully logged in with client credentials

If both flags and environment variables are set, the flags take precedence.

To request credentials, contact your organisation admin or contact us to get set up.

Log Out

To clear your stored credentials:

pd4castr logout
✔ Successfully logged out of the pd4castr API

Troubleshooting

  • Token expired? Run pd4castr login again to refresh your credentials.
  • Browser didn’t open? Copy the verification URL from your terminal and paste it into your browser manually.
  • Login timed out? The authorization code has a limited lifetime. If it expires, run pd4castr login again to generate a new code.

Next Steps

Once you’re logged in, you can fetch test data from configured data sources and publish your model to the platform.