@proton/cli
Proton CLI
Installation
Install CLI (NPM)
npm i -g @proton/cli
Install CLI (Yarn)
yarn global add @proton/cli
If you need to install NodeJS, have a look at INSTALL_NODE.md
If you get a missing write access error on Mac/Linux, first run:
sudo chown -R $USER /usr/local/lib/node_modules
sudo chown -R $USER /usr/local/bin
Usage
$ npm install -g @proton/cli
$ proton COMMAND
running command...
$ proton (--version)
@proton/cli/0.1.48 darwin-arm64 node-v16.14.0
$ proton --help [COMMAND]
USAGE
$ proton COMMAND
...
Commands
proton account ACCOUNT
Get Account Information
USAGE
$ proton account [ACCOUNT] [-r] [-t]
FLAGS
-r, --raw
-t, --tokens Show token balances
DESCRIPTION
Get Account Information
See code: src/commands/account/index.ts
proton account:create ACCOUNT
Create New Account
USAGE
$ proton account:create [ACCOUNT]
DESCRIPTION
Create New Account
See code: src/commands/account/create.ts
proton action CONTRACT [ACTION] [DATA] [AUTHORIZATION]
Execute Action
USAGE
$ proton action [CONTRACT] [ACTION] [DATA] [AUTHORIZATION]
ARGUMENTS
CONTRACT
ACTION
DATA
AUTHORIZATION Account to authorize with
DESCRIPTION
Execute Action
See code: src/commands/action/index.ts
proton block:get BLOCKNUMBER
Get Block
USAGE
$ proton block:get [BLOCKNUMBER]
DESCRIPTION
Get Block
See code: src/commands/block/get.ts
proton boilerplate [FOLDER]
Boilerplate a new Proton Project with contract, frontend and tests
USAGE
$ proton boilerplate [FOLDER] [-h]
FLAGS
-h, --help show CLI help
DESCRIPTION
Boilerplate a new Proton Project with contract, frontend and tests
See code: src/commands/boilerplate.ts
proton chain:get
Get Current Chain
USAGE
$ proton chain:get
DESCRIPTION
Get Current Chain
ALIASES
$ proton network
See code: src/commands/chain/get.ts
proton chain:info
Get Chain Info
USAGE
$ proton chain:info
DESCRIPTION
Get Chain Info
See code: src/commands/chain/info.ts
proton chain:list
All Networks
USAGE
$ proton chain:list
DESCRIPTION
All Networks
See code: src/commands/chain/list.ts
proton chain:set [CHAIN]
Set Chain
USAGE
$ proton chain:set [CHAIN]
ARGUMENTS
CHAIN Specific chain
DESCRIPTION
Set Chain
See code: src/commands/chain/set.ts
proton contract:abi ACCOUNT
Get Contract ABI
USAGE
$ proton contract:abi [ACCOUNT]
DESCRIPTION
Get Contract ABI
See code: src/commands/contract/abi.ts
proton contract:create CONTRACTNAME
USAGE
$ proton contract:create [CONTRACTNAME] [-c <value>] [-o <value>]
ARGUMENTS
CONTRACTNAME The name of the contract. 1-12 chars, only lowercase a-z and numbers 1-5 are possible
FLAGS
-c, --class=<value> The name of Typescript class for the contract
-o, --output=<value> The relative path to folder the the contract should be located. Current folder by default.
See code: src/commands/contract/create.ts
proton contract:deploy ACCOUNT DIRECTORY
Deploy Contract
USAGE
$ proton contract:deploy [ACCOUNT] [DIRECTORY] [-c] [-a] [-w]
FLAGS
-a, --abiOnly Only deploy ABI
-c, --clear Removes WASM + ABI from contract
-w, --wasmOnly Only deploy WASM
DESCRIPTION
Deploy Contract
See code: src/commands/contract/deploy.ts
proton faucet
List all faucets
USAGE
$ proton faucet
DESCRIPTION
List all faucets
See code: src/commands/faucet/index.ts
proton faucet:claim SYMBOL AUTHORIZATION
Claim faucet
USAGE
$ proton faucet:claim [SYMBOL] [AUTHORIZATION]
ARGUMENTS
SYMBOL
AUTHORIZATION Authorization like account1@active
DESCRIPTION
Claim faucet
See code: src/commands/faucet/claim.ts
proton help [COMMAND]
display help for proton
USAGE
$ proton help [COMMAND] [--all]
ARGUMENTS
COMMAND command to show help for
FLAGS
--all see all commands in CLI
DESCRIPTION
display help for proton
See code: @oclif/plugin-help
proton key:add [PRIVATEKEY]
Add Key
USAGE
$ proton key:add [PRIVATEKEY]
DESCRIPTION
Add Key
See code: src/commands/key/add.ts
proton key:generate
Generate Key
USAGE
$ proton key:generate
DESCRIPTION
Generate Key
See code: src/commands/key/generate.ts
proton key:get PUBLICKEY
Find private key for public key
USAGE
$ proton key:get [PUBLICKEY]
DESCRIPTION
Find private key for public key
See code: src/commands/key/get.ts
proton key:list
List All Key
USAGE
$ proton key:list
DESCRIPTION
List All Key
See code: src/commands/key/list.ts
proton key:lock
Lock Keys with password
USAGE
$ proton key:lock
DESCRIPTION
Lock Keys with password
See code: src/commands/key/lock.ts
proton key:remove [PRIVATEKEY]
Remove Key
USAGE
$ proton key:remove [PRIVATEKEY]
DESCRIPTION
Remove Key
See code: src/commands/key/remove.ts
proton key:reset
Reset password (Caution: deletes all private keys stored)
USAGE
$ proton key:reset
DESCRIPTION
Reset password (Caution: deletes all private keys stored)
See code: src/commands/key/reset.ts
proton key:unlock [PASSWORD]
Unlock all keys (Caution: Your keys will be stored in plaintext on disk)
USAGE
$ proton key:unlock [PASSWORD]
DESCRIPTION
Unlock all keys (Caution: Your keys will be stored in plaintext on disk)
See code: src/commands/key/unlock.ts
proton multisig:contract DIRECTORY
Multisig Contract
USAGE
$ proton multisig:contract [DIRECTORY]
DESCRIPTION
Multisig Contract
See code: src/commands/multisig/contract.ts
proton network
Get Current Chain
USAGE
$ proton network
DESCRIPTION
Get Current Chain
ALIASES
$ proton network
proton permission ACCOUNT
Add Key
USAGE
$ proton permission [ACCOUNT]
ARGUMENTS
ACCOUNT Account to modify
DESCRIPTION
Add Key
See code: src/commands/permission/index.ts
proton permission:link ACCOUNT PERMISSION CONTRACT [ACTION]
Link Auth
USAGE
$ proton permission:link [ACCOUNT] [PERMISSION] [CONTRACT] [ACTION] [-p <value>]
FLAGS
-p, --permission=<value> Permission to sign with (e.g. account@active)
DESCRIPTION
Link Auth
See code: src/commands/permission/link.ts
proton permission:unlink ACCOUNT CONTRACT [ACTION]
Unlink Auth
USAGE
$ proton permission:unlink [ACCOUNT] [CONTRACT] [ACTION] [-p <value>]
FLAGS
-p, --permission=<value>
DESCRIPTION
Unlink Auth
See code: src/commands/permission/unlink.ts
proton psr URI
Create Session
USAGE
$ proton psr [URI]
DESCRIPTION
Create Session
See code: src/commands/psr/index.ts
proton ram
List Ram price
USAGE
$ proton ram
DESCRIPTION
List Ram price
See code: src/commands/ram/index.ts
proton ram:buy BUYER RECEIVER BYTES
Claim faucet
USAGE
$ proton ram:buy [BUYER] [RECEIVER] [BYTES] [-p <value>]
ARGUMENTS
BUYER Account paying for RAM
RECEIVER Account receiving RAM
BYTES Bytes of RAM to purchase
FLAGS
-p, --authorization=<value> Use a specific authorization other than buyer@active
DESCRIPTION
Claim faucet
See code: src/commands/ram/buy.ts
proton table CONTRACT [TABLE] [SCOPE]
Get Table Storage Rows
USAGE
$ proton table [CONTRACT] [TABLE] [SCOPE] [-l <value>] [-u <value>] [-k <value>] [-r] [-p] [-c <value>]
[-i <value>]
FLAGS
-c, --limit=<value> [default: 100]
-i, --indexPosition=<value> [default: 1]
-k, --keyType=<value>
-l, --lowerBound=<value>
-p, --showPayer
-r, --reverse
-u, --upperBound=<value>
DESCRIPTION
Get Table Storage Rows
See code: src/commands/table/index.ts
proton transaction JSON
Execute Transaction
USAGE
$ proton transaction [JSON]
DESCRIPTION
Execute Transaction
See code: src/commands/transaction/index.ts
proton transaction:get ID
Get Transaction by Transaction ID
USAGE
$ proton transaction:get [ID]
DESCRIPTION
Get Transaction by Transaction ID
See code: src/commands/transaction/get.ts
proton version
Version of CLI
USAGE
$ proton version
DESCRIPTION
Version of CLI
See code: src/commands/version.ts