Skip to main content

The Leo Command Line Interface

The Leo CLI is a command line interface tool that comes equipped with the Leo compiler.

tip

You can print the list of commands by running leo --help

Commands

  • account - Create a new Aleo account, sign and verify messages.
    • new - Generates a new Aleo account.
    • import - Derive and Aleo account from a private key.
    • sign - Sign a message using your Aleo private key.
    • verify - Verify a message and signature from an Aleo address.
  • add - Add a new onchain or local dependency to the current project.
  • build - Compile the current project.
  • clean - Clean the build and output artifacts.
  • debug - Run the interactive debugger in the current package.
  • deploy - Deploy a program to the Aleo network.
  • devnet - Initialize a local devnet.
  • execute - Execute a program and produce a transaction containing a proof.
  • new - Create a new Leo project in a new directory.
  • query - Query live data and state from the Aleo network.
    • block - Query block information.
    • transaction - Query transaction information.
    • program - Query program source code and live mapping values.
    • stateroot - Query the latest stateroot.
    • committee - Query the current committee.
    • mempool - Query transactions and transmissions from the memory pool.
    • peers - Query peer information.
  • remove - Remove a dependency from the current project.
  • run - Run a program without producing a proof.
  • test - Run the test cases for a Leo project.
  • update - Update to the latest version of Leo.
  • upgrade - Upgrade a deployed program on the Aleo network.

Universal Flags

These flags are available to use alongside all commands in the Leo CLI.

-h

--help

Prints available commands and flags.

-V

--version

Prints the currently installed version of Leo.

-q

Suppresses the CLI output.

-d

Prints out additional information for debugging if possible.

--path <PATH>

Specifies the path to Leo program root folder. Defaults to ./.

--home <HOME>

Specifies the path to the .aleo program registry. This is where programs downloaded from the network will be cached. Defaults to ~/.aleo/registry.