├── .circleci └── config.yml ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github └── dependabot.yml ├── .gitignore ├── .mocharc.json ├── .nvmrc ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── bin ├── dev ├── dev.cmd ├── run └── run.cmd ├── config.yml ├── docs ├── cli.api.json ├── content │ ├── tutorial │ │ └── intro.mdx │ └── using the CLI │ │ └── commands.mdx ├── helpdata.json └── render.js ├── package.json ├── src ├── abis │ ├── erc20.json │ ├── exchange.json │ └── testusd.json ├── base.ts ├── commands │ ├── account │ │ ├── add.ts │ │ ├── address.ts │ │ ├── balance.ts │ │ ├── makeitrain.ts │ │ └── remove.ts │ ├── app │ │ ├── info.ts │ │ └── list.ts │ ├── file │ │ ├── list.ts │ │ ├── pull.ts │ │ └── push.ts │ └── job │ │ ├── accept.ts │ │ ├── complete.ts │ │ ├── info.ts │ │ ├── list.ts │ │ ├── refund.ts │ │ └── submit.ts ├── config.ts ├── constants.ts ├── hooks │ └── init │ │ ├── header.ts │ │ └── load-from-ens.ts ├── index.ts ├── lib │ ├── cliux.ts │ ├── ens.d.ts │ ├── ens.ts │ ├── error.js │ ├── estuary.ts │ ├── exchange │ │ ├── contracts.ts │ │ └── graph.ts │ ├── fs.ts │ ├── git │ │ ├── git.test.ts │ │ └── git.ts │ ├── it-stream.ts │ ├── job.ts │ └── wallet.ts └── scripts │ ├── check-ens.ts │ └── nock-record.ts ├── test ├── commands │ ├── app.test.ts │ ├── app │ │ └── list.test.ts │ ├── file.test.ts │ └── file │ │ ├── list.test.ts │ │ ├── pull.test.ts │ │ └── push.test.ts ├── helpers │ └── init.js ├── hooks │ └── init │ │ └── header.test.ts └── tsconfig.json └── tsconfig.json /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | orbs: 4 | release-management: salesforce/npm-release-management@4 5 | 6 | workflows: 7 | version: 2 8 | test-and-release: 9 | jobs: 10 | - release-management/test-package: 11 | matrix: 12 | parameters: 13 | os: 14 | - linux 15 | - windows 16 | node_version: 17 | - latest 18 | - lts 19 | - maintenance 20 | dependabot-automerge: 21 | triggers: 22 | - schedule: 23 | cron: '0 2,5,8,11 * * *' 24 | filters: 25 | branches: 26 | only: 27 | - main 28 | jobs: 29 | - release-management/dependabot-automerge 30 | 31 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /dist 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "oclif", 4 | "oclif-typescript" 5 | ], 6 | "indent": ["error", 2] 7 | } 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "npm" 4 | versioning-strategy: increase 5 | directory: "/" 6 | schedule: 7 | interval: "monthly" 8 | labels: 9 | - "dependencies" 10 | open-pull-requests-limit: 100 11 | pull-request-branch-name: 12 | separator: "-" 13 | ignore: 14 | - dependency-name: "fs-extra" 15 | - dependency-name: "*" 16 | update-types: ["version-update:semver-major"] 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *-debug.log 2 | *-error.log 3 | /.nyc_output 4 | /dist 5 | /lib 6 | /package-lock.json 7 | /tmp 8 | /yarn.lock 9 | node_modules 10 | oclif.manifest.json 11 | /docs/helpdata.json 12 | docs/.docz 13 | tsconfig.tsbuildinfo 14 | TODO.md 15 | -------------------------------------------------------------------------------- /.mocharc.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": [ 3 | "test/helpers/init.js", 4 | "ts-node/register" 5 | ], 6 | "watch-extensions": [ 7 | "ts" 8 | ], 9 | "recursive": true, 10 | "reporter": "spec", 11 | "timeout": 60000 12 | } 13 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v16.14.0 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "markdown.preview.breaks": true, 3 | "html.completion.attributeDefaultValue": "singlequotes" 4 | } 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Rik Smith-Unna and openlab-cli contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

@labdao/openlab-cli 👋

2 | 3 |
4 | 5 | ![](https://flat.badgen.net/badge/icon/LabDAO?c&scale=2&icon=https://raw.githubusercontent.com/labdao/assets/main/logo/labdao_logo.svg&label) 6 | 7 | ![https://www.npmjs.com/package/@labdao/openlab-cli](https://img.shields.io/npm/v/@labdao/openlab-cli.svg?style=for-the-badge) 8 | ![https://img.shields.io/badge/node-%3E%3D16.0.0-blue.svg?style=for-the-badge&logo=node](https://img.shields.io/badge/node-%3E%3D16.0.0-blue.svg?style=for-the-badge&logo=node) 9 | ![[cli.openlab.tools](http://cli.openlab.tools)](https://img.shields.io/badge/documentation-cli.openlab.tools-brightgreen.svg?style=for-the-badge) 10 | !["License: MIT"](https://img.shields.io/badge/license-MIT-purple.svg?style=for-the-badge) 11 | 12 | ![open issues](https://flat.badgen.net/github/open-issues/labdao/openlab-cli) 13 | ![closed issues](https://flat.badgen.net/github/closed-issues/labdao/openlab-cli) 14 | ![dependabot](https://flat.badgen.net/github/dependabot/labdao/openlab-cli) 15 | 16 | ![discord](https://flat.badgen.net/discord/members/labdao?icon=discord) 17 | ![badge game](https://10q9gnv1kv6b.runkit.sh) 18 |
19 | 20 | ## What is this? 21 | 22 | `openlab-cli` is a command-line tool for the OpenLab ecosystem. 23 | 24 | It allows you to: 25 | 26 | - manage files stored in the OpenLab IPFS network 27 | - discover and explore available bioinformatics apps 28 | - run apps by creating and managing jobs 29 | 30 | ## When shoud I use this? 31 | 32 | When you want to interact with OpenLab from the command-line. 33 | 34 | ## How do I use this? 35 | 36 | * [Install](#install) 37 | * [Commands](#commands) 38 | 39 | ## Install 40 | 41 | ```bash 42 | npm install -g @labdao/openlab-cli 43 | ``` 44 | 45 | ## Commands 46 | 47 | 48 | - [`openlab account add`](#openlab-account-add) 49 | - [`openlab account address`](#openlab-account-address) 50 | - [`openlab account balance [TOKENSYMBOL]`](#openlab-account-balance-tokensymbol) 51 | - [`openlab account makeitrain`](#openlab-account-makeitrain) 52 | - [`openlab account remove`](#openlab-account-remove) 53 | - [`openlab app info [APPNAME]`](#openlab-app-info-appname) 54 | - [`openlab app list [PROVIDER]`](#openlab-app-list-provider) 55 | - [`openlab file list [PATH]`](#openlab-file-list-path) 56 | - [`openlab file pull CID`](#openlab-file-pull-cid) 57 | - [`openlab file push PATH [REMOTEPATH]`](#openlab-file-push-path-remotepath) 58 | - [`openlab job accept JOBID`](#openlab-job-accept-jobid) 59 | - [`openlab job complete JOBID TOKENURI`](#openlab-job-complete-jobid-tokenuri) 60 | - [`openlab job info JOBID`](#openlab-job-info-jobid) 61 | - [`openlab job list`](#openlab-job-list) 62 | - [`openlab job refund JOBID`](#openlab-job-refund-jobid) 63 | - [`openlab job submit REQUEST`](#openlab-job-submit-request) 64 | 65 | ### `openlab account add` 66 | 67 | Add an account by creating or importing an ETH wallet 68 | 69 | ``` 70 | USAGE 71 | $ openlab account add 72 | 73 | DESCRIPTION 74 | Add an account by creating or importing an ETH wallet 75 | 76 | ALIASES 77 | $ openlab wallet add 78 | 79 | EXAMPLES 80 | $ openlab account add 81 | ``` 82 | 83 | ### `openlab account address` 84 | 85 | Get the address of your local ETH wallet 86 | 87 | ``` 88 | USAGE 89 | $ openlab account address 90 | 91 | DESCRIPTION 92 | Get the address of your local ETH wallet 93 | 94 | EXAMPLES 95 | $ openlab account address 96 | ``` 97 | 98 | ### `openlab account balance [TOKENSYMBOL]` 99 | 100 | Get the balance of your local ETH wallet 101 | 102 | ``` 103 | USAGE 104 | $ openlab account balance [TOKENSYMBOL] [-p ] 105 | 106 | ARGUMENTS 107 | TOKENSYMBOL [default: USD] symbol of the ERC20 token 108 | 109 | FLAGS 110 | -p, --password= Wallet password (if not supplied, will prompt for password) 111 | 112 | DESCRIPTION 113 | Get the balance of your local ETH wallet 114 | 115 | ALIASES 116 | $ openlab wallet balance 117 | 118 | EXAMPLES 119 | $ openlab account balance 120 | ``` 121 | 122 | ### `openlab account makeitrain` 123 | 124 | Mint test USD tokens to your local ETH wallet 125 | 126 | ``` 127 | USAGE 128 | $ openlab account makeitrain [-p ] 129 | 130 | FLAGS 131 | -p, --password= Wallet password (if not supplied, will prompt for password) 132 | 133 | DESCRIPTION 134 | Mint test USD tokens to your local ETH wallet 135 | 136 | EXAMPLES 137 | $ openlab account makeitrain 138 | ``` 139 | 140 | ### `openlab account remove` 141 | 142 | Remove your local ETH wallet 143 | 144 | ``` 145 | USAGE 146 | $ openlab account remove 147 | 148 | DESCRIPTION 149 | Remove your local ETH wallet 150 | 151 | ALIASES 152 | $ openlab wallet remove 153 | 154 | EXAMPLES 155 | $ openlab account remove 156 | ``` 157 | 158 | ### `openlab app info [APPNAME]` 159 | 160 | Get the details of an application on lab-exchange 161 | 162 | ``` 163 | USAGE 164 | $ openlab app info [APPNAME] [--columns | -x] [--sort ] [--filter ] [--output 165 | csv|json|yaml | | [--csv | --no-truncate]] [--no-header | ] 166 | 167 | ARGUMENTS 168 | APPNAME Application name 169 | 170 | FLAGS 171 | -x, --extended show extra columns 172 | --columns= only show provided columns (comma-separated) 173 | --csv output is csv format [alias: --output=csv] 174 | --filter= filter property by partial string matching, ex: name=foo 175 | --no-header hide table header from output 176 | --no-truncate do not truncate output to fit screen 177 | --output=