Command Line Tool Overview
A Command Line Interface (CLI) tool designed to assist developers building on Antelope blockchains.
Its primary features are:
- Generation of Contract Kit code for specified Antelope smart contracts.
- Creation of new Antelope blockchain testnet accounts using given or generated keys.
- Generation of Antelope blockchain key pairs.
This documentation will cover some of the CLI and its features. You can also refer to the
help command for additional information.
npx @wharfkit/cli help ✔
This will outline all commands available for the release being used.
Usage: npx @wharfkit/cli [options] [command] Wharf Command Line Utilities Options: -V, --version output the version number -h, --help display help for command Commands: keys Generate a new set of public and private keys account [options] Create a new account with an optional public key generate [options] <account> Generate Contract Kit code for the named smart contract help [command] display help for command
The CLI provides a range of commands tailored for different purposes. This section will introduce the major commands and their functionalities:
generate command is used to create TypeScript code for use in client applications, tailored to a designated Antelope smart contract. The generated code can then be used to interact with the contract in a type-safe manner, provide autocompletion hints for contract data, and serve as an ORM.
account command, developers can easily create new testnet accounts for development and testing. This process will randomly generate account names and keys for quick access, but also allows additional parameters to be specified to select these values.
keys command is designed to randomly create a new pair of public and private keys and output them to the console. These keys are generated locally using the Antelope SDK’s PrivateKey generation capabilities.
To pull down the source, build, and run locally. You will need to clone down the project:
git clone [email protected]:wharfkit/cli.git
Navigate into the folder and install the dependencies:
cd cli && yarn
The application can now be run using:
And if desired, you can install it globally on your system:
yarn global add $(pwd) npm install -g .
This will make it so you can run the
wharfkit command from your command prompt.
To remove this installation in the future, run one of the following:
yarn global remove @wharfkit/cli npm uninstall -g @wharfkit/cli