@niftory/cli
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Niftory CLI logo

This package is in active development and is not ready for widespread use.

Niftory CLI

CLI for the Niftory platform.

oclif Version Downloads/week License

Usage

$ npm install -g @niftory/cli
$ niftory COMMAND
running command...
$ niftory (--version)
@niftory/cli/0.3.0 linux-x64 node-v18.14.2
$ niftory --help [COMMAND]
USAGE
  $ niftory COMMAND
...

Commands

niftory app create

Creates a niftory app

USAGE
  $ niftory app create [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output json|none]

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Creates a niftory app

EXAMPLES
  $ niftory app create

niftory app get-keys

Select an app from the currently authenticated apps.

USAGE
  $ niftory app get-keys [--appId <value>] [--appName <value> --environment testnet|mainnet] [--output json|none]

FLAGS
  --appId=<value>         The appId of the app
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Select an app from the currently authenticated apps.

EXAMPLES
  $ niftory app get-keys --appId <appId>

niftory app list

List apps belonging to the current user

USAGE
  $ niftory app list [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output json|none]

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  List apps belonging to the current user

EXAMPLES
  $ niftory app list

niftory app select

Select an app from the currently authenticated apps.

USAGE
  $ niftory app select [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output json|none]

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Select an app from the currently authenticated apps.

EXAMPLES
  $ niftory app select

niftory autocomplete [SHELL]

display autocomplete installation instructions

USAGE
  $ niftory autocomplete [SHELL] [-r]

ARGUMENTS
  SHELL  shell type

FLAGS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

DESCRIPTION
  display autocomplete installation instructions

EXAMPLES
  $ niftory autocomplete

  $ niftory autocomplete bash

  $ niftory autocomplete zsh

  $ niftory autocomplete --refresh-cache

See code: @oclif/plugin-autocomplete

niftory contract deploy

Deploys a contract belonging to an app with the provided appId

USAGE
  $ niftory contract deploy --appId <value> --blockchain <value> --contractName <value> [--appName <value>
    --environment testnet|mainnet] [--output json|none]

FLAGS
  --appId=<value>         (required) The appId of the app
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --blockchain=<value>    (required) The blockchain to deploy to. Should be one of FLOW or POLYGON
  --contractName=<value>  (required) The name of the contract
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Deploys a contract belonging to an app with the provided appId

EXAMPLES
  $ niftory contract deploy --appId <appId> --contractName <contractName> --blockchain <blockchain>

niftory file get ID

Gets a file by ID

USAGE
  $ niftory file get ID [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output
    json|none]

ARGUMENTS
  ID  The file to fetch

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Gets a file by ID

EXAMPLES
  $ niftory file get <id>

niftory file upload PATH

Uploads a file

USAGE
  $ niftory file upload PATH [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output
    json|none] [--name <value>] [--description <value>]

ARGUMENTS
  PATH  The path of the file to upload

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --description=<value>   A description for the file.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --name=<value>          The name of the file to upload. Defaults to its name on disk
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Uploads a file

EXAMPLES
  $ niftory file upload <path> --name <name> --description <description>

niftory help [COMMANDS]

Display help for niftory.

USAGE
  $ niftory help [COMMANDS] [-n]

ARGUMENTS
  COMMANDS  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for niftory.

See code: @oclif/plugin-help

niftory login

Log into the Niftory CLI.

USAGE
  $ niftory login [--environment testnet|mainnet] [--ignoreAppSelection]

FLAGS
  --environment=<option>  <options: testnet|mainnet>
  --ignoreAppSelection    Ignores app selection step

DESCRIPTION
  Log into the Niftory CLI.

EXAMPLES
  $ niftory login

See code: dist/commands/login.ts

niftory nft get ID

Gets an NFT by ID

USAGE
  $ niftory nft get ID [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output
    json|none]

ARGUMENTS
  ID  The NFT to fetch

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Gets an NFT by ID

EXAMPLES
  $ niftory nft get <id>

niftory nft transfer

Transfers an NFT to another address, user or wallet. This mutation requires the userId, walletId' or the wallet address` to be specified

USAGE
  $ niftory nft transfer [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output json|none]
    [--id <value> | --nftModelId <value>] [--userId <value> | --walletId <value> | --address <value>] [--force] [--wait]

FLAGS
  --address=<value>       The address of the Wallet to to transfer the NFT. This mutation requires the `userId`,
                          `walletId' or the wallet `address` to be specified.
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --force                 Force transfer an NFT that has failed previously.
  --id=<value>            The ID of the NFT to transfer. Only one of id or nftModelId can be used.
  --nftModelId=<value>    The nftModel to randomly select an NFT from. Only one of id or nftModelId can be used.
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>
  --userId=<value>        The ID of the AppUser to send the NFT to. This mutation requires the `userId`, `walletId' or
                          the wallet `address` to be specified.
  --wait                  Wait until the NFT transfer is complete before returning.
  --walletId=<value>      The database ID of the Wallet to send the NFT to. This mutation requires the `userId`,
                          `walletId' or the wallet `address` to be specified.

DESCRIPTION
  Transfers an NFT to another address, user or wallet. This mutation requires the `userId`, `walletId' or the wallet
  `address` to be specified

EXAMPLES
  $ niftory nft transfer --id <id> --nftModelId <nftModelId> --userId <userId> --walletId <walletId> --address <address>

niftory nft withdraw

Withdraws an NFT to from user custodial wallet to another wallet. This mutation requires the NFT id, niftoryWalletAddress and receiverAddress to be specified

USAGE
  $ niftory nft withdraw --id <value> --receiverAddress <value> --niftoryWalletAddress <value> [--appId <value>
    --environment testnet|mainnet] [--appName <value> ] [--output json|none]

FLAGS
  --appId=<value>                 The app ID to run the command in the context of. If not specified, defaults to the app
                                  specified at login.
  --appName=<value>               The app name to run the command in the context of. If not specified, defaults to the
                                  app specified at login.
  --environment=<option>          The environment to run the command in the context of. If not specified, defaults to
                                  the environment of the app specified at login.
                                  <options: testnet|mainnet>
  --id=<value>                    (required) The ID of the NFT to withdraw. The NFT needs to belong to a custodial
                                  wallet
  --niftoryWalletAddress=<value>  (required) The address of the niftory custodial wallet to withdraw the NFT from.
  --output=<option>               [default: json] Sets the output mode for std output
                                  <options: json|none>
  --receiverAddress=<value>       (required) The address of the external wallet to withdraw the NFT.

DESCRIPTION
  Withdraws an NFT to from user custodial wallet to another wallet. This mutation requires the NFT `id`,
  `niftoryWalletAddress` and  `receiverAddress` to be specified

EXAMPLES
  $ niftory nft withdraw --id <id> --niftoryWalletAddress <niftoryWalletAddress> --receiverAddress <receiverAddress>

niftory nftmodel create

Creates a new NFTModel

USAGE
  $ niftory nftmodel create [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output json|none]
    [-t <value>]

FLAGS
  -t, --tag=<value>...    String labels to tag this NFTModel with. These will be stored in the Niftory API but will not
                          be added to the blockchain
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Creates a new NFTModel

EXAMPLES
  $ niftory nftModel create --tag <tag1>  --tag <tag2>

niftory nftmodel get ID

Gets an NFT Model by ID

USAGE
  $ niftory nftmodel get ID [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output
    json|none]

ARGUMENTS
  ID  The nft model to fetch

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Gets an NFT Model by ID

EXAMPLES
  $ niftory nftmodel get <id>

niftory nftmodel mint NFTMODELID

Initiates minting for a given NFTModel

USAGE
  $ niftory nftmodel mint NFTMODELID [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output
    json|none] [--quantity <value>] [--wait]

ARGUMENTS
  NFTMODELID  The NFT Model to mint

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>
  --quantity=<value>      The number of NFTs to mint. Defaults to minting all NFTs in the model. If quantity exceeds the
                          quantity defined in the model, the latter is used.
  --wait                  Wait until the NFTs are minted before returning.

DESCRIPTION
  Initiates minting for a given NFTModel

EXAMPLES
  $ niftory nftModel mint <nftModelId> --quantity <quantity>

niftory set create TITLE

Created a new set

USAGE
  $ niftory set create TITLE [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output
    json|none] [-t <value>]

ARGUMENTS
  TITLE  The title of the new set

FLAGS
  -t, --tag=<value>...    String labels to tag this Set with. These will be stored in the Niftory API but will not be
                          added to the blockchain
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Created a new set

EXAMPLES
  $ niftory set create <title> --tag <tag1> --tag <tag2>

niftory set get ID

Gets a set by ID

USAGE
  $ niftory set get ID [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output
    json|none]

ARGUMENTS
  ID  The set to fetch

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Gets a set by ID

EXAMPLES
  $ niftory set get <id>

niftory set list

Gets all sets in the app with optional filter parameters

USAGE
  $ niftory set list [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output json|none]
    [--title <value>] [--id <value>] [--blockchainId <value>] [--tag <value>]

FLAGS
  --appId=<value>            The app ID to run the command in the context of. If not specified, defaults to the app
                             specified at login.
  --appName=<value>          The app name to run the command in the context of. If not specified, defaults to the app
                             specified at login.
  --blockchainId=<value>...  The blockchain IDs of the NFTSets to find.
  --environment=<option>     The environment to run the command in the context of. If not specified, defaults to the
                             environment of the app specified at login.
                             <options: testnet|mainnet>
  --id=<value>...            The IDs of the NFTSets to find.
  --output=<option>          [default: json] Sets the output mode for std output
                             <options: json|none>
  --tag=<value>...           The tags in the set to find. The sets returned will contain every tag specified.
  --title=<value>            The title of the NFTSet to find.

DESCRIPTION
  Gets all sets in the app with optional filter parameters

EXAMPLES
  $ niftory set list

  $ niftory set list --title <title> 

  $ niftory set list --id <id1> --id <id2>

  $ niftory set list --tag <tag1> --tag <tag2>

  $ niftory set list --blockchainId <blockchainId1> --blockchainId <blockchainId2>

niftory wallet create

Creates a new Niftory wallet for the current app

USAGE
  $ niftory wallet create [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output json|none]

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Creates a new Niftory wallet for the current app

EXAMPLES
  $ niftory wallet create

niftory wallet get IDORADDRESS

Gets a wallet by ID or address

USAGE
  $ niftory wallet get IDORADDRESS [--appId <value> --environment testnet|mainnet] [--appName <value> ]
    [--output json|none]

ARGUMENTS
  IDORADDRESS  The ID of the Niftory Wallet to fetch

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Gets a wallet by ID or address

EXAMPLES
  $ niftory wallet get <id>

niftory wallet list

Gets all wallets associated with the current app.

USAGE
  $ niftory wallet list [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output json|none]

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Gets all wallets associated with the current app.

EXAMPLES
  $ niftory wallet list

niftory whoami

Gets the currently signed in user.

USAGE
  $ niftory whoami [--appId <value> --environment testnet|mainnet] [--appName <value> ] [--output json|none]

FLAGS
  --appId=<value>         The app ID to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --appName=<value>       The app name to run the command in the context of. If not specified, defaults to the app
                          specified at login.
  --environment=<option>  The environment to run the command in the context of. If not specified, defaults to the
                          environment of the app specified at login.
                          <options: testnet|mainnet>
  --output=<option>       [default: json] Sets the output mode for std output
                          <options: json|none>

DESCRIPTION
  Gets the currently signed in user.

EXAMPLES
  $ niftory whoami

See code: dist/commands/whoami/index.ts

/@niftory/cli/

    Package Sidebar

    Install

    npm i @niftory/cli

    Weekly Downloads

    4

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    274 kB

    Total Files

    84

    Last publish

    Collaborators

    • niftoryrojan
    • artur-niftory
    • sidd-niftory
    • aniraga-niftory