Setting Up Cleos Aliases for EOS

By Kurt Braget Uncategorized No Comments on Setting Up Cleos Aliases for EOS

For future cleos cowboys

We’ve already covered Getting Cleos Up and Running on EOS Mainnet with Mac


Now I want to show you how to alias cleos so you can quickly run cleos on testnet and mainnet without anything getting in your way.


Here are the commands and you are free to just copy mine. 
alias cleosm='cleos -u https://api.cypherglass.com'
alias cleost='cleos -u http://jungle2.cryptolions.io:80'
(Shoutout to Cypherglass, one of our favorite EOS Block Producers.)


Why cleosm? We add the “m” to the end to make it obvious we are running command on the EOS “mainnet”. 


The “t” in cleost is to show that the command would be run on the EOS “testnet”. 


Placing m and t at the end of the cleos command also allows us to easily tab complete our command before entering m and t for convenience. 


If you want these values to persist, on a Mac you would create (if it doesn’t already exist) a .bash_profile file in your home directory on mac ( cd ~ ).

Then place these two commands in that file, now they will always be present. You may need to run source .bash_profile after adding these commands in the .bash_profile to refresh your terminal and force it to recognize them.


Now let’s run a little test.
$ cleosm get account eosio

created: 2018-06-08T08:08:08.500privileged: truepermissions:     owner     1:    1 eosio.prods@active        active     1:    1 eosio.prods@activememory:     quota:     34.65 MiB    used:     32.23 MiBnet bandwidth:     delegated:       0.0000 EOS           (total staked delegated to account from others)     used:               unlimited     available:          unlimited     limit:              unlimitedcpu bandwidth:     delegated:     298.1200 EOS           (total staked delegated to account from others)     used:               unlimited     available:          unlimited     limit:              unlimitedEOS balances:     liquid:         1904.0171 EOS     staked:            0.0000 EOS     unstaking:         0.0000 EOS     total:          1904.0171 EOSproducers:     <not voted>
$ cleost get account eosiocreated: 2018-11-23T16:20:00.000privileged: truepermissions:     owner     1:    1 eosio.prods@active        active     1:    1 eosio.prods@activememory:     quota:        80 MiB    used:     59.66 MiBnet bandwidth:     delegated:       2.0002 EOS           (total staked delegated to account from others)     used:               unlimited     available:          unlimited     limit:              unlimitedcpu bandwidth:     delegated: 1000004.0000 EOS           (total staked delegated to account from others)     used:               unlimited     available:          unlimited     limit:              unlimitedEOS balances:     liquid:    5147908280.6219 EOS     staked:            0.0000 EOS     unstaking:         0.0000 EOS     total:     5147908280.6219 EOSproducers:     <not voted>
Boom, everything is working! Take some time to celebrate this small victory.

Email kurt@popstand.com if you have any questions 😀

  • Share:

Leave a comment