Skip to content
/ btcli Public

BTCli aims to be a dev-friendly, simple Bitcoin terminal explorer to easly check for address balance, transaction information, UTXOs and more.

License

Notifications You must be signed in to change notification settings

maxidev/btcli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


BTCli - A Simple Bitcoin command-line explorer

Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

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.

Built With

Not a Wallet

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)

Getting Started

To run BTCli in your local machine directly from this repository

Clone the project

git clone git@github.com:maxidev/btcli.git

Install dependencies

nodejs/npm version 10+

npm i

Now you can just run:

node ./bin/btcli.js <command>

To bind the binary and use directly on the terminal

//This will bind btcli commandline to js entry point
sudo npm link

Then you can just run:

btcli <command>

To generate a .deb (Debian/Ubuntu) package

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

btcli_0.1.0.deb

To install directly from NPM:

Install as a global package

npm install -g btcli

Once installed, just run it from command line

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

Usage

btcli addr command usage

asciicast

btcli tx command usage

asciicast

Testnet btcli testnet option usage

asciicast

JSON Format btcli tojson option usage

asciicast

Commands

  • addr <address> Bitcoin Address to check legacy P2PKH/P2SH/P2WPKH (SegWit Bech32) supported.
  • block <height> Bitcoin block information (under development)
  • tx <transaction> Bitcoin transaction.

Options

  • --verbose Output reloaded.
  • --explorer <explorer> Web explorer to link.
  • --tojson <filename> Output logs in json.
  • --testnet Set tesnet chain for querying servers

Examples

// 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

Roadmap

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).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Maxi Dev - @op_hash160

Agustin Fiorenza - @agufiorenza

Project Link: https://github.com/maxidev/btcli

Acknowledgements

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.

Support us!

Consider buying us a coffee if you find BTCli useful

bc1qldcc5k2zaz4f4d79m07zgh9nc2gr7mf0nr0g8t

About

BTCli aims to be a dev-friendly, simple Bitcoin terminal explorer to easly check for address balance, transaction information, UTXOs and more.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published