BTCli aims to be a dev-friendly, simple Bitcoin terminal explorer to easly check for address balance, transaction information, UTXOs and more. It actually supports Bitcoin Mainnet and Testnet, and different web explorer can be chosen to preset the terminal links.
BTCli is NOT a wallet!
See examples below.
BTCli aims to be a useful command line tool for quick checking Bitcoin blockchain address and transactions. BTCli is not a wallet, for a good wallet experience we recommend to use one of the following:
- Specter Wallet (Great MultiSig focused wallet that interacts directly with Bitcoin Core)
- Blue Wallet (User friendly and multisig capable Mobile wallet for Android and iOS)
To run BTCli in your local machine directly from this repository
git clone git@github.com:maxidev/btcli.git
nodejs/npm version 10+
npm i
Now you can just run:
node ./bin/btcli.js <command>
//This will bind btcli commandline to js entry point
sudo npm link
Then you can just run:
btcli <command>
First install dependencies by running
sudo npm install -g node-deb
sudo apt-get install jq
Then
npm run generate:deb
This will trigger script to generate btcli_0.0.1_all.deb for easily installation, on Debian/Ubuntu systems:
sudo dpkg -i btcli_0.0.1_all.deb
Alternatively pre-generated deb package can be found in our Github release page
To install directly from NPM:
npm install -g btcli
btcli help
Usage: btcli [options] [command]
BTCli - A simple command line Bitcoin explorer
Options:
-v, --version Output the current version
-e, --explorer <explorer>, Web Explorer to link (choices: "blockchair", "blockchain-info", "blockstream", "btc")
--tojson [filename] JSON Output
-V, --verbose Verbose output
-t, --testnet Set Bitcoin testnet network
-h, --help display help for command
Commands:
addr <address> Bitcoin Address to check legacy/bech32 supported
block <height> Bitcoin block information
tx <transaction> Bitcoin transaction
help [command] display help for command
btcli addr command usage
btcli tx command usage
Testnet btcli testnet option usage
JSON Format btcli tojson option usage
addr <address>
Bitcoin Address to check legacy P2PKH/P2SH/P2WPKH (SegWit Bech32) supported.block <height>
Bitcoin block information (under development)tx <transaction>
Bitcoin transaction.
--verbose
Output reloaded.--explorer <explorer>
Web explorer to link.--tojson <filename>
Output logs in json.--testnet
Set tesnet chain for querying servers
// Simple Bitcoin mainnet legacy address balance check
btcli addr 12pPx8Frg5wTQmprxBLoi8R3mdmFYjmCfv
// Transaction inspect with verbose option to output inputs/outputs info
btcli tx aafe3d76554df980482ec092630ba957dda6458c40178dab54fa44443706808c --verbose
// Inspect transaction changing the default web-explorer for output links
btcli tx aafe3d76554df980482ec092630ba957dda6458c40178dab54fa44443706808c -e blockstream
// Address balance check with verbose option to out scripts and changing default web explorer
btcli addr 12pPx8Frg5wTQmprxBLoi8R3mdmFYjmCfv --explorer blockchain-info
// Exporting the transaction inspect to my_tx JSON file.
btcli tx aafe3d76554df980482ec092630ba957dda6458c40178dab54fa44443706808c --tojson my_tx
// Inspecting testnet address with verbose output
btcli addr tb1qxp7yuclrt65cvawfnpvgg3u8p2nf8qhx7k9jzf --verbose --testnet
We have lots of ideas to convert BTCli into a swiss-army knife tool for devs and enthusiast alike. This is a side project and collaboration is much needed. Feel free to open some issue to propose a new feature.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Maxi Dev - @op_hash160
Agustin Fiorenza - @agufiorenza
Project Link: https://github.com/maxidev/btcli
This project heavily relies on ElectrumX public servers Consider running your own sever or donate to public server maintainers. We purposely left the ElectrumX Public Server connection banner on BTCli to support server owner.
Consider buying us a coffee if you find BTCli useful