ACP-267: Primary Network validator uptime requirement increases from 80% to 90%.Read the proposal

Installation

Install and configure Platform CLI for Avalanche P-Chain operations

The install script downloads the latest release binary for your platform:

curl -sSfL https://build.avax.network/install/platform-cli | sh

Options:

# Install to a custom directory
curl -sSfL https://build.avax.network/install/platform-cli | sh -s -- -b ~/.local/bin

# Install a specific version
curl -sSfL https://build.avax.network/install/platform-cli | sh -s -- -v v0.2.0

The script auto-detects your OS (Linux/macOS) and architecture (amd64/arm64), downloads the release tarball, verifies checksums, and installs the platform binary.

Verify the installation:

platform --help

Build from Source

Requires Go 1.24+ (install Go).

git clone https://github.com/ava-labs/platform-cli.git
cd platform-cli
go build -o platform .

Ledger Support

To build with Ledger hardware wallet support:

go build -tags ledger -o platform .

Global Flags

These flags are available on all commands:

FlagShortDescriptionDefault
--network-nNetwork: fuji or mainnetfuji
--key-nameName of key to load from keystore
--ledgerUse Ledger hardware walletfalse
--ledger-indexLedger address index (BIP44 path)0
--rpc-urlCustom RPC URL (overrides --network)
--network-idNetwork ID for custom RPC (auto-detected if not set)
--allow-insecure-httpAllow plain HTTP for non-local endpoints (unsafe)false
--private-key-kPrivate key (deprecated, prefer --key-name or --ledger)

Environment Variables

VariableDescription
AVALANCHE_PRIVATE_KEYPrivate key (alternative to --private-key flag)
PLATFORM_CLI_KEY_PASSWORDPassword for encrypted keys (avoids interactive prompts)
PLATFORM_CLI_TIMEOUTOperation timeout duration (e.g., 5m, 30s, default: 2m)

Key Loading Priority

When a command needs a private key, Platform CLI checks these sources in order:

  1. --key-name flag (loads from keystore)
  2. --private-key flag (deprecated)
  3. Default key in keystore (if set)
  4. AVALANCHE_PRIVATE_KEY environment variable

Network Configuration

Standard Networks

# Fuji testnet (default)
platform wallet balance --key-name mykey

# Mainnet
platform wallet balance --key-name mykey --network mainnet

Custom RPC

For local networks or custom endpoints:

# Local network
platform wallet balance --key-name mykey --rpc-url http://127.0.0.1:9650

# Custom endpoint with explicit network ID
platform wallet balance --key-name mykey --rpc-url https://my-node.example.com:9650 --network-id 5

When using --rpc-url, the network ID is auto-detected from the node unless --network-id is specified.

Next Steps

Is this guide helpful?