Introduction to the Celo Command Line Interface and installation instructions.
What is the Celo CLI
The Command Line Interface allows users to interact with the Celo Protocol smart contracts.
npm install -g @celo/celocli
We are currently deploying the CLI with only Node.js v18.14.2 support. If you are running a different version of Node.js, consider using NVM to manage your node versions. e.g. with:
nvm install 18.14.2 && nvm use 18.14.2
If you have trouble installing globally (i.e. with the
-g flag), try installing to a local directory instead with
npm install @celo/celocli and run with
The tool is broken down into modules and commands with the following pattern:
celocli <module>:<command> <...args> <...flags?>
celocli tool assumes that users are running a node which they have access to signing transactions on, or have another mechanism for signing transactions (such as a Ledger wallet or supplying the private key as an argument to the command). See the documentation on the config module for information about how to set which node commands are sent to.
All balances of CELO or Celo Dollars are expressed in units of 10^-18.
You can find the Celo CLI package on NPM here.
To see all available commands, run
To see all available flags for a command, add the flag
--globalHelp to the command.
Optional: Run a Full Node
Commands need to connect to a Celo node to execute most functionality. You can either use Forno (this is the easiest way) or run your own full node if you prefer. See the Running a Full Node instructions for more details on running a full node.
The easiest way to connect
celocli to the Celo network is by running the following command in your terminal with
celocli config:set --node=https://forno.celo.org
You can verify that
celocli is connected by running
If you are connecting to a remote node (like Forno), Celo CLI will need to sign transactions locally before sending them. To do this, Celo CLI needs access to a private key. There are a couple ways to sign transactions using Celo CLI.
Import Private Key (less secure)
--privateKey flag followed by the private key associated with the sending account. For example:
celocli transfer:celo --from <accountAddress> --to <addressOfChoice> --value <valueInCeloWei> --privateKey <privateKey> --node https://forno.celo.org
Or you can use a Ledger hardware wallet. (preferred, see below)
Using a Ledger Wallet
The Celo CLI supports using a Ledger hardware wallet to sign transactions. Just add the
--useLedger flag to a command that requires a signature.
You can specify the number of addresses to get for local signing with the
You can specify an array of index addresses for local signing. Example
celocli transfer:celo --to <addressOfChoice> --value 1000000 --from <accountAddress> --useLedger
Additional plugins can be installed which make the CLI experience smoother. Currently,
celocli only supports installing plugins published on NPM within the
Installing a 3rd party plugin can be dangerous! Please always be sure that you trust the plugin provider.
The autocomplete plugin adds an interactive autocomplete for
zsh shells. To enable the autocomplete plugin, follow the instructions provided at:
The update warning plugin notifies the user if they are using an oudated version of the CLI. This plugin is enabled by default.