cleos create key [OPTIONS]


  • [OPTIONS] = See Options in Command Usage section below. You must choose one option of --file or --to-console

Note: The arguments and options enclosed in square brackets are optional.


Creates a new keypair and either prints the public and private keys to the screen or to a file.

Command Usage

The following information shows the different positionals and options you can use with the cleos create key command:


  • none


  • -h,--help - Print this help message and exit
  • --r1 - Generate a key using the R1 curve (iPhone), instead of the K1 curve (Bitcoin) -f,--file TEXT - Name of file to write private/public key output to. (Must be set, unless "--to-console" is passed --to-console - Print private/public keys to console.


  • Install the currently supported version of cleos.


    The cleos tool is bundled with the EOSIO software. Installing EOSIO will also install the cleos comand line tool and the keosd key store or wallet.


  1. Create a new key pair and output to the screen
cleos create key --to-console

Where --to-console = Tells the cleos create key command to print the private/public keys to the console.

Example Output

Private key: 5KDNWQvY2seBPVUz7MiiaEDGTwACfuXu78bwZu7w2UDM9A3u3Fs
Public key: EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC
  1. Create a new key pair and output to a file
cleos create key --file my_keys.txt 

Where --file keys.txt = Tells the cleos create key command to output the private/public keys to afile called my_keys.txt.

Example Output

saving keys to my_keys.txt
cat my_keys.txt

Example Output

Private key: 5KWcfnGao5K6WV65Zgjd1xvpugRUeKwb6oxzmwaS1tPE2Ef4qzo
Public key: EOS7oDiBtzSHtShprGFmXm9JLnwxhcPeDyhww3tXDvVATDYtciLGG