Quick Start Guide
near-cli-rs tool is a human-friendly companion that helps you interact with the NEAR Protocol from the command line. This has a guided prompt interface to help you make your own commands built in Rust.
This is a separate tool from near-cli, a CLI tool of similar functionality without the guided prompts.
$ cargo install near-cli-rs
To utilize the commands that involve transactions, sending tokens, deploying contracts, etc., you'll have to store a full access key to a given account on your machine.
Using the arrow keys navigate to...
account -Manage accounts
import-account -Import existing account (a.k.a. "sign-in")
choose any of the preferred sign-in methods. For this example, we'll choose the...
using-web-wallet -Import existing account using NEAR Wallet (a.k.a. "sign in")
- Gives you information on a specified account, near balance, storage, list of access keys, etc.
For this tutorial select
What is the name of the network?
You'll get redirected to
wallet.testnet.near.org. Once there, grant authorization. Then in your terminal, you'll be asked to enter your account ID. Give it the name of the account you just authorized access to and a full access key.
If you're on Mac you'll have the option to use the Mac Keychain option.
Either storage option is fine. Using the legacy storage option will save a file in your root directory in a hidden folder called
./near-credentials. This storage option is compatable with the
near-cli tool (a cli tool without the guided prompts but similar functionality).
Now you can use
near-cli-rs to it's full capacity.
To use the
near-cli-rs simply run the following in your terminal.
You should then see the following. Use the arrow keys and hit
enter or simply type out one of the available options to select an option
This option will allow you to manage, control, and retrieve information on your accounts.
|View properties for an account
|Import existing account (a.k.a. "sign in")
|Create a new account
|Delete an Account
|View a list of keys for an account
|Add an access key to an account
|Delete an access key from an account
This will allow you to manage your token assets such as NEAR, FTs and NFTs
|Transfers NEAR to a specified recipient in units of NEAR or yoctoNEAR
|Transfer Fungible Tokens to a specified user
|Transfers NFTs between accounts
|View the balance of NEAR tokens
|View the balance of Fungible Tokens
|View the balance of NFT Tokens
This option allows you to manage and interact with your smart contracts
|Add a new contract code
|View a transaction status
|Construct a new transaction
Manage the connection parameters inside the
config.toml file for
This will allow you to change or modify the network connections for your CLI.
|Show a list of network connections
|Add a network connection
|Delete a network Connection