-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update aragonCLI documentation #99
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
c00a91a
New docs structure in aragonCLI && new Guides section
0xGabi e7e5002
Sanity check tutorial && some links update
0xGabi 6e3f923
Fix typos and update link to new tutorial
0xGabi 3671ea1
Add create-aragon-app && remove aragon init (deprecated)
0xGabi e222cbe
Update arrap.json, environments and fix links
0xGabi 471d792
New dao act, dao token and global options sections
0xGabi fe4d4a2
Improve different sections, new content for dao token and dao act
0xGabi fa5e8e1
Add apm grant content, start convertion to .md of existing guides
0xGabi 8c18384
Apply suggestions from code review
kernelwhisperer 1a33024
Update Luke's guide to fit documentation
0xGabi f832359
New FAQ section, update intro and getting started
0xGabi e587894
Update publish guide
0xGabi ca8e72f
Update sidebar
0xGabi d1eb37c
Add content to ipfs and publish sections
0xGabi b1a7760
Update code blocks to have shell format
0xGabi 94b8b50
Fix: json block format
0xGabi d0ed1b5
Remove links to use-frame guide
0xGabi d7e2310
Update en.json
kernelwhisperer 80f8958
Fix arapp docs reference
kernelwhisperer ada282f
Merge branch 'master' into update-aragoncli
kernelwhisperer 4069a7c
Merge branch 'update-aragoncli' of https://github.com/0xGabi/hack int…
kernelwhisperer fc2bbd9
Apply suggestions from code review
kernelwhisperer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
id: cli-apm-commands | ||
title: aragonPM commands | ||
sidebar_label: aragonPM commands | ||
--- | ||
|
||
The `aragon apm` commands are the easiest way to manage aragonPM repositories. | ||
|
||
## aragon apm versions | ||
|
||
The `aragon apm versions` command shows all the previously published versions of your package (defined in `arapp.json`). | ||
|
||
```sh | ||
aragon apm versions | ||
``` | ||
|
||
## aragon apm grant | ||
|
||
Grant an address or a group of addresses the permission to create new versions in your package (defined in `arapp.json`), by interacting directly with the ACL, without performing transaction pathing. | ||
|
||
```sh | ||
aragon apm grant [addr1 ... addrN] | ||
``` | ||
|
||
- `addresses`: The addresses being granted the permission to publish to the repo. | ||
|
||
## aragon apm publish | ||
|
||
The `aragon apm publish` command publishes a new version to the aragonPM repo. | ||
|
||
```sh | ||
aragon apm publish <bump> [contract] | ||
``` | ||
|
||
- `bump`: Type of bump (major, minor or patch) or version number. | ||
- `contract`: (optional) The address or name of the contract to publish in this version. If it isn't provided, it will default to the contract specified in the `arapp.json` file. | ||
|
||
> **Note**<br> | ||
> Changes to the contract can only be published with a major version bump. Minor and patch versions are only for frontend changes. | ||
|
||
If a minor or patch version is being published then the command can be run with the `--only-content` flag which will skip compiling the contracts. | ||
|
||
You can target a particular directory to publish, using `--files`. We always publish apps with: | ||
|
||
```sh | ||
aragon apm publish <version> --environment <environment> --files app/build | ||
``` | ||
|
||
The command has the following parameters: | ||
|
||
- `--only-content`: For minor and patch upgrades; whether to skip contract compilation, deployment and contract artifact generation. | ||
- `--only-artifacts`: Whether just generate artifacts file without publishing. | ||
- `--provider`: The provider where the files of the package will be published to. Defaults to `ipfs`. | ||
- `--files`: The path to the files that will be published. Defaults to the current directory. | ||
- `--ignore`: A gitignore pattern of files to ignore. Specify multiple times to add multiple patterns. Defaults to just the `node_modules` directory. | ||
- `--publish-dir`: The path to the directory where all the files and generated artifacts will be copied to before publishing. If it is not specified, it will create a temporary directory. | ||
- `--build`: A flag to specify whether the webapp should be built while publishing, running the script specified in `--build-script`. Defaults to `true`. | ||
- `--build-script`: The name of the NPM script in your app that will be used for building the webapp. | ||
- `--http`: The URI for the HTTP server that will be serving your app files (e.g. localhost:1234). See [instructions on running from HTTP](#running-your-app-from-a-development-http-server) for more information. | ||
- `--http-served-from`: Path to the directory that the HTTP server exposes (e.g. ./dist). Some artifacts are generated and placed in this directory during the publishing process of your app. | ||
- `--ipfs-check`: Whether to have start IPFS if not started. Defaults to `true`. | ||
- `--reuse`: Whether to reuse the previous version contract and skip deployment on non-major versions. Defaults to `false`. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
--- | ||
id: cli-dao-commands | ||
title: DAO commands | ||
sidebar_label: DAO commands | ||
--- | ||
|
||
The `aragon dao` commands can be used for interacting with your DAO directly from the command line. These commands are also available directly using the `dao` alias. | ||
|
||
|
||
## dao new | ||
|
||
Uses a DAO Kit to create a new DAO and prints its address. | ||
|
||
```sh | ||
dao new | ||
``` | ||
|
||
Options: | ||
- `--kit`: The aragonPM repo name of the kit that is used to create the DAO. Defaults to `bare-kit.aragonpm.eth`. | ||
- `--kit-version [version-number|latest]`: The version of the repo that will be used to create the DAO. Defaults to `latest`. | ||
- `--fn`: The function on the kit that is called to create a new DAO. Defaults to the `newBareInstance` function for `bare-kit.aragonpm.eth`. | ||
- `--fn-args`: The arguments that the function to create the kit is called with. Defaults to an array of arguments. | ||
- `--deploy-event`: The name of the event that is emitted when the DAO is created. The DAO address must be a return argument in the event log named `dao`. Defaults to `DeployInstance`. | ||
- `--ipfs-check`: Whether to have start IPFS if not started. Defaults to `true`. | ||
|
||
|
||
## dao apps | ||
|
||
Used to inspect all the installed apps in a DAO. | ||
|
||
```sh | ||
dao apps <dao-addr> | ||
``` | ||
|
||
- `dao-addr`: The main address of the DAO (Kernel). | ||
|
||
Options: | ||
- `--all`: To include apps without permissions in the report. | ||
|
||
## dao install | ||
|
||
The `dao install` command installs an instance of an app in the DAO. | ||
|
||
```sh | ||
dao install <dao-addr> <app-apm-repo> [repo-version] | ||
``` | ||
|
||
- `dao-addr`: The main address of the DAO (Kernel). | ||
- `app-apm-repo`: The repo name of the app being installed (e.g. `voting` or `voting.aragonpm.eth`). | ||
- `repo-version`: (optional) Version of the repo that will be installed; can be a version number or `latest` for the newest published version. Defaults to `latest`. | ||
|
||
In [aragonOS](/docs/aragonos-ref.html#app-installation) an app is considered to be installed in a DAO if it uses the DAO Kernel as its Kernel and there are references to the app in the ACL of the DAO. | ||
|
||
The `dao install` command will create an instance of the app and assign permissions to the main account to perform all the protected actions in the app. | ||
|
||
Options: | ||
- `--app-init`: Name of the function that will be called to initialize an app. If you want to skip app initialization (which is not generally recommended), you can do it by set it to `none`. By default it will initialize the app using `initialize` function. | ||
- `--app-init-args`: Arguments for calling the app init function. | ||
- `--set-permissions`: Whether to set permissions in the app. Set it to `open` to allow `ANY_ENTITY` on all roles. | ||
|
||
> **Note**<br> | ||
> All app instances of the same app in a DAO must run the same version, so installing an app with a version will effectively upgrade all app instances to this version. | ||
|
||
## dao upgrade | ||
|
||
The `dao upgrade` command upgrades all instances of an app to a newer version. | ||
|
||
```sh | ||
dao upgrade <dao-addr> <app-apm-repo> [repo-version] | ||
``` | ||
|
||
- `dao-addr`: The main address of the DAO (Kernel). | ||
- `app-apm-repo`: The repo name of the app being upgraded (e.g. `voting` or `voting.aragonpm.eth`). | ||
- `repo-version`: Version of the repo that the app will be upgraded to; can be a version number or `latest` for the newest published version (defaults to `latest`). | ||
|
||
aragonOS protects against having different instances of a particular app running with different versions (e.g. all the Voting app instances run the same version). Performing a `dao upgrade` will upgrade all instances of the app to the version specified. | ||
|
||
|
||
## dao exec | ||
|
||
Performs transactions in your DAO directly from aragonCLI. It supports [transaction pathing](forwarding-intro.md) so if your account cannot perform the action directly it will try to find how to do it (e.g. creating a vote). | ||
|
||
```sh | ||
dao exec <dao-addr> <app-proxy-addr> <method> [argument1 ... argumentN] | ||
``` | ||
|
||
- `dao-addr`: The main address of the DAO (Kernel). | ||
- `app-proxy-addr`: The address of the app where the action is being performed. You can find the proxy address by checking [`dao apps`](#dao-apps). | ||
- `method`: Name of the method being executed in the app (e.g. `withdrawTokens`). | ||
- `arguments`: The arguments that the method will be executed with (each separated by a space). | ||
|
||
|
||
## dao act | ||
|
||
Provides some syntax sugar over `dao exec` for executing actions using [Agent app](https://blog.aragon.one/aragon-agent-beta-release/) instances in a DAO. | ||
|
||
```sh | ||
dao act <agent-proxy> <target-addr> <method> [argument1 ... argumentN] | ||
``` | ||
|
||
- `agent-proxy`: Address of the Agent app proxy. | ||
- `target-addr`: Address where the action is being executed. | ||
- `method`: Name of the method being executed in the app (e.g. `transfer`). | ||
- `arguments`: The arguments that the method will be executed with (each separated by a space). | ||
|
||
|
||
## dao token | ||
|
||
Commands used to create and interact with the tokens your DAO will use. | ||
|
||
### dao token new | ||
|
||
Create a new [MiniMe](https://github.com/Giveth/minime) token. | ||
|
||
```sh | ||
dao token new <token-name> <symbol> [decimal-units] [transfer-enabled] | ||
``` | ||
- `token-name`: Full name of the new Token. | ||
- `symbol`: Symbol of the new Token. | ||
- `decimal-units`: Total decimal units the new token will use. Defaults to `18`. | ||
- `transfer-enabled`: Whether the new token will have transfers enabled. Defaults to `true`. | ||
|
||
|
||
### dao token change-controller | ||
|
||
Change the controller of a MiniMe token. | ||
|
||
```sh | ||
dao token change-controller <token-addr> <new-controller-addr> | ||
``` | ||
|
||
- `token-addr`: Address of the token. | ||
- `new-controller-addr`: Address of the new controller. | ||
|
||
## dao acl | ||
|
||
Used to inspect the ACL state in a DAO to check its permissions. | ||
|
||
```sh | ||
dao acl <dao-addr> | ||
``` | ||
- `dao-addr`: The main address of the DAO (Kernel). | ||
|
||
|
||
### dao acl create | ||
|
||
Used to create a permission in the ACL. Can only be used if the permission hasn't been created before. The `manager` of the permission can use `dao acl grant` and `dao acl revoke` to manage the permission. | ||
|
||
```sh | ||
dao acl create <dao-addr> <app-proxy-addr> <role> <entity> <manager> | ||
``` | ||
|
||
- `dao-addr`: The main address of the DAO (Kernel). | ||
- `app-proxy-addr`: The address of the app whose permissions are being managed. You can find the proxy address by checking [`dao apps`](#dao-apps). | ||
- `role`: The identifier for the role. Can be the `bytes32` identifier of the role or its name (e.g. `INCREMENT_ROLE`). | ||
- `entity`: The address of the entity that is being granted the permission by creating it. | ||
- `manager`: The address of the entity that will be able to grant that permission or revoke it. | ||
|
||
|
||
### dao acl grant | ||
|
||
Used to grant a permission in the ACL. | ||
|
||
```sh | ||
dao acl grant <dao-addr> <app-proxy-addr> <role> <entity> | ||
``` | ||
|
||
- `dao-addr`: The main address of the DAO (Kernel). | ||
- `app-proxy-addr`: The address of the app whose permissions are being managed. You can find the proxy address by checking [`dao apps`](#dao-apps). | ||
- `role`: The identifier for the role. Can be the `bytes32` identifier of the role or its name (e.g. `INCREMENT_ROLE`). | ||
- `entity`: The address of entity that is being granted the permission. | ||
|
||
|
||
### dao acl revoke | ||
|
||
Used to revoke a permission in the ACL. | ||
|
||
```sh | ||
dao acl revoke <dao-addr> <app-proxy-addr> <role> <entity> | ||
``` | ||
|
||
- `dao-addr`: The main address of the DAO (Kernel). | ||
- `app-proxy-addr`: The address of the app whose permissions are being managed. You can find the proxy address by checking [`dao apps`](#dao-apps). | ||
- `role`: The identifier for the role. Can be the `bytes32` identifier of the role or its name (e.g. `INCREMENT_ROLE`). | ||
- `entity`: The address of entity that is being revoked the permission. | ||
|
||
|
||
### dao acl set-manager | ||
|
||
Used to change the manager of a permission in the ACL. | ||
|
||
```sh | ||
dao acl set-manager <dao-addr> <app-proxy-addr> <role> <manager> | ||
``` | ||
|
||
- `dao-addr`: The main address of the DAO (Kernel). | ||
- `app-proxy-addr`: The address of the app whose permissions are being managed. You can find the proxy address by checking [`dao apps`](#dao-apps). | ||
- `role`: The identifier for the role. Can be the `bytes32` identifier of the role or its name (e.g. `INCREMENT_ROLE`). | ||
- `manager`: The new manager for the permission. | ||
|
||
|
||
### dao acl remove-manager | ||
|
||
Used to remove the manager of a permission in the ACL. The permission can be created again after removing its manager. | ||
|
||
```sh | ||
dao acl remove-manager <dao-addr> <app-proxy-addr> <role> | ||
``` | ||
|
||
- `dao-addr`: The main address of the DAO (Kernel). | ||
- `app-proxy-addr`: The address of the app whose permissions are being managed. You can find the proxy address by checking [`dao apps`](#dao-apps). | ||
- `role`: The identifier for the role. Can be the `bytes32` identifier of the role or its name (e.g. `INCREMENT_ROLE`). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
id: cli-global-confg | ||
title: Global configuration | ||
sidebar_label: Global configuration | ||
--- | ||
|
||
## The arapp.json file | ||
|
||
The arapp.json file contains metadata for your app. This are the fields need to be present: | ||
|
||
- `roles`: An array of all the roles that your app has. Each role has the following properties: | ||
- `id`: The identifier of the role as it is defined in the contract. | ||
- `name`: A description of the role in the app. | ||
- `params`: The names of any parameters for the role. | ||
- `environments`: An object containing deploy environment configurations. | ||
- `env_name`: An object containing the configuration for a specific environment. `env_name` can be any name you choose. | ||
- `appName`: The ENS name of your app where the aragonPM repo can be located. | ||
- `network`: The network to use for this environment. | ||
- `wsRPC`: (optional) If present is used by aragon.js as its data provider. | ||
- `registry`: (optional) The address of the ENS registry for this environment. Defaults to the default ENS registry for this network. | ||
- `path`: The path to the main contract in your app. | ||
|
||
### Example | ||
|
||
This is the arapp.json of the app build in the [tutorial](tutorial.md) configure with rinkeby and mainnet environments. | ||
|
||
```json | ||
{ | ||
"roles": [ | ||
{ | ||
"id": "INCREMENT_ROLE", | ||
"name": "Increment the counter", | ||
"params": [] | ||
}, | ||
{ | ||
"id": "DECREMENT_ROLE", | ||
"name": "Decrement the counter", | ||
"params": [] | ||
} | ||
], | ||
"environments": { | ||
"default": { | ||
"appName": "foo.aragonpm.eth", | ||
"network": "development" | ||
}, | ||
"aragon:rinkeby": { | ||
"registry": "0x98df287b6c145399aaa709692c8d308357bc085d", | ||
"wsRPC": "wss://rinkeby.eth.aragon.network/ws", | ||
"network": "rinkeby" | ||
}, | ||
"aragon:mainnet": { | ||
"registry": "0x314159265dd8dbb310642f98f50c066173c1259b", | ||
"wsRPC": "wss://mainnet.eth.aragon.network/ws", | ||
"network": "mainnet" | ||
} | ||
}, | ||
"path": "contracts/CounterApp.sol" | ||
} | ||
``` | ||
|
||
### How to use environments | ||
|
||
If you want to learn how use environments in practice check the guides to learn [how to publish in diferent environments](guides-publish.md). | ||
|
||
|
||
## The manifest.json file | ||
|
||
The manifest.json defines end-user specific configurations: | ||
|
||
- `name`: Human-readable name of your app. | ||
- `description`: Small description of the app. | ||
- `icons`: (optional) An array of all the icons that your app has. Each icon has the following properties: | ||
- `src`: Path to the icon's image. | ||
- `sizes`: Size of the icon. | ||
- `script`: (optional) Background script path. | ||
- `start_url`: Path to the starting URL. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bpierre We will likely want to update this soon.