Drops: The UniversalPage CLI

UniversalPage CLI for Creators

The UniversalPage CLI is a command-line tool that helps creators generate and/or import metadata for large collections of LSP8 assets. With the CLI, creators can easily manage their collections and upload metadata in bulk.

Installation

To install the UniversalPage CLI, follow the steps in a terminal on Mac OS:

  1. Install Homebrew by visiting brew.sh
  2. Install additional tools to be able to work with the CLI repository and running the CLI:
brew install git node@18 yarn
  1. Copy the UniversalPage CLI to your machine:
git clone https://github.com/Universal-Page/cli.git universal-page-cli
  1. Install and launch the CLI:
cd universal-page-cli
yarn
./universalPage

Getting Started

To get started with the UniversalPage CLI, simply run ./universalPage. You should see a welcome message:

  _   _       _                          _ ____
 | | | |_ __ (_)_   _____ _ __ ___  __ _| |  _ \ __ _  __ _  ___
 | | | | '_ \| \ \ / / _ \ '__/ __|/ _` | | |_) / _` |/ _` |/ _ \
 | |_| | | | | |\ V /  __/ |  \__ \ (_| | |  __/ (_| | (_| |  __/
  \___/|_| |_|_| \_/ \___|_|  |___/\__,_|_|_|   \__,_|\__, |\___|
                                                      |___/
Welcome to the UniversalPage CLI!

This CLI provides a guided interface to configure and manage your NFTs on the UniversalPage marketplace.
You can use this tool to create new NFTs, manage existing ones, and generate metadata using LSP7 and LSP8 standards.
Thank you for using the UniversalPage NFT CLI!

? Enter a command: (help)

Hit enter or type help to see more commands.

Generating Metadata

  1. Run the following command to generate metadata for your collection:
generate metadata
  1. Follow the prompts to configure metadata generation process.

Here is an example of possible import commands:

? Enter a command: generate metadata
Before generating metadata for your NFT, please ensure that you have uploaded all necessary images and assets to IPFS.
Once uploaded, you will need to have the IPFS hashes for each file.

? Are you ready to generate metadata for your NFT? Yes
? Enter a IPFS url containing media (images, video, etc.): ipfs://bafybeihge7jbpf4kcjjgdv2ihbysoqr3syvzpapbce7qlcudzc5hzt3eyq
? Enter a directory containing media (images, videos, etc.) [optional]: /hashlips_art_engine/build/images
? Enter a directory containing metadata (json) [optional]: /hashlips_art_engine/build/json

Uploading Media

You can use services such as NFT.Storage to upload and manage the media of your collection. The UniversalPage CLI requires all media being uploaded into a single folder on IPFS. For example: ipfs://bafybeihge7jbpf4kcjjgdv2ihbysoqr3syvzpapbce7qlcudzc5hzt3eyq. The media must include all images, videos, animations, and more that is referenced by tokens in metadata.

Importing ERC721 or ERC1155 Metadata

To generate random combinations on scale you can leverage tools such as HashLips. These tools produce a folder containing token images and json metadata. The metadata follows a standard by OpenSea:

  • name: Name of item.
  • description: A human readable description of the item. Markdown is supported.
  • image: This is the IPFS URL to the image of the item.
  • attributes: These are the attributes for the item, which will show up on the OpenSea page for the item.

The UniversalPage CLI does not support the standard completely, but rather uses generated metadata to produce more complete LSP4 Lukso standard data.

  1. Wait for all tokens to be generated. The UniversalPage CLI will print a folder name where all tokens are located. e.g.
Building ████████████████████████████████████████ | 100% | 300/300
Done!

Token metadata is built and available for upload:
/universal-page-cli/build/1678760015502

The build folder will contain all tokens as index.json starting from 1.json. The token in the example above, will look like:

{
  "LSP4Metadata": {
    "name": "SpookyEyes #1",
    "description": "Spooky eyes go places",
    "attributes": [
      {
        "key": "Background",
        "value": "Black"
      },
      {
        "key": "Eyeball",
        "value": "Red"
      },
      {
        "key": "Eye color",
        "value": "Yellow"
      },
      {
        "key": "Iris",
        "value": "Small"
      },
      {
        "key": "Shine",
        "value": "Shapes"
      },
      {
        "key": "Bottom lid",
        "value": "Middle"
      },
      {
        "key": "Top lid",
        "value": "High"
      }
    ],
    "images": [
      [
        {
          "width": 512,
          "height": 512,
          "hashFunction": "keccak256(bytes)",
          "hash": "0x61376b0df69be5547d18a9244f5fcbfa2f6e20cea3ec962c0b0da61a9af5996c",
          "url": "ipfs://bafybeihge7jbpf4kcjjgdv2ihbysoqr3syvzpapbce7qlcudzc5hzt3eyq/1.png"
        }
      ]
    ],
    "links": []
  }
}

Importing Tokens

  1. Navigate to the UniversalPage, sign in with your Universal Profile
  2. Select Editor -> My drops and choose a drop you like to import the tokens. You can also create new drop by clicking + Create -> Drop.
  3. In a drops editor, select Items -> Import collection items. If you do not see the option, you may need to remove all tokens you might have uploaded previously.
  4. In import collection items modal, drag&drop a build folder containing all generated tokens (indexed json files).
  5. You should see Import button and message describing how many tokens have been prepared for upload. Press Import to start importing process.

The process can take some time, which depends on usage of the UniversalPage and number of tokens in a collection. You can close or navigate away from the UniversalPage drops page at any time. Come back and check on tokens to continue to the launch of your collection.

Troubleshooting

If you encounter any issues with the UniversalPage CLI, please refer to the following resources:

  • The UniversalPage discord: invite
  • The UniversalPage GitHub repository: https://github.com/universal-page/cli/issues

Common Issues

  • command not found: node. Try to force link node JS by running:
brew link --overwrite node@18

Sign up for our newsletter

Sign up for our newsletter to stay up to date about product news and updates.

We care about the protection of your data. Read our Privacy Policy.