Crates.io | brk_cli |
lib.rs | brk_cli |
version | 0.0.95 |
created_at | 2025-02-23 23:54:54.569524+00 |
updated_at | 2025-08-28 10:49:36.831963+00 |
description | A command line interface to run a BRK instance |
homepage | https://bitcoinresearchkit.org |
repository | https://github.com/bitcoinresearchkit/brk |
max_upload_size | |
id | 1566745 |
size | 158,190 |
Command line interface for running complete BRK instances
brk_cli
provides the main command-line interface for operating the Bitcoin Research Kit. It orchestrates the complete data pipeline from Bitcoin Core block parsing through analytics computation to HTTP API serving, with automatic configuration management and graceful operation.
~/.brk/config.toml
for consistent operation# Download from GitHub releases
# https://github.com/bitcoinresearchkit/brk/releases/latest
cargo install brk --locked
git clone https://github.com/bitcoinresearchkit/brk.git
cd brk && cargo build --release
# Basic setup with default options
brk --brkdir ./my_brk_data
# Full configuration
brk --bitcoindir ~/.bitcoin \
--brkdir ./brk_data \
--fetch true \
--exchanges true \
--website default
# Uses saved configuration from ~/.brk/config.toml
brk
# Override specific options
brk --website none --fetch false
brk --help
All options are automatically saved to ~/.brk/config.toml
:
--bitcoindir <PATH>
- Bitcoin Core directory (default: ~/.bitcoin
)--blocksdir <PATH>
- Block files directory (default: bitcoindir/blocks
)--brkdir <PATH>
- BRK output directory (default: ~/.brk
)--fetch <BOOL>
- Enable price data fetching (default: true
)--exchanges <BOOL>
- Use exchange APIs for prices (default: true
)--website <OPTION>
- Web interface mode:
none
- API only, no web interfacedefault
- Built-in web interface from websites/default/
custom
- Serve custom website from websites/custom/
--rpcconnect <IP>
- RPC host (default: localhost
)--rpcport <PORT>
- RPC port (default: 8332
)--rpccookiefile <PATH>
- Cookie authentication file--rpcuser <USERNAME>
- Username authentication--rpcpassword <PASSWORD>
- Password authentication~/.brk/config.toml
sudo apt install libssl-dev pkg-config
Example ~/.brk/config.toml
:
bitcoindir = "/Users/username/.bitcoin"
blocksdir = "/Users/username/.bitcoin/blocks"
brkdir = "/Users/username/brk_data"
fetch = true
exchanges = true
website = "default"
rpcconnect = "localhost"
rpcport = 8332
rpccookiefile = "/Users/username/.bitcoin/.cookie"
Logs are written to ~/.brk/brk.log
with colored console output:
brk_parser
- Bitcoin block parsingbrk_indexer
- Blockchain data indexingbrk_computer
- Analytics computationbrk_interface
- Data query interfacebrk_server
- HTTP API serverbrk_logger
- Logging utilitiesbitcoincore_rpc
- Bitcoin Core RPC clientcolor_eyre
- Enhanced error reportingThis README was generated by Claude Code