Comment on page
Learn how to use the Ethernal CLI
The CLI serves two purposes:
- Synchronizing blocks & transactions with your dashboard
- Synchronizing contract's artifact data for Truffle projects
Install the CLI globally with the following command:
npm install -g ethernal
If you haven't done so already, this is the first thing to do after installing. Your email is stored in
~/.config/configstore/ethernal.email.json. Your password is stored in your local keychain. You only need to login once. If you need to log in with another account, you can just run the command again.
You can also skip the login command and use env variables:
To listen to transactions, the CLI will pull the server address of the latest used workspace. If you want to specify a different workspace you can use the
Or for a different workspace:
ethernal listen -w staging
If the passed workspace name is not found, it will default to the latest used.
When starting the CLI, it will automatically synchronize all blocks & transactions that are missing (if some happened when the CLI wasn't running for example).
The CLI will also watch by default your artifacts if you have run it in a Truffle project (there needs to be a truffle-config.js file in the directory).
If you are looking to set up a Truffle project:
If your chain is not running locally and you don't want to listen to transactions, but only synchronize artifacts, you can run
ethernal listen -l
And if you are on a remote server hosting the chain, and you don't want to watch for contracts, you can run:
ethernal listen -s
By default, only the name and the ABI of the contract are going to be uploaded. If you want to use the "Storage" tab of contracts page, you'll need to have the AST uploaded as well. To do so, pass the
--astUploadflag as a parameter (this will upload the ast field, as well as the source field).
ethernal listen --astUpload
This will delete all accounts/blocks/transactions/contracts from a specific workspace
ethernal reset [workspace]