diff --git a/src/components/products/cli/index.js b/src/components/products/cli/index.js index fc9dade3..8e38bb71 100644 --- a/src/components/products/cli/index.js +++ b/src/components/products/cli/index.js @@ -71,6 +71,39 @@ export const cli = { }, ], }, + { + title: 'Candy Machine Commands', + links: [ + { + title: 'Overview', + href: '/cli/cm', + }, + { + title: 'Create Candy Machine', + href: '/cli/cm/create', + }, + { + title: 'Upload Assets', + href: '/cli/cm/upload', + }, + { + title: 'Insert Items', + href: '/cli/cm/insert', + }, + { + title: 'Validate Cache', + href: '/cli/cm/validate', + }, + { + title: 'Fetch Information', + href: '/cli/cm/fetch', + }, + { + title: 'Withdraw', + href: '/cli/cm/withdraw', + }, + ], + }, { title: 'Toolbox', links: [ diff --git a/src/pages/cli/cm/create.md b/src/pages/cli/cm/create.md new file mode 100644 index 00000000..e0d399af --- /dev/null +++ b/src/pages/cli/cm/create.md @@ -0,0 +1,249 @@ +--- +title: "Create Candy Machine" +metaTitle: "MPLX CLI - Create Candy Machine Command" +description: "Create MPL Core Candy Machines using the MPLX CLI. Interactive wizard mode with validation, asset upload, and complete setup automation." +--- + +The `mplx cm create` command creates a new MPL Core Candy Machine with configurable settings and asset uploads. It offers both an interactive wizard for beginners and manual configuration for advanced users. + +## Usage + +```bash +# Interactive wizard (recommended) +mplx cm create --wizard + +# Create directory template +mplx cm create --template + +# Manual creation (requires existing cm-config.json) +mplx cm create +``` + +## Prerequisite Assets + +Independent of the Mode (Wizard or Manual) you choose you will need your assets prepared. If you want to play around with dummy assets you can create them using `mplx cm create --template`. All the image and metadata files should be in their own `assets` folder. + +*Image Files:* + +- **Formats**: PNG, JPG +- **Naming**: Sequential (0.png, 1.png, 2.png, ...) + +*Metadata Files:* + +- **Format**: JSON +- **Naming**: Matching image files (0.json, 1.json, 2.json, ...) +- **Schema**: Standard [Metaplex Core metadata format](/core/json-schema) + +*Collection Files:* + +- **collection.png**: Collection image +- **collection.json**: Collection metadata + +## Template Mode + +Create a basic directory structure to get started: + +```bash +mplx cm create --template +``` + +This creates the following structure, but not the candy machine. + +```text +candy-machine-template/ +├── assets/ +│ ├── 0.png # Example image +│ ├── 0.json # Example metadata +│ ├── collection.png # Example collection image +│ └── collection.json # Example collection metadata +└── cm-config.json # Example configuration +``` + +After creating the template: + +1. Replace example assets with your actual files +2. Update the configuration in `cm-config.json` +3. Run `mplx cm create` to deploy + +## Interactive Wizard Mode + +The wizard provides a guided, user-friendly experience with comprehensive validation and progress tracking. **This is the recommended approach for most users.** + +### Wizard Workflow + +1. Project Setup +2. Asset Discovery & Validation +3. Collection Configuration +4. Candy Machine and Candy Guard Settings +5. Asset Upload & Processing +6. Candy Machine Creation +7. Item Insertion + +## Manual Configuration Mode + +For advanced users who want full control over the configuration process. + +### Prerequisites + +1. **Candy machine asset directory** with proper structure +2. **Manually created `cm-config.json`** with required configuration. See below for an example +3. **Prepared assets** in the `assets/` directory in a structure as shown below + +### Directory Structure + +```text +my-candy-machine/ +├── assets/ +│ ├── 0.png +│ ├── 0.json +│ ├── 1.png +│ ├── 1.json +│ ├── ... +│ ├── collection.png +│ └── collection.json +└── cm-config.json # Required +``` + +### Configuration File Format + +Create `cm-config.json` with this structure: + +```json +{ + "name": "My Candy Machine", + "config": { + "collection": "CollectionPublicKey...", // existing collection + "itemsAvailable": 100, + "isMutable": true, + "isSequential": false, + "guardConfig": { + "solPayment": { + "lamports": 1000000000, + "destination": "111111111111111111111111111111111" + }, + "mintLimit": { + "id": 1, + "limit": 1 + } + }, + "groups": [ + { + "label": "wl", + "guards": { + "allowList": { + "merkleRoot": "MerkleRootHash..." + }, + "solPayment": { + "lamports": 500000000, + "destination": "111111111111111111111111111111111" + } + } + } + ] + } +} +``` + +### Manual Workflow + +```bash +# 1. Navigate to your candy machine directory +cd ./my-candy-machine + +# 2. Create candy machine using existing config +mplx cm create + +# 3. Upload assets to storage +mplx cm upload + +# 4. Insert items into candy machine +mplx cm insert + +# 5. Validate setup (optional) +mplx cm validate +``` + +## Configuration Options + +### Core Settings + +| Setting | Description | Required | +|---------|-------------|----------| +| `name` | Display name for the candy machine | ✅ | +| `itemsAvailable` | Total number of items to mint | ✅ | +| `isMutable` | Whether NFTs can be updated after minting | ✅ | +| `isSequential` | Whether to mint items in order | ✅ | +| `collection` | Existing collection address (optional) | ❌ | + +### Guard Configuration + +**Global Guards** (`guardConfig`): + +- Apply to all groups and the candy machine as a whole +- Cannot be overridden by group guards +- Useful for universal restrictions + +**Guard Groups** (`groups`): + +- Apply only to specific groups +- Allow different rules per minting phase +- Group labels limited to 6 characters maximum + +### Common Guard Examples + +#### Basic Public Sale + +```json +{ + "guardConfig": { + "solPayment": { + "lamports": 1000000000, + "destination": "YourWalletAddress..." + }, + "mintLimit": { + "id": 1, + "limit": 1 + } + } +} +``` + +#### Whitelist Phase + +```json +{ + "groups": [ + { + "label": "wl", + "guards": { + "allowList": { + "merkleRoot": "MerkleRootHash..." + }, + "solPayment": { + "lamports": 500000000, + "destination": "YourWalletAddress..." + } + } + } + ] +} +``` + +### Getting Help + +- Use `mplx cm create --help` for command options +- Join the [Metaplex Discord](https://discord.gg/metaplex) for support + +## Related Commands + +- [`mplx cm upload`](/cli/cm/upload) - Upload assets to storage +- [`mplx cm insert`](/cli/cm/insert) - Insert items into candy machine +- [`mplx cm validate`](/cli/cm/validate) - Validate asset cache +- [`mplx cm fetch`](/cli/cm/fetch) - View candy machine information + +## Next Steps + +1. **[Upload assets](/cli/cm/upload)** if created manually +2. **[Insert items](/cli/cm/insert)** to load assets into candy machine +3. **[Validate your setup](/cli/cm/validate)** to ensure everything works +4. **[Learn about guards](/core-candy-machine/guards)** for advanced configuration diff --git a/src/pages/cli/cm/fetch.md b/src/pages/cli/cm/fetch.md new file mode 100644 index 00000000..c4640bf0 --- /dev/null +++ b/src/pages/cli/cm/fetch.md @@ -0,0 +1,29 @@ +--- +title: "Fetch Information" +metaTitle: "MPLX CLI - Fetch Candy Machine Information" +description: "Fetch and display MPL Core Candy Machine information using the MPLX CLI. View configuration, guard settings, item status, and deployment details." +--- + +The `mplx cm fetch` command retrieves and displays comprehensive information about a candy machine, including configuration, guard settings, item status, and deployment details. This command is essential for monitoring and verifying your candy machine setup. + +## Usage + +```bash +# Fetch info from current candy machine directory +mplx cm fetch + +# Fetch specific candy machine by address +mplx cm fetch + +``` + +The fetch command supports an additional flag for detailed information: + +- `--items`: Include detailed information about loaded items + +## Related Commands + +- [`mplx cm create`](/cli/cm/create) - Create the candy machine to fetch +- [`mplx cm insert`](/cli/cm/insert) - Load items (affects item counts) +- [`mplx cm validate`](/cli/cm/validate) - Validate cache vs on-chain data +- [`mplx cm withdraw`](/cli/cm/withdraw) - Clean up after checking status diff --git a/src/pages/cli/cm/index.md b/src/pages/cli/cm/index.md new file mode 100644 index 00000000..b0071ed0 --- /dev/null +++ b/src/pages/cli/cm/index.md @@ -0,0 +1,226 @@ +--- +title: "Candy Machine Commands" +metaTitle: "MPLX CLI - Candy Machine Commands" +description: "Create and manage MPL Core Candy Machines using the MPLX CLI. Interactive wizard, asset upload, and complete candy machine lifecycle management." +--- + +The MPLX CLI provides comprehensive support for creating and managing **MPL Core Candy Machines** on Solana. These commands allow you to create NFT collections with configurable minting rules, upload assets, and manage the entire candy machine lifecycle through an intuitive command-line interface. + +## Quick Start + +Get started quickly with the interactive wizard: + +```bash +mplx cm create --wizard +``` + +This single command handles everything to create a candy machine: asset validation, upload, candy machine creation including guard configuration, item insertion with progress tracking. + +## Command Overview + +| Command | Purpose | Key Features | +|---------|---------|--------------| +| [`create`](/cli/cm/create) | Create a new candy machine | Interactive wizard, template generation, manual config | +| [`upload`](/cli/cm/upload) | Upload assets to storage | Intelligent caching, progress tracking, validation | +| [`insert`](/cli/cm/insert) | Insert items into candy machine | Smart loading detection, batch processing | +| [`validate`](/cli/cm/validate) | Validate asset cache | Comprehensive validation, error reporting | +| [`fetch`](/cli/cm/fetch) | Fetch candy machine info | Display configuration, guard settings, status | +| [`withdraw`](/cli/cm/withdraw) | Withdraw and delete | Clean withdrawal, balance recovery | + +## Key Features + +### Interactive Wizard + +- **Guided Setup**: Step-by-step candy machine creation +- **Asset Validation**: Comprehensive file and metadata validation +- **Progress Tracking**: Real-time indicators for all operations +- **Error Recovery**: Detailed error messages with actionable guidance + +### Intelligent Asset Management + +- **Smart Caching**: Reuses existing uploads when possible +- **Batch Processing**: Efficient asset upload and insertion +- **File Validation**: Ensures proper naming and metadata format +- **Collection Support**: Automatic collection creation + +### Flexible Configuration + +- **Guard Support**: All Core Candy Machine guards supported +- **Guard Groups**: Create different minting phases with distinct rules +- **Template Generation**: Quick directory structure setup +- **Manual Configuration**: Advanced users can create custom configs + +## Directory Structure + +All candy machine commands work from a **candy machine asset directory** with this structure: + +```text +my-candy-machine/ +├── assets/ +│ ├── 0.png # Image files (PNG, JPG) +│ ├── 0.json # Metadata files +│ ├── 1.png +│ ├── 1.json +│ ├── ... +│ ├── collection.png # Collection image +│ └── collection.json # Collection metadata +├── asset-cache.json # Asset upload cache (generated) +└── cm-config.json # Candy machine configuration (generated when using the wizard) +``` + +## Workflow Options + +### Option 1: Wizard Mode (Recommended) + +Perfect for beginners and most use cases: + +```bash +mplx cm create --wizard +``` + +**What it does:** + +1. Validates assets and configuration +2. Uploads all assets with progress tracking +3. Creates the candy machine on-chain +4. Inserts all items with transaction progress +5. Provides comprehensive completion summary + +### Option 2: Manual Mode (Advanced) + +For advanced users who want full control: + +```bash +# 1. Set up directory and config manually +mkdir my-candy-machine && cd my-candy-machine +# (create assets/ directory and add your assets) + +# 2. Upload assets +mplx cm upload + +# 3. Create candy machine +mplx cm create + +# 4. Insert items +mplx cm insert + +# 5. Validate (optional) +mplx cm validate +``` + +## Guard Configuration + +The CLI supports all Core Candy Machine guards and guard groups: + +### Global Guards + +```json +{ + "guardConfig": { + "solPayment": { + "lamports": 1000000000, + "destination": "111111111111111111111111111111111" + }, + "mintLimit": { + "id": 1, + "limit": 1 + } + } +} +``` + +### Guard Groups (Minting Phases) + +```json +{ + "groups": [ + { + "label": "wl", + "guards": { + "allowList": { + "merkleRoot": "MerkleRootHash..." + }, + "solPayment": { + "lamports": 500000000, + "destination": "111111111111111111111111111111111" + } + } + }, + { + "label": "public", + "guards": { + "solPayment": { + "lamports": 1000000000, + "destination": "111111111111111111111111111111111" + } + } + } + ] +} +``` + +## Available Guards + +The CLI supports all Core Candy Machine guards: + +**Payment Guards**: `solPayment`, `solFixedFee`, `tokenPayment`, `token2022Payment`, `nftPayment`, `assetPayment`, `assetPaymentMulti` + +**Access Control**: `addressGate`, `allowList`, `nftGate`, `tokenGate`, `assetGate`, `programGate`, `thirdPartySigner` + +**Time-Based**: `startDate`, `endDate` + +**Limits**: `mintLimit`, `allocation`, `nftMintLimit`, `assetMintLimit`, `redeemedAmount` + +**Burn Guards**: `nftBurn`, `tokenBurn`, `assetBurn`, `assetBurnMulti` + +**Special**: `botTax`, `edition`, `vanityMint` + +**Freeze Guards**: `freezeSolPayment`, `freezeTokenPayment` + +For detailed guard documentation, see the [Core Candy Machine Guards](/core-candy-machine/guards) reference. + +## Best Practices + +### 🎯 Directory Organization + +- Keep each candy machine in its own directory +- Use descriptive directory names +- Maintain consistent asset naming (0.png, 1.png, etc.) +- Back up your candy machine directories + +### 📁 Asset Preparation + +- Use consistent naming (0.png, 1.png, etc.) +- Ensure metadata JSON files match image files +- Validate image formats (PNG, JPG supported) +- Keep file sizes reasonable (< 10MB recommended) +- Include collection.json with a valid "name" field + +### ⚙️ Configuration + +- Test on devnet before mainnet +- Use the wizard for guided configuration +- Back up configuration files +- Document guard settings +- Consider adding at least one guard or guard group + +### 🚀 Deployment + +- Verify candy machine creation +- Test minting functionality +- Monitor transaction status +- Keep explorer links for verification + +## Related Documentation + +- [Core Candy Machine Overview](/core-candy-machine) - Understanding MPL Core Candy Machines +- [Core Candy Machine Guards](/core-candy-machine/guards) - Complete guard reference +- [CLI Installation](/cli/installation) - Setting up the MPLX CLI +- [CLI Configuration](/cli/config/wallets) - Wallet and RPC setup + +## Next Steps + +1. **[Install the CLI](/cli/installation)** if you haven't already +2. **[Create your first candy machine](/cli/cm/create)** using the wizard +3. **[Explore guard configuration](/core-candy-machine/guards)** for advanced minting rules +4. **[Learn about guard groups](/core-candy-machine/guard-groups)** for phased launches diff --git a/src/pages/cli/cm/insert.md b/src/pages/cli/cm/insert.md new file mode 100644 index 00000000..61a4eff2 --- /dev/null +++ b/src/pages/cli/cm/insert.md @@ -0,0 +1,53 @@ +--- +title: "Insert Items" +metaTitle: "MPLX CLI - Insert Items Command" +description: "Insert uploaded assets into your MPL Core Candy Machine using the MPLX CLI." +--- + +The `mplx cm insert` command inserts uploaded assets from your cache file into the on-chain candy machine, making them available for minting. It features smart loading detection, efficient batch processing, and detailed transaction tracking. + +## Usage + +```bash +# Insert items from current candy machine directory +mplx cm insert + +# Insert items from specific candy machine directory +mplx cm insert +``` + +## Requirements + +Before running the insert command, ensure you have: + +1. **Asset Cache**: Valid `asset-cache.json` with uploaded URIs +2. **Candy Machine**: Created candy machine with ID in cache +3. **Wallet Balance**: Sufficient SOL for transaction fees +4. **Network Access**: Stable connection to Solana network + +### Prerequisites + +```bash +# 1. Candy machine must be created +mplx cm create + +# 2. Upload the assets +mplx cm upload + +# 3. Then insert items +mplx cm insert +``` + +## Related Commands + +- [`mplx cm upload`](/cli/cm/upload) - Upload assets (required before insert) +- [`mplx cm create`](/cli/cm/create) - Create candy machine (required before insert) +- [`mplx cm validate`](/cli/cm/validate) - Validate cache and uploads +- [`mplx cm fetch`](/cli/cm/fetch) - Verify insertion status + +## Next Steps + +1. **[Verify insertion](/cli/cm/fetch)** to confirm all items are loaded +2. **[Test minting](/core-candy-machine/mint)** to ensure candy machine works +3. **[Monitor performance](/cli/cm/validate)** to check for issues +4. **[Plan your launch](/core-candy-machine/guides)** with appropriate guards diff --git a/src/pages/cli/cm/upload.md b/src/pages/cli/cm/upload.md new file mode 100644 index 00000000..e51eca9b --- /dev/null +++ b/src/pages/cli/cm/upload.md @@ -0,0 +1,87 @@ +--- +title: "Upload Assets" +metaTitle: "MPLX CLI - Upload Assets Command" +description: "Upload candy machine assets to decentralized storage using the MPLX CLI. Intelligent caching, progress tracking, and comprehensive validation." +--- + +The `mplx cm upload` command uploads assets to a decentralized storage and generates an `asset-cache.json` file containing upload URIs and metadata. This command provides intelligent caching, progress tracking, and comprehensive validation. + +## Usage + +```bash +# Upload assets from current candy machine directory +mplx cm upload + +# Upload assets from specific candy machine directory +mplx cm upload +``` + +### Directory Structure + +```text +my-candy-machine/ +├── assets/ +│ ├── 0.png # Image files (PNG, JPG) +│ ├── 0.json # Metadata files +│ ├── 1.png +│ ├── 1.json +│ ├── ... +│ ├── collection.png # Collection image +│ └── collection.json # Collection metadata +└── asset-cache.json # Generated after upload +``` + +## Upload Process + +1. Asset Discovery: The command automatically scans the `assets/` directory and identifies image, metadata and collection files. +2. Validation Phase: Verifies the integrity of your files, for example if all image files have matching metadata files and that the metadata is valid json. +3. Cache Check: To identify which files were already uploaded the `asset-cache.json` file is validated. +4. Upload: The actual upload is done. +5. Cache Generation: The `asset-cache.json` file is generated + +## Generated Asset Cache + +The `asset-cache.json` file contains detailed information about uploaded assets. Manually inspecting and using it is only recommended for advanced users. + +Example: + +```json +{ + "candyMachineId": null, + "collection": null, + "assetItems": { + "0": { + "name": "Asset #0", + "image": "0.png", + "imageUri": "https://gateway.irys.xyz/ABC123...", + "imageType": "image/png", + "json": "0.json", + "jsonUri": "https://gateway.irys.xyz/DEF456...", + "loaded": false + }, + "1": { + "name": "Asset #1", + "image": "1.png", + "imageUri": "https://gateway.irys.xyz/GHI789...", + "imageType": "image/png", + "json": "1.json", + "jsonUri": "https://gateway.irys.xyz/JKL012...", + "loaded": false + } + } +} +``` + +## Related Commands + +- [`mplx cm create`](/cli/cm/create) - Create candy machine (can upload automatically) +- [`mplx cm validate`](/cli/cm/validate) - Validate uploaded assets +- [`mplx cm insert`](/cli/cm/insert) - Insert uploaded assets into candy machine +- [`mplx cm fetch`](/cli/cm/fetch) - View candy machine and asset information + +## Next Steps + +1. **[Validate your uploads](/cli/cm/validate)** to ensure everything uploaded correctly +2. **[Create your candy machine](/cli/cm/create)** using the uploaded assets +3. **[Insert items](/cli/cm/insert)** to load assets into the candy machine +4. **[Monitor your setup](/cli/cm/fetch)** to verify everything is working diff --git a/src/pages/cli/cm/validate.md b/src/pages/cli/cm/validate.md new file mode 100644 index 00000000..f5812db1 --- /dev/null +++ b/src/pages/cli/cm/validate.md @@ -0,0 +1,36 @@ +--- +title: "Validate Cache" +metaTitle: "MPLX CLI - Validate Cache Command" +description: "Validate candy machine asset cache and uploads using the MPLX CLI. Comprehensive validation, error detection, and cache integrity verification." +--- + +The `mplx cm validate` command validates the asset cache file to ensure all assets are properly uploaded and accessible. It provides comprehensive validation, error detection, and cache integrity verification. + +## Usage + +```bash +# Validate cache in current candy machine directory +mplx cm validate + +# Validate specific cache file +mplx cm validate + +# Validate on-chain insertions (requires candy machine to exist) +mplx cm validate --onchain +``` + +If the validation command shows issues, depending on the error you might want to check the issues with your assets or run the upload or insert command. + +## Related Commands + +- [`mplx cm upload`](/cli/cm/upload) - Upload assets and create cache +- [`mplx cm create`](/cli/cm/create) - Create candy machine +- [`mplx cm insert`](/cli/cm/insert) - Insert validated assets +- [`mplx cm fetch`](/cli/cm/fetch) - Check candy machine status + +## Next Steps + +1. **[Fix any issues](/cli/cm/upload)** found during validation +2. **[Create candy machine](/cli/cm/create)** if cache is valid +3. **[Insert items](/cli/cm/insert)** to load assets +4. **[Monitor deployment](/cli/cm/fetch)** to ensure success diff --git a/src/pages/cli/cm/withdraw.md b/src/pages/cli/cm/withdraw.md new file mode 100644 index 00000000..82b6bfb9 --- /dev/null +++ b/src/pages/cli/cm/withdraw.md @@ -0,0 +1,53 @@ +--- +title: "Withdraw" +metaTitle: "MPLX CLI - Withdraw Candy Machine" +description: "Withdraw and delete MPL Core Candy Machines using the MPLX CLI to reclaim rent SOL." +--- + +The `mplx cm withdraw` command withdraws and deletes a candy machine, recovering any remaining SOL balance and cleaning up the on-chain account. This operation is irreversible and should be used when the candy machine is no longer needed. Already minted NFTs are not affected. + +{% callout title="Irreversible" type="warning" %} +This command is irreversible. Once executed your candy machine is destroyed and can not be recreated. +{% /callout %} + +## Usage + +```bash +# Withdraw candy machine from current directory +mplx cm withdraw + +# Withdraw specific candy machine by address +mplx cm withdraw --address + +``` + +Optional Flags that you can use: + +- `--address`: Specify candy machine address directly +- `--force`: *Danger* Skip confirmation prompts (use with extreme caution) + +### ⚠️ Irreversible Operation + +- **Permanent Deletion**: The candy machine account will be permanently deleted +- **No Recovery**: Cannot be undone or restored +- **Data Loss**: All on-chain configuration and state will be lost +- **Minted NFTs**: Existing minted NFTs are not affected + +### 🛡️ Best Practices + +**Planning:** + +- Plan withdrawal timing carefully +- Coordinate with team members + +**Execution:** + +- Double-check all parameters +- Use devnet for practice + +## Related Commands + +- [`mplx cm fetch`](/cli/cm/fetch) - Check status before withdrawal +- [`mplx cm create`](/cli/cm/create) - Create new candy machines +- [`mplx cm validate`](/cli/cm/validate) - Validate before withdrawal +- [`solana balance`](https://docs.solana.com/cli) - Check recovered balance diff --git a/src/pages/cli/index.md b/src/pages/cli/index.md index f50cbe95..199f35cf 100644 --- a/src/pages/cli/index.md +++ b/src/pages/cli/index.md @@ -15,6 +15,12 @@ The Metaplex CLI is a powerful command-line tool that provides a comprehensive s - Fetch asset and collection information - Manage asset properties and attributes +### Candy Machine Support +- Create MPL Core Candy Machines with step-by-step guidance +- Upload, validate, and insert assets with intelligent caching +- Set up complex minting rules and guard groups +- Real-time indicators for uploads, creation, and deployment + ### Toolbox Utilities - Create and manage fungible tokens - Transfer SOL between addresses @@ -42,11 +48,9 @@ The Metaplex CLI is a powerful command-line tool that provides a comprehensive s - [Set up your wallet](/cli/config/wallets) - [Configure RPC endpoints](/cli/config/rpcs) - [Choose your preferred explorer](/cli/config/explorer) -3. Start using the core commands: +3. Start using the commands: - [Create assets](/cli/core/create-asset) - [Create collections](/cli/core/create-collection) - - [Update assets](/cli/core/update-asset) - - [Fetch assets](/cli/core/fetch) ## Command Structure @@ -58,6 +62,7 @@ mplx [options] Categories include: - `core`: MPL Core asset management +- `cm`: Candy Machine operations - `toolbox`: Utility commands - `config`: Configuration management @@ -75,6 +80,35 @@ Categories include: - [Documentation](https://developers.metaplex.com) - [Discord Community](https://discord.gg/metaplex) +## Quick Start Examples + +### Create Your First Candy Machine + +Get started with the interactive wizard: +```bash +# Install and configure the CLI +mplx config set keypair /path/to/my-wallet.json +mplx config set rpcUrl https://api.mainnet-beta.solana.com + +# Create a candy machine with guided setup +mplx cm create --wizard +``` + +### Create Individual Assets + +For single assets or custom collections: +```bash +# Create a collection +mplx core create-collection + +# Create an asset in the collection +mplx core create-asset +``` + ## Next Steps -Ready to get started? Head over to the [installation guide](/cli/installation) to set up the CLI on your system. \ No newline at end of file +Ready to get started? Choose your path: + +1. **For Setup**: Visit the [installation guide](/cli/installation) +2. **For NFT Collections**: Start with the [candy machine wizard](/cli/cm/create) +3. **For Individual Assets**: Begin with [asset creation](/cli/core/create-asset) diff --git a/src/pages/cli/installation.md b/src/pages/cli/installation.md index 28b12362..e1763f50 100644 --- a/src/pages/cli/installation.md +++ b/src/pages/cli/installation.md @@ -3,8 +3,6 @@ title: Installation description: Install and set up the Metaplex CLI --- -# Installation Guide - This guide will help you install and set up the Metaplex CLI on your system. ## Prerequisites diff --git a/src/pages/core-candy-machine/create.md b/src/pages/core-candy-machine/create.md index ca830544..4a715b12 100644 --- a/src/pages/core-candy-machine/create.md +++ b/src/pages/core-candy-machine/create.md @@ -13,6 +13,14 @@ If you wish to create your Core Candy Machine Assets into a collection (new or e ## Creating a Candy Machine +{% callout title="CLI Alternative" type="note" %} +You can also create Core Candy Machines using the MPLX CLI with an interactive wizard: +```bash +mplx cm create --wizard +``` +This provides step-by-step guidance, asset validation, and automatic deployment. See the [CLI Candy Machine documentation](/cli/cm) for detailed instructions. +{% /callout %} + {% dialect-switcher title="Create a Core Candy Machine" %} {% dialect title="JavaScript" id="js" %} diff --git a/src/pages/core-candy-machine/index.md b/src/pages/core-candy-machine/index.md index 942cb706..55668aff 100644 --- a/src/pages/core-candy-machine/index.md +++ b/src/pages/core-candy-machine/index.md @@ -11,10 +11,10 @@ The name refers to the vending machines that dispense candy for coins via a mech {% quick-links %} {% quick-link title="Getting Started" icon="InboxArrowDown" href="/core-candy-machine/getting-started" description="Find the language or library of your choice and get started with Candy Machines." /%} +{% quick-link title="CLI Commands" icon="CommandLine" href="/cli/cm" description="Create and manage candy machines using the Metaplex CLI with interactive wizard." /%} {% quick-link title="API reference" icon="JavaScript" href="https://mpl-core-candy-machine.typedoc.metaplex.com/" target="_blank" description="Check out the Javascript API docs." /%} - {% quick-link title="API reference" icon="Rust" href="https://docs.rs/mpl-core-candy-machine-core/" target="_blank" description="Check out the Rust API docs." /%} {% /quick-links %} diff --git a/src/pages/core-candy-machine/insert-items.md b/src/pages/core-candy-machine/insert-items.md index 760695b5..fdf9e925 100644 --- a/src/pages/core-candy-machine/insert-items.md +++ b/src/pages/core-candy-machine/insert-items.md @@ -12,6 +12,14 @@ Note that the name and URI of each inserted item are respectively constraint by Additionally, because transactions are limited to a certain size, we cannot insert thousands of items within the same transaction. The number of items we can insert per transaction will depend on the **Name Length** and **URI Length** attributes defined in the Config Line Settings. The shorter our names and URIs are, the more we'll be able to fit into a transaction. +{% callout title="CLI Alternative" type="note" %} +You can also insert items using the MPLX CLI, which handles batch processing automatically: +```bash +mplx cm insert +``` +The CLI provides smart loading detection, progress tracking, and optimal batch sizing. See the [CLI insert command documentation](/cli/cm/insert) for more details. +{% /callout %} + {% dialect-switcher title="Add config lines" %} {% dialect title="JavaScript" id="js" %}