CLI commands

Help

btcinu help displays all the commands and topics you can use with the Bitcoin Inu CLI. To get additional info about a specific command or a specific topic, type btcinu [topic/command] help.

E.g. for a topic:

btcinu accounts help

E.g. for a command:

btcinu btcinu accounts:pay help

Node

start

Starts the full node

btcinu start

To start a full node with a different port and a different data directory

btcinu start --port=9034 --datadir=~/.btcinu2/

stop

Stops the full node

btcinu stop

status

Prints out:

  • the status of your node (started / stopped)
  • the syncing status of your node and syncing stats
  • the networking status of your node (and networking stats)
btcinu status

To see live updates:

btcinu status -f

reset

Deletes your chain and wallet state. This will permanently delete your accounts, so back them up first if necessary.

btcinu reset

Config

config:show

Prints out the content of your config file

btcinu config:show

config:edit

Opens the config file with your default code editor

btcinu config:edit

Note: you need to set the editor config or the default editor environment variable for this command to work. E.g. for Vscode at the config level: btcinu config:set editor "/Applications/Visual Studio Code.app/Contents/MacOS/Electron" E.g. for Vscode at the environment level: export EDITOR="/Applications/Visual Studio Code.app/Contents/MacOS/Electron"

config:set

Sets the config value for the key.

E.g.

config:set enableMiningDirector "true"

Note: the list of configuration options is available here

config:get

Displays the configuration value for your node

E.g.

config:get enableMiningDirector

Miners

miners:start

Starts a miner and subscribe to new blocks for the node. The node has to be synced with the network for the miner to start mining.

btcinu miners:start

Join a mining pool.

btcinu miners:start -p <ip-address-of-pool> -a <your-public-address>

miners:pool:start

Starts a mining pool with the name set in the poolName configuration option.

btcinu miners:pool:start

Start a pool with disabled payouts.

btcinu miners:pool:start --no-payouts

miners:mined

List mined block hashes

btcinu miners:mined [START] [STOP]

Networking

peers:list

Displays the list of peers connected to the node.

btcinu peers:list

Displays the list of peers with live update.

btcinu peers:list -f

peers:show

Displays info about a peer

btcinu peers:show [IDENTITY]

Accounts / Wallet

accounts:create

Creating a new account with interactive mode

btcinu accounts:create

Creating a new account in command line

btcinu accounts:create MyNewAccount

accounts:publickey

Gets the current account's public key

btcinu accounts:publickey

Gets a specific account's public key

btcinu accounts:publickey -a MyNewAccount

accounts:balance

Gets the current account's balance

btcinu accounts:balance

Gets a specific account's public key

btcinu accounts:balance -a MyNewAccount

accounts:pay

Creating a new transaction with interactive mode

btcinu accounts:pay

Creating a new transaction in command line

btcinu accounts:pay -a 2 -t 997c5...c52ed

Faucet

faucet

Connects to the Bitcoin Inu faucet to get test funds

btcinu faucet

Chain

chain:export

Export a part of the chain database to JSON

btcinu chain:export [START] [STOP]

chain:forks

Try to detect forks that are being mined

btcinu chain:forks

chain:repair

Rebuild the main chain to fix corruption

btcinu chain:repair

chain:show

Shows the heaviest head and tail of the node's chain. Includes the last ten blocks in the chain.

btcinu chain:show

Blocks

blocks:show

Show the block header of a requested hash

btcinu blocks:show [HASH]

Workers

workers:status

Shows the status of the worker pool

btcinu workers:status