https://github.com/tintinweb/aragraph
**Repo Moved** Easily generate permission graphs for Aragon DAO Templates
https://github.com/tintinweb/aragraph
Last synced: over 1 year ago
JSON representation
**Repo Moved** Easily generate permission graphs for Aragon DAO Templates
- Host: GitHub
- URL: https://github.com/tintinweb/aragraph
- Owner: tintinweb
- Created: 2019-10-11T08:44:31.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T13:32:34.000Z (almost 7 years ago)
- Last Synced: 2025-04-28T18:13:21.322Z (over 1 year ago)
- Homepage: https://github.com/ConsenSys/aragraph
- Size: 1.95 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[
](https://diligence.consensys.net)
[[ 🌐 ](https://diligence.consensys.net) [ 📩 ](mailto:diligence@consensys.net) [ 🔥 ](https://consensys.github.io/diligence/)]
# ⚠️ REPOSITORY MOVED
**new location:** https://github.com/ConsenSys/aragraph
# aragraph
Generate permission relationship graphs from aragon template description files (`yaml`) or Markdown Tables specifications.
This script generates UML descriptions for aragon templates that can be rendered with [Plantuml](http://plantuml.com/).
**install**
`$ npm install -g aragraph`
**generate from yaml description**
`$ aragraph ./examples/company.yaml > dao.plantuml `
**generate from markdown**
`$ aragraph ./examples/aragon_company_README.md > dao.plantuml `
**Render**
`$ java -jar plantuml.jar dao.plantuml`
## Library
### from DAO description files (yaml)
https://github.com/aragon/dao-templates/tree/master/descriptor
Example: https://github.com/aragon/dao-templates/blob/cc1eb1174a13c6d5ed0fcc1bbcc9d21bf9137a84/descriptor/examples/company.yaml

```
const AragonPermissions = require("./AragonPermissions.js");
console.log(new AragonPermissions().fromYaml('./examples/company.yaml').uml())
```
### from markdown table
Example: https://github.com/aragon/dao-templates/blob/master/templates/company/README.md

```
const AragonPermissions = require("./AragonPermissions.js");
const input = `
| App | Permission | Grantee | Manager |
|-------------------|-----------------------|---------------|---------|
| Kernel | APP_MANAGER | Voting | Voting |
| ACL | CREATE_PERMISSIONS | Voting | Voting |
| EVMScriptRegistry | REGISTRY_MANAGER | Voting | Voting |
| EVMScriptRegistry | REGISTRY_ADD_EXECUTOR | Voting | Voting |
| Voting | CREATE_VOTES | Token Manager | Voting |
| Voting | MODIFY_QUORUM | Voting | Voting |
| Voting | MODIFY_SUPPORT | Voting | Voting |
| Agent or Vault | TRANSFER | Finance | Voting |
| Finance | CREATE_PAYMENTS | Voting | Voting |
| Finance | EXECUTE_PAYMENTS | Voting | Voting |
| Finance | MANAGE_PAYMENTS | Voting | Voting |
| Token Manager | MINT | Voting | Voting |
| Token Manager | BURN | Voting | Voting |
| Agent | RUN_SCRIPT | Voting | Voting |
| Agent | EXECUTE | Voting | Voting |
| Finance | CREATE_PAYMENTS | Payroll | Voting |
| Payroll | ADD_BONUS_ROLE | EOA or Voting | Voting |
| Payroll | ADD_EMPLOYEE_ROLE | EOA or Voting | Voting |
| Payroll | ADD_REIMBURSEMENT_ROLE | EOA or Voting | Voting |
| Payroll | TERMINATE_EMPLOYEE_ROLE | EOA or Voting | Voting |
| Payroll | SET_EMPLOYEE_SALARY_ROLE | EOA or voting | Voting |
| Payroll | MODIFY_PRICE_FEED_ROLE | Voting | Voting |
| Payroll | MODIFY_RATE_EXPIRY_ROLE | Voting | Voting |
| Payroll | MANAGE_ALLOWED_TOKENS_ROLE | Voting | Voting |
`;
console.log(new AragonPermissions().fromMarkdownTable(md).uml())
```