Created
August 16, 2019 22:10
-
-
Save pythonpete32/588ddfda3c11fae17bdc71b42737146d to your computer and use it in GitHub Desktop.
Aragon CLI setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: AragonCLI setup | |
date: 2019-08-16 | |
--- | |
Aragon CLI is a extremely powerful tool. If you are developing Aragon apps, administrating a DAO, or a power user the cli is an indispensable tool. there are many things you cant do through the front end application that require the use of the cli however, getting it set up the first time can be a bit of a pain | |
<br> | |
### 0. Operating system | |
I use Lubuntu but this should work on any Ubuntu/Debian setup. I haven't tested this on Mac but it should work too. If you're using windows :grimacing: this will probably work with Linux subsystem for windows but do your self a favour and just make the switch to Linux | |
<br> | |
### 1. Update your system | |
First things first, update and upgrade your system | |
```sh | |
sudo apt-get update && sudo apt-get upgrade | |
``` | |
<br> | |
### 2. Install global libraries | |
Install the dependencies some if which are not obvious from the inevitable error messages you will run into if you just try to `npm install @aragon/cli` | |
```sh | |
sudo apt install build-essential git python | |
``` | |
<br> | |
### 3. Install ssh (optional) | |
While not necessary, you will be spending a lot of time in the terminal so you might as well make it look sexy. Along with zsh we will be installing `oh-my-zsh`, other than a good looking terminal, it makes life much easier with auto-completion and a bunch of plugins. | |
If your using a cloud machine you will probably not have a password as you will be using ssh to connect. If that is the case set one first | |
```sh | |
sudo passwd [your user name] | |
``` | |
Then install zsh | |
```sh | |
sudo apt install zsh | |
``` | |
Now you can install the `oh my zsh` plugin | |
```sh | |
curl -Lo install.sh https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | |
sh install.sh | |
``` | |
It's worth exploring the plugins and themes on the [official repo](https://github.com/robbyrussell/oh-my-zsh/blob/master/README.md) but for now we can move | |
<br> | |
### 4. Install NVM | |
While you can just install node manually, NVM makes managing your node installation much easier. Further more you can have more than one version installed at the same time, which is handy as some packages are not always compatible with all node versions. I'm using `10.15.3` this works well with everything and is a LTS version. If you skipped the above step replace `zsh` with `bash` at the end of the command | |
```sh | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | zsh | |
``` | |
Open a new terminal window and install node | |
```sh | |
nvm install 10.15.3 | |
``` | |
<br> | |
### 5. Install Aragon CLI | |
```sh | |
npm i -g @aragon/cli | |
``` | |
Test your installation with `aragon --version` | |
<br> | |
### 6. Setting up cli | |
Finally we need to set up a private key for use with the cli. | |
Warning: | |
**DO NOT A KEY YOU HAVE REAL FUNDS IN** | |
Create a new key and get some test net sth from the [rinkeby faucet](https://faucet.rinkeby.io/) | |
Some times the `~/.aragon` file is not included in the installation which is a problem because that's where out private key goes. | |
```sh | |
cd ~/.aragon | |
``` | |
If you get `file not found` run the dev chain first `aragon devchain` and try again | |
Once your in the `~/.aragon` folder you need to crate a file that holds your private key. | |
have a separate key for rinkeby ETH, when interacting with your DAO on the main net, i highly advise using a hardware wallet and frame | |
Create a new the file for your rinkeby key | |
```sh | |
nano ~/.aragon/rinkeby_key.json | |
``` | |
This will open a blank file, copy and paste the following replacing the text with your private key | |
```js | |
{ | |
"rpc": "https://rinkeby.infura.io", | |
"keys": ["put-your-priv-key-here"] | |
} | |
``` | |
now test out your configuration by launching a DAO on rinkeby | |
```sh | |
dao new --environment aragon:rinkeby | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment