Skip to content
This repository was archived by the owner on Jul 15, 2020. It is now read-only.

Latest commit

 

History

History
38 lines (23 loc) · 1.48 KB

011_cli.md

File metadata and controls

38 lines (23 loc) · 1.48 KB

Command Line Interface

Latest documentation has been moved to https://docs.cardano.org/en/latest/ .

In previous tutorials, we have always worked with command cardano-node, but when we built the software from source as described here, we actually installed other executables as well, including the command line interface cardano-cli.

This command line interface provides a collection of tools for key generation, transaction construction, certificate creation and other important tasks.

It is organized in a hierarchy of subcommands, and each level comes with its own built-in documentation of command syntax and options.

We can get the top level help by simply typing the command without arguments:

    cardano-cli

We will be told that one available subcommand is shelley, and typing

    cardano-cli shelley

will display available sub-subcommands, one of which is node. We can continue drilling down the hierarchy:

    cardano-cli shelley node

and learn about the sub-sub-subcommand key-gen. Typing

    cardano-cli shelley node key-gen

will inform us about the parameters this command takes, so we can for example generate a key-pair of offline keys and a file for the issue counter by typing

    cardano-cli shelley node key-gen \
        --cold-verification-key-file cold.vkey \
        --cold-signing-key-file cold.skey \
        --operational-certificate-issue-counter-file cold.counter

cardano-cli command hierarchy