Installation
- npm
- Cargo
- Mac and Linux (binaries)
- Windows (binaries)
Configuration file
The directory with access keys and available connection networks are defined in the configuration file (near-cli/config.toml), which is located depending on the operating system in the following places:
- macOS:
$HOME/Library/Application Support(e.g./Users/Alice/Library/Application Support) - Linux:
$XDG_CONFIG_HOMEor$HOME/.config(e.g./home/alice/.config) - Windows:
{FOLDERID_RoamingAppData}(e.g.C:\Users\Alice\AppData\Roaming)
Localnet configuration values
When setting up a localnet connection withnear config add-connection, several optional fields can be configured. Most of them can be skipped or set to placeholder URLs — they are only used for specific commands and are not required for basic localnet usage.
A minimal localnet connection requires only
rpc_url. The other values are only needed when using the specific commands listed above.
Interactive mode
To use thenear-cli simply run the following in your terminal.
enter or simply type out one of the available options to select an option.

We provide examples only of the most used commands. Such commands may have two versions — a full one and a short one. If you want to explore all options provided by
near-cli, use the interactive mode described above.Account
This option will allow you to manage, control, and retrieve information on your accounts.Summary
view-account-summary - view properties for an account.
- Full
- Short
Import
import-account - import existing account (a.k.a. “sign in”).
- Full
- Short
Export
export-account - export existing account.
Create
create-account - create a new account.
- Full
- Short
Delete
delete-account - delete an account.
- Full
- Short
Keys
Showing, adding and removing account keys.List keys
list-keys - view a list of keys for an account.
- Full
- Short
Add key
add-key - add an access key to an account.
- Full
- Short
Delete key
delete-keys - delete an access key from an account.
- Full
- Short
Tokens
This will allow you to manage your token assets such as NEAR, FTs and NFTs.Send NEAR
send-near - transfers NEAR to a specified recipient in units of NEAR or yoctoNEAR.
- Full
- Short
Send FT
send-ft - transfer Fungible Tokens to a specified user.
Send NFT
send-nft - transfers NFTs between accounts.
View NEAR balance
view-near-balance - view the balance of NEAR tokens.
View FT balance
view-ft-balance - view the balance of Fungible Tokens.
View NFT balance
view-nft-assets - view the balance of NFT tokens.
Contract
This option allows you to manage and interact with your smart contracts.Call
call-function - execute function (contract method).
- Full
- Short
Deploy
deploy - add a new contract code.
- Full
- Short
Inspect
inspect - get a list of available function names.
- Full
- Short
Transaction
Operate transactions.View status
view-status - view a transaction status.
- Full
- Short
Config
Manage the connection parameters inside theconfig.toml file for near-cli.
This will allow you to change or modify the network connections for your CLI.
Show connections
show-connections - show a list of network connections.
Edit connection
edit-connection - edit a network connection.
We provide examples only of the most used commands. If you want to explore all options provided by
near-cli, use the interactive mode.Validators
You can use the following commands to interact with the blockchain and view validator stats. There are three reports used to monitor validator status:Validator extension
If you want to interact with NEAR Validators from command line, you can install the NEAR Validator CLI Extension:- npm
- Cargo
- Mac and Linux (binaries)
- Windows (binaries)