Core Commands
Create Asset
The mplx core asset create
command allows you to create MPL Core Assets using three different methods: simple creation, file-based creation, or an interactive wizard. This command provides flexibility in how you want to create your assets while maintaining a consistent output format.
Methods
1. Simple Creation
Create a single Asset by providing the name and URI of the metadata directly through command line arguments.
mplx core asset create --name "My NFT" --uri "https://example.com/metadata.json"
2. File-based Creation
Create a single Asset by providing an image file and a JSON metadata file. The command will handle uploading both files and creating the asset.
mplx core asset create --files --image "./my-nft.png" --json "./metadata.json"
3. Interactive Wizard
Create an Asset using the interactive wizard which guides you through the entire process, including file uploads and metadata creation.
mplx core asset create --wizard
Options
Basic Options
--name <string>
: Asset name (required for simple creation)--uri <string>
: URI of the Asset metadata (required for simple creation)--collection <string>
: Collection ID for the asset
File-based Options
--files
: Flag to indicate file-based creation--image <path>
: Path to image file to upload and assign to Asset--json <path>
: Path to JSON metadata file
Plugin Options
--plugins
: Use interactive plugin selection--pluginsFile <path>
: Path to a JSON file with plugin data
Examples
- Create an asset using the interactive wizard:
mplx core asset create --wizard
- Create an asset with name and URI:
mplx core asset create --name "My NFT" --uri "https://example.com/metadata.json"
- Create an asset from files:
mplx core asset create --files --image "./my-nft.png" --json "./metadata.json"
- Create an asset with a collection:
mplx core asset create --name "My NFT" --uri "https://example.com/metadata.json" --collection "collection_id_here"
- Create an asset with files and a collection:
mplx core asset create --files --image "./my-nft.png" --json "./metadata.json" --collection "collection_id_here"
Output
The command will output the following information upon successful creation:
--------------------------------
Asset: <asset_address>
Signature: <transaction_signature>
Explorer: <explorer_url>
Core Explorer: https://core.metaplex.com/explorer/<asset_address>
--------------------------------