Solana
  • Solana Development
    • Prerequisites
    • Getting Started
      • ShadCN
      • Getting started with Next.js
    • Developing on Solana
      • Minting Solana NFTs: A Beginner's Guide
  • Examples
    • Creating a Custom Solana Wallet Connect UI
    • Portfolio Applicaiton
    • Solana Wallet Adapter
    • JavaScript Client for Mpl Core
  • Solana Cookbook
  • Wonka.JS and next.js
  • Metaplex Sugar
  • Solana Wallet Adapter To a Next.Js application
    • Basic Wallet Adapter with React
    • Integrating Solana Wallet Adapter in a Next.js Application
    • Solana Wallet Example Code and Tutorial
    • Git Hub Code
  • Token Burning Candy Machine
  • Page 1
  • DLMM
  • Page 2
  • React And Next.JS
    • Material UI
    • Installation
    • Usage
    • Example projects
Powered by GitBook
On this page
  • Sugar: A Candy Machine CLI
  • Installation
  • Quick Start

Metaplex Sugar

This is the alpha for the candy machine homie

PreviousWonka.JS and next.jsNextSolana Wallet Adapter To a Next.Js application

Last updated 1 year ago

Sugar: A Candy Machine CLI

Sugar is an alternative to the current CLI. It has been written from the ground up and includes several improvements:

  • better performance for upload of media/metadata files and deploy of the candy machine — these operations take advantage of multithreaded systems to significantly speed up the computational time needed;

  • simplified build and installation procedures taking advantage of cargo package management, including a binary distributable package ready to use;

  • robust error handling and validation of inputs, including improvements to config and cache files, leading to more informative error messages.

See for full installation and usage instructions.

Installation

Recommended Method

For macOS, Linux and Windows Subsystem Linux (WSL), run the following install script in your terminal:

bash <(curl -sSf https://raw.githubusercontent.com/metaplex-foundation/sugar/main/script/sugar-install.sh)

For Windows:

Dependencies: When installing on Ubuntu or WSL (Windows Subsystem Linux), you may need to install some additional dependencies:

sudo apt install libudev-dev pkg-config unzip

Developers

Using Crates.io:

cargo install sugar-cli

Build From Source:

cargo install --path ./

Quick Start

Set up your Solana CLI config with an RPC url and a keypair:

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.

You can then use the launch command to start an interactive process to create your config file and deploy a Candy Machine to Solana:

sugar launch

At the end of the execution of the launch command, the Candy Machine will be deployed on-chain

Download and execute it. Since it is not a verified Windows binary you may have to choose "Run Anyway" from "More Info" on the pop-up Windows dialog.

Create a folder named assets to store your json and media file pairs with the naming convention 0.json, 0., 1.json, 1., etc., where the extension is .png, .jpg, etc. This is the same format described in the .

this installer binary
Candy Machine v2 documentation
Metaplex Candy Machine
the docs