Install the CLI
The pd4castr CLI is a command-line tool for creating, testing, and publishing forecasting models. You install it once globally and use it across all your model projects.
Prerequisites
You need the following tools installed on your machine:
- Node.js version 20 or later — the CLI is distributed as an npm package
- Docker — required for testing and publishing models (the CLI builds and runs Docker containers)
Installation
Install the CLI globally using npm:
npm install -g @pd4castr/cliYou can also use other package managers:
# yarn
yarn global add @pd4castr/cli
# pnpm
pnpm add -g @pd4castr/cliVerify the installation
Run the following command to confirm the CLI is installed:
pd4castr --versionAvailable commands
The CLI provides these commands:
| Command | Description |
|---|---|
pd4castr init | Scaffold a new model project from a template |
pd4castr login | Log in to the pd4castr platform |
pd4castr logout | Log out and clear stored credentials |
pd4castr fetch | Download live test data from data sources |
pd4castr test | Build and test your model locally |
pd4castr publish | Publish your model to the platform |
Each command has its own dedicated page:
- Scaffold a Project —
init - Authentication —
loginandlogout - Testing Your Model —
test - Publishing —
publish
Updating
To update to the latest version of the CLI:
npm update -g @pd4castr/cliEnvironment variables
These optional environment variables override default settings. Most users don’t need to change them.
| Variable | Description | Default |
|---|---|---|
PD4CASTR_API_URL | Override the API endpoint | https://api.v2.pd4castr.com.au |
PD4CASTR_AUTH0_CLIENT_ID | Override the Auth0 client ID | Built-in default |
PD4CASTR_AUTH0_AUDIENCE | Override the Auth0 audience | Built-in default |
Next steps
With the CLI installed, you’re ready to log in and scaffold your first project. Or jump straight to the Quick Start for a guided walkthrough.