Installation
This page collects the prerequisites and installation options for
@pagopa/dx-cli.
Requirements
The following tools must be installed on your machine:
| Tool | Version |
|---|---|
| Node.js | >= 22.0.0 |
| Terraform or tfenv | latest |
| GitHub CLI | latest |
| Azure CLI | latest (required for Azure environments only) |
Before running any command that interacts with GitHub or a cloud provider, ensure you are logged in:
gh auth login
az login
Every command except --version and --help requires GitHub
authentication. The CLI resolves credentials in this order: the GH_TOKEN
environment variable, the GITHUB_TOKEN environment variable, then the GitHub
CLI (gh auth login). If none is available, the command exits with an error
asking you to log in.
Telemetry is collected only for members of the pagopa GitHub organization;
everyone else can use the CLI normally with telemetry disabled.
Within PagoPA, az login sessions expire every 12 hours. If a command fails
with an authentication error, run az login again before retrying.
Installation
You can invoke the CLI directly via npx without installing globally:
npx @pagopa/dx-cli --help
When installed locally in a monorepo you can also run:
pnpm dx --help
The binary name is
dx.