Quick Start
This guide walks you through publishing your first forecasting model on pd4castr — from installing the CLI to viewing your results in the platform. You can complete the entire workflow in about 10 minutes.
Prerequisites
Before you begin, make sure you have:
- Node.js version 20 or later
- Docker installed and running
- A pd4castr account — create one at pd4castr.com.au
- Publisher access on your organization’s account (required for publishing) — contact us to get set up
Step 1: Install the CLI
Install the pd4castr CLI globally with npm:
npm install -g @pd4castr/cliVerify the installation:
pd4castr --versionFor more details, see Install the CLI.
Step 2: Authenticate
Log in to connect the CLI to your pd4castr account:
pd4castr loginThe CLI displays a verification URL and a login code. Open the URL in your browser, enter the code, and complete the login flow. Once finished, the CLI confirms you’re authenticated:
✔ Successfully logged in to the pd4castr APIFor more details, see Authentication.
Step 3: Scaffold a project
Create a new model project from a template:
pd4castr initThe CLI prompts you for a project name and a template. Choose python-demo to
start with a working example that includes sample data and configuration:
? Name your new model project: my-first-model
? Select a template: python-demo
✔ Template fetched successfullyThis creates a my-first-model directory with everything you need:
my-first-model/
├── .pd4castrrc.json # Model configuration
├── Dockerfile # Container definition
├── model.py # Forecasting logic
└── test_input/ # Sample test dataFor more details, see Scaffold a Project.
Step 4: Test locally
The python-demo template includes static test data in test_input/, so you
can run the model right away. Navigate into your project directory and start a
test run:
cd my-first-model
pd4castr testThe CLI builds a Docker image, runs your model container against the bundled test data, and checks that all inputs were consumed and output was produced:
ℹ Starting model tests...
✔ Found 1 test input data files
✔ Built docker image (my-first-model:latest)
✔ Model run complete
✔ Input Fetched - static_data.json
✔ Output Uploaded
✔ Model I/O test passedFor more details, see Testing Your Model.
Step 5: Publish
When your model passes local testing, publish it to the platform. Publishing requires your organization to have publisher access — if you don’t have it yet, contact us to get set up.
pd4castr publishThe CLI validates your model, builds and pushes the Docker image, uploads any static inputs, creates the model on the platform, and triggers the first run:
✔ Model I/O checks passed
✔ Docker image built
✔ Docker image pushed
✔ Static inputs uploaded
✔ Model created on pd4castr
✔ Model run triggeredFor more details, see Publishing.
View your results
Once the model run completes, open the pd4castr platform to view your forecast output. You can see the forecast chart, inspect input data, compare sensitivities, and explore the data using SQL.
For an overview of the platform, see Platform Overview.
Next steps
- Configuration File — customise your model’s inputs, outputs, and settings
- Model Inputs — configure static and fetched data sources
- Model Outputs — define your forecast output schema
- Sensitivities and Scenarios — add “what if” analysis to your model