0.2.11 • Published 8 months ago

@dapplets/cli v0.2.11

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Dapplets CLI

Toolkit for deploying dapplet modules in registries.

Installation

Install Globally

npm install -g @dapplets/cli

Install Locally

npm install --save-dev @dapplets/cli

Usage

Usage: dapplets [options] [command]

Dapplets CLI utility.

Options:
  -V, --version                   output the version number
  -k, --eth-private-key <key>     Ethereum private key (env: ETH_PRIVATE_KEY)
  -r, --target-registry <url>     Target registry (env: TARGET_REGISTRY)
  -i, --ipfs-gateway-url <url>    Ipfs gateway URL (env: IPFS_GATEWAY_URL)
  -I, --ipfs                      save module to IPFS
  -b, --module-branch             Module branch to deploy
  -h, --help                      display help for command

Commands:
  deploy [options] [module-name]  Deploy module: FEATURE, CONFIG, and INTERFACE.
  help [command]                  display help for command
Usage: dapplets deploy [options] [module-name]

Deploy module: FEATURE, CONFIG, and INTERFACE.

Arguments:
  module-name                 Module name to deploy

Options:
  -d, --dev-server-url <url>  Developer server URL (env: DEV_SERVER_URL)
  -n, --module-name [name]    The name of the module to be deployed (env: MODULE_NAME)
  -h, --help                  display help for command

Examples

Run module (dapplet, adapter or virtual adapter) from a project root directory containing a manifest.json file.

The following global parameters can be filled using environment variables:

ParameterEnvironment Variable
-k, --eth-private-key <key>ETH_PRIVATE_KEY
-r, --target-registry <url>TARGET_REGISTRY
-i, --ipfs-gateway-url <url>IPFS_GATEWAY_URL
-d, --dev-server-url <url>DEV_SERVER_URL
-n, --module-name [name]MODULE_NAME

Example of Windows command line:

$ set ETH_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000000 && set TARGET_REGISTRY=test.v3.registry.dapplet-base.eth && set IPFS_GATEWAY_URL=https://ipfs-gateway.mooo.com && set DEV_SERVER_URL=https://localhost:3000/dapplet.json && dapplets deploy test-dapplet --ipfs

When the variables have already been set:

$ dapplets deploy <MODULE_NAME> --ipfs

If you prefer to set MODULE_NAME environment variable:

$ dapplets deploy -I

CI/CD

You can use concurrently or similar tool to run the module and deploy it with a single npm script in the package.json:

"scripts": {
    "cd": "concurrently -c \"yellow,green\" -n \"dapplet,cli\" \"npm start\" \"npx @dapplets/cli@latest deploy -I\" -ks \"command-cli\""
  },

Use it in your CI/CD. The examples of GitHub Actions workflows:

0.2.11

8 months ago

0.2.10

8 months ago

0.2.1

8 months ago

0.2.0

8 months ago

0.2.7

8 months ago

0.2.6

8 months ago

0.2.9

8 months ago

0.2.8

8 months ago

0.2.3

8 months ago

0.2.2

8 months ago

0.2.5

8 months ago

0.2.4

8 months ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago