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/cli

You can also use other package managers:

# yarn
yarn global add @pd4castr/cli
 
# pnpm
pnpm add -g @pd4castr/cli

Verify the installation

Run the following command to confirm the CLI is installed:

pd4castr --version

Available commands

The CLI provides these commands:

CommandDescription
pd4castr initScaffold a new model project from a template
pd4castr loginLog in to the pd4castr platform
pd4castr logoutLog out and clear stored credentials
pd4castr fetchDownload live test data from data sources
pd4castr testBuild and test your model locally
pd4castr publishPublish your model to the platform

Each command has its own dedicated page:

Updating

To update to the latest version of the CLI:

npm update -g @pd4castr/cli

Environment variables

These optional environment variables override default settings. Most users don’t need to change them.

VariableDescriptionDefault
PD4CASTR_API_URLOverride the API endpointhttps://api.v2.pd4castr.com.au
PD4CASTR_AUTH0_CLIENT_IDOverride the Auth0 client IDBuilt-in default
PD4CASTR_AUTH0_AUDIENCEOverride the Auth0 audienceBuilt-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.