Skip to content
🔥 Awesome Command line tool to mange forge powered blockchain nodes
JavaScript Other
Branch: master
Clone or download
polunzh feat: adapt latest workshp (#328)
* remove checkin function from create chain

* feat: adapt latest workshop config

- modify WORKSHOP_CONFIG to FORGE_WORKSHOP_CONFIG
- add `hyjal.chain` workshop config
Latest commit fde8295 Nov 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update bug_report.md Oct 11, 2019
.makefiles bunch of updates (#315) Oct 30, 2019
bin fix publish script bug (#146) Aug 14, 2019
docs add chain:* sub command: create, list, remove (#145) Aug 13, 2019
src feat: adapt latest workshp (#328) Nov 10, 2019
tests
tools add forge ls:remote command (#204) Sep 4, 2019
.editorconfig chore: move forge-cli out of forge-sdk repo Jun 5, 2019
.eslintignore chore: move forge-cli out of forge-sdk repo Jun 5, 2019
.eslintrc.js fix: forge upgrade tx not display correctly (#143) Aug 12, 2019
.gitattributes chore: move forge-cli out of forge-sdk repo Jun 5, 2019
.gitignore feature: auto upgrade forge-cli if user confirm to upgrade (#177) Aug 23, 2019
.prettierrc chore: move forge-cli out of forge-sdk repo Jun 5, 2019
.travis.yml fix publish script bug (#146) Aug 14, 2019
CHANGELOG.md feat: adapt latest workshp (#328) Nov 10, 2019
CONTRIBUTION.md chore: move forge-cli out of forge-sdk repo Jun 5, 2019
LICENSE chore: move forge-cli out of forge-sdk repo Jun 5, 2019
Makefile chore: fix travis build Jun 5, 2019
README.md [skip travis] Update README Nov 7, 2019
jest.config.js chore: move forge-cli out of forge-sdk repo Jun 5, 2019
package.json
version
yarn.lock feat: modify create chain flow and check update (#325) Nov 8, 2019

README.md

forge-cli

Command line toolbox maintained by Arcblock that helps developers to work with Forge SDK

Table of Contents

Introduction

docs Build Status PRs Welcome Gitter

forge-cli is an awesome toolbox for developers to work with forge, and forge is an awesome framework for building decentralized applications. Out of the box forge-cli support following features:

  • Manage forge kernel release
  • Manage local forge node, join a remote forge powered network
  • Create wallets and accounts on blockchain
  • Read/subscribe accounts/blocks/transactions/assets on blockchain
  • Send transactions to the blockchain
  • Use forge components such as forge-web and dapps-workshop
  • Compile and deploy transaction protocol
  • Do stake to node/user/asset
  • Bootstrap dApps with starters from here

Requirements

  • Linux/Mac Command Line, windows is not support currently, iTerm is recommended.
  • Node.js: please install using nvm, v8+

QuickStart

asciicast

Install

npm install -g @arcblock/forge-cli
# OR
yarn global add @arcblock/forge-cli

Now forge command is available to all new shell sessions.

Usage

Run forge and get available options and subcommands.

❯ forge

██████╗ ██╗   ██╗     █████╗ ██████╗  ██████╗██████╗ ██╗      ██████╗  ██████╗██╗  ██╗
██╔══██╗╚██╗ ██╔╝    ██╔══██╗██╔══██╗██╔════╝██╔══██╗██║     ██╔═══██╗██╔════╝██║ ██╔╝
██████╔╝ ╚████╔╝     ███████║██████╔╝██║     ██████╔╝██║     ██║   ██║██║     █████╔╝ 
██╔══██╗  ╚██╔╝      ██╔══██║██╔══██╗██║     ██╔══██╗██║     ██║   ██║██║     ██╔═██╗ 
██████╔╝   ██║       ██║  ██║██║  ██║╚██████╗██████╔╝███████╗╚██████╔╝╚██████╗██║  ██╗
╚═════╝    ╚═╝       ╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝╚═════╝ ╚══════╝ ╚═════╝  ╚═════╝╚═╝  ╚═╝
                                                                                      
Usage: forge [options] [command]

Options:
  -V, --version                       output the version number
  -v, --verbose                       Output runtime info when execute subcommand, useful for debug
  -c, --chain-name <chainName>        Execute command use specific chain
  -i, --config-path <path>            Forge config used when starting forge node and initializing gRPC clients
  -r, --npm-registry <registry>       Specify a custom npm registry
  -y, --yes                           Assume that the answer to any confirmation question is yes
  -d, --defaults                      Run command using default values for all questions
  -m, --mirror <url>                  Mirror host used to download forge release
  -g, --socket-grpc <endpoint>        Socket gRPC endpoint to connect, with this you can use forge-cli with a remote node
  -h, --help                          output usage information

Commands:
  account <address>                   Get an account info by address
  asset <address>                     Get asset info by address
  block [options] [height]            Get the block info from the running node
  blocklet:init                       Init a blocklet project
  blocklet:use [options]              Download and install a blocklet
  chain:config [options] [action]     Read/write chain/node config
  chain:create [chainName]            Create a new chain instance
  chain:ls                            List all chains
  chain:remove <chainName>            Remove chain state and config
  chain:reset <chainName>             Reset chain state, but keeps the config
  config [options] [key] [value]      Config forge cli configs
  contract:activate [name|address]    Activate a contract by name or address
  contract:compile [sourceDir]        Compile a forge contract
  contract:create [options]           Create contract files
  contract:deactivate [name|address]  Deactivate a contract
  contract:deploy [itxPath]           Deploy a compiled contract to ABT Node
  contract:ls                         List contracts
  declare:node                        Declare the current node to be a validator candidate
  download [options] [version]        Download a forge release without activate it
  help [subcommand]                   Show help of a sub command
  install [options] [version]         Download and setup forge release on this machine
  join <endpoint>                     Join a network by providing a valid forge web graphql endpoint
  logs [type]                         Show logs for various forge components
  ls                                  List forge releases installed locally
  ls:remote                           List remote forge releases available for install
  prepare [options]                   Prepare node for deploying a multi-node chain
  ps                                  List running forge component processes
  remote [shellName]                  Connects to the running system via a remote shell
  simulator [action]                  Start/stop simulator and generate random traffic
  start [options] [<chainName>]       Start the forge and forge web deamon
  status [type]                       List info of the running chain/node
  stop [options] [<chainName>]        Stop the forge daemon and all related services
  swap [action] [version]             Start forge swap service
  tx [hash]                           Get a tx detail and display
  tx:ls                               List latest transactions
  upgrade [<chainName>]               Upgrade chain node to new version without reset
  use [version]                       Activate an already downloaded forge release
  version [<chainName>]               Output version for all forge components
  wallet:create                       Create a local wallet and dump its public/private key
  web [options] [action]              Start/stop the web interface of running forge chain/node
  workshop [action]                   Start/stop the dApps workshop

Examples:

  Please install a forge-release before running any other commands
  > forge install latest
  > forge install --mirror https://releases.arcblockio.cn

  Curious about how to use a subcommand?
  > forge help install
  

FAQ

Checkout FAQ.md

You can’t perform that action at this time.