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 global add @pd4castr/cli
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 | Fetch test data from your configured dynamic inputs |
pd4castr test | Build and test your model locally |
pd4castr publish | Publish your model to the platform |
Updating
To update to the latest version of the CLI, run:
npm update -g @pd4castr/cliNext Steps
With the CLI installed, you’re ready to scaffold your first project and log in. Or jump straight to the Quick Start for a guided walkthrough.