Introducing Niftory CLI

Introducing Niftory CLI

A powerful new way to interact with web3, powered by the Niftory API. Mint & airdrop NFTs, create wallets, all from your command-line terminal

We are excited to announce the launch of the Niftory CLI, providing an intuitive way for developers to interact with complex web3 concepts like NFTs and digital wallets from the comfort of a command-line terminal.

As of today, the CLI supports the following capabilities:

  • Mint & airdrop NFTs

  • Create custodial wallets

  • Upload files to IPFS, and simultaneously to a CDN for fast access

No smart contract or blockchain expertise is needed -- we handle all of that for you! The CLI is powered by the Niftory API. If you are new to Niftory, we recommend following this quickstart guide first:

Niftory API Quickstart

Getting Started

  1. Install the Niftory CLI.

     npm install -g @niftory/cli
  2. Sign up for Niftory, create an app, and deploy your prebuilt smart contract.

  3. Log in to the Niftory CLI.

     niftory login
  4. When prompted, pick your environment (we recommend always starting with testnet), and then select your app from step 2.

  5. Congratulations, you're all set up! Now let's do something useful.

Creating custodial wallets

Note: This command is currently available for the Flow blockchain only. If you would like this for other chains, please contact us.

It's trivial to create a custodial wallet with the CLI:

niftory wallet create

The wallet creation happens asynchronously, so to check on the status of the operation, just call the wallet get command with the ID returned above:

niftory wallet get <ID from above>

When the wallet is set up, its address will be updated and its state will be set to READY.

That's it! It's really that easy to create wallets with the CLI.

Minting NFTs as easy as 123

To really showcase the power and simplicity of the Niftory CLI, let's try minting an NFT.

  1. Create a set for your NFT collection

     niftory set create "Niftory CLI NFTs"
  2. Upload the file you want to mint

     niftory file upload ./niftory_cli_logo.png --name="Niftory CLI Logo"

    Let's pause to appreciate this for a moment -- this simple command uploaded the file both to IPFS as well as a CDN automatically! You can use the file get command with the id returned above to see more info:

     niftory file get <ID from above>
       "contentType": "image/png",
       "id": "<ID>",
       "url": ""
  3. Create the NFTModel to define the template of the NFT.
    This command will walk you through a few prompts. When asked, specify the ID of the set and the file from above.

     niftory nftmodel create
  4. Let's mint!

    But wait -- what if we want to just airdrop the NFT we're minting to the wallet we created earlier? We've got a combo command for you:

     niftory nft transfer nftModelId="<ID from step 3>" --address=0x95b6b26f8eae8cab --wait

    Replace the nftModelId and address to be the NFTModel and wallet you created earlier, and voila -- you're done! The nft transfer command will both mint and transfer the NFT.

    Note: if you just want to mint (without the transfer) use the nftmodel mint command:

     niftory nftmodel mint <ID from step 3> --quantity=1 --wait

Protip #1: Whenever in doubt, use --help to see the command line syntax (e.g. niftory nft transfer --help)

Protip #2: Blockchain operations can sometimes take a while. By default, all commands return asynchronously so you don't have to block on long-running operations. But if you prefer to wait, add --wait to any command.

Using Niftory API and CLI together

You can use a combination of the Niftory API and CLI. For example, you can create an NFTModel using the CLI, and then use the updateNFTModel API to edit it. Or you can create all your NFTs with the API, and use the CLI to airdrop them. Since the API and CLI both interact with the same underlying Niftory infrastructure, you can build a workflow that suits you best.

Call for Feedback

Everything we build at Niftory is in service of improving the web3 developer experience. We would love to work with you to see where to take things from here. Please reach out to us on Discord -- we look forward to hearing from you!