Sugar is an alternative to the current Metaplex Candy Machine CLI. It has been written from the ground up and includes several improvements:
cargo
package management, including a binary distributable package ready to use;See the docs for full installation and usage instructions.
Note: This is a beta release of Sugar. Use at your own risk. The current version supports only systems running macOS, Linux, or another Unix-like OS.
To install, either download a binary, install from Crates.io, or install from source. Non-technical users will typically find using a pre-built binary to be simpler.
Dependencies: When installing on Ubuntu or WSL (Windows Subsystem Linux), you may need to install some additional dependencies:
bash sudo apt install libssl-dev libudev-dev pkg-config
macOS users may need to install the OpenSSL library, which can be done using Homebrew:
bash brew install openssl@3
Binaries for the supported OS can be found at:
To install Sugar pre-built binary on a supported OS, run the following in your terminal:
bash
bash <(curl -sSf https://raw.githubusercontent.com/metaplex-foundation/sugar/main/script/sugar-install.sh)
bash
cargo install sugar-cli
bash
cargo install --path ./
Set up your Solana CLI config with an RPC url and a keypair:
bash
solana config set --url <rpc url> --keypair <path to keypair file>
Sugar will then use these settings by default if you don't specify them as CLI options, allowing commands to be much simpler. If you need help setting up Solana CLI and creating a devnet
wallet, check the Candy Machine v2 documentation.
Create a folder named assets
to store your json and media file pairs with the naming convention 0.json, 0..png
, .jpg
, etc. This is the same format described in the Candy Machine v2 documentation.
You can then use the launch
command to start an interactive process to create your config file and deploy a Candy Machine to Solana:
bash
sugar launch
At the end of the execution of the launch
command, the Candy Machine will be deployed on-chain.