Skip to main content
Make sure you have a wallet set up at ~/.config/solana/id.json. Get one here, if you don’t have one.
The CLI will use this wallet as the default fee payer and mint authority.

Installation

Ask anything about the ZK Compression CLI viaAsk DeepWiki
1

Install the ZK Compression CLI

Ensure you have Node >= v20.9.0 installed on your machine. Windows users do not require WSL.
Run this single command to install the ZK Compression CLI.
If you prefer to build the CLI from source, follow the steps below to install the necessary prerequisites.1. Activate the Development EnvironmentEnsure you are at the root of the monorepo.
2. Install and build the monorepo from source. This also builds the CLI.
3. Make your CLI available globally
2

Set Up Your Environment

By default, the CLI interacts with localnet. You can view the current config by running:
1. Once globally installed, start the Light test validator
This starts a Solana test-validator with the Light System programs and accounts, a prover server, and the Photon indexer as background processes against a clean ledger.
Note:The CLI currently runs the photon indexer and light-prover as background processes at port: 8784 and 3001 respectively.
2. Ensure you have sufficient localnet funds
Now you’re all set up to run CLI commands!
To switch to Devnet, point the URLs to an RPC supporting ZK Compression. For example, run:
Also adjust your solana config:

Commands

Create a compressed token mint

Mint compressed tokens to a Solana wallet

Transfer compressed tokens from one wallet to another

Assign native SOL to a compressed account

Decompress into native SOL

Next Steps

Build with compressed tokens

Build with compressed PDAs