diff --git a/README.md b/README.md index e429413a..efadf79c 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ And then execute: $ bundle install -Or if you just want to use it in a console: +If you just want to use it in a console: ``` git clone https://github.com/nervosnetwork/ckb-sdk-ruby.git @@ -44,6 +44,18 @@ bundle install bundle exec bin/console ``` +It is also possible to install this gem into system: + +``` +bundle exec rake install +``` + +Now you should be able to run a console using the command: + +``` +ckb-console +``` + ## Usage RPC interface returns parsed `JSON` object diff --git a/exe/ckb-console b/exe/ckb-console new file mode 100755 index 00000000..eb06dc47 --- /dev/null +++ b/exe/ckb-console @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby + +require "ckb" + +begin + require "pry" + Pry.start +rescue LoadError + require "irb" + IRB.start +end