{"id":15288311,"url":"https://github.com/rishkwal/bitbrew","last_synced_at":"2025-04-13T06:32:06.451Z","repository":{"id":248911860,"uuid":"820904813","full_name":"rishkwal/bitbrew","owner":"rishkwal","description":"Bitbrew is a simple CLI tool to help you create and manage private Bitcoin test networks. It is designed to be easy to use and to provide a simple interface to the Bitcoin Core RPC API.","archived":false,"fork":false,"pushed_at":"2024-08-06T05:16:52.000Z","size":1203,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T08:13:33.789Z","etag":null,"topics":["bitcoin","cli","containers","testing"],"latest_commit_sha":null,"homepage":"https://docs.bitbrew.host","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rishkwal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-27T12:11:52.000Z","updated_at":"2025-02-04T14:03:54.000Z","dependencies_parsed_at":"2024-08-06T07:38:16.789Z","dependency_job_id":null,"html_url":"https://github.com/rishkwal/bitbrew","commit_stats":null,"previous_names":["rishkwal/bitbrew"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishkwal%2Fbitbrew","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishkwal%2Fbitbrew/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishkwal%2Fbitbrew/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishkwal%2Fbitbrew/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rishkwal","download_url":"https://codeload.github.com/rishkwal/bitbrew/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674659,"owners_count":21143760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","cli","containers","testing"],"created_at":"2024-09-30T15:46:41.010Z","updated_at":"2025-04-13T06:32:06.057Z","avatar_url":"https://github.com/rishkwal.png","language":"TypeScript","readme":"# BitBrew\n\n\u003e [!WARNING]\n\u003e This app is still in alpha phase of development.\n\n\u003cp align=center\u003e\n  \u003cimage src=\"https://github.com/user-attachments/assets/08a57f5a-099a-48c5-b37b-6c27ecc7350b\" width=250/\u003e\n\u003c/p\u003e\n    \nBitbrew is a simple CLI tool to help you create and manage private Bitcoin test networks. It is designed to be easy to use and to provide a simple interface to the Bitcoin Core RPC API. It leverages the regtest mode of Bitcoin Core to create a private network that can be used for testing, development and teaching purposes.\n\n\u003cp align=center\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/599829ef-1807-4dda-817e-d08fd95cbbeb\" height=500/\u003e\n\u003c/p\u003e\n\n## Prerequisites\n\n### Docker\n\nBitBrew uses Docker to create and manage the nodes. Make sure that Docker is installed on your system and added to the path. You can download Docker from [here](https://www.docker.com/products/docker-desktop).\n\n### Node.js\n\nMake sure that Node.js is installed on your system. You can download Node.js from [here](https://nodejs.org/en/download/).\n\n**Note**: Node.js version 18 or higher is recommended.\n\n## Installation\n\n```bash\n$ npm install -g bitbrew\n```\n\nCheck if the installation was successful by running:\n\n```bash\n$ bitbrew --version\n```\n\n## Usage\n\n**Windows**: Run PowerShell as an administrator.\n\n**Linux**: Run the following command to run the CLI as a superuser.\n\n```bash\nsudo su\n```\n\nThen you can find the list of available commands by running:\n\n```plaintext\n$ bitbrew --help\n```\n\n```plaintext\n______ _ _  ______\n| ___ (_) | | ___ \\\n| |_/ /_| |_| |_/ /_ __ _____      __\n| ___ \\ | __| ___ \\ '__/ _ \\ \\ /\\ / /\n| |_/ / | |_| |_/ / | |  __/\\ V  V /\n\\____/|_|\\__\\____/|_|  \\___| \\_/\\_/\n\n\nUsage: bitbrew [options] [command]\n\nBitBrew: Craft your own Bitcoin test networks with ease\n\nOptions:\n  -V, --version                                     output the version number\n  -h, --help                                        display help for command\n\nCommands:\n  brew [options]                                    Brew your own Bitcoin test network\n  connect [options] [source-node] [target-node...]  Connect nodes in the Bitcoin network\n  ls                                                List your network nodes\n  start [options] [node...]                         Start nodes in the Bitcoin network\n  stop [options] [node...]                          Stop your Bitcoin test network\n  add \u003cname\u003e                                        Add a new node to your Bitcoin test network\n  clean                                             Clean up your Bitcoin test network\n  remove \u003cnode\u003e                                     Remove nodes from your Bitcoin test network\n  exec \u003cnode\u003e \u003ccommand\u003e                             Execute a command\n  attach \u003cnode\u003e                                     Attach to a running node\n  wallet                                            Manage wallets\n  send \u003cfrom\u003e \u003cto\u003e \u003camount\u003e                         Transfer funds between wallets\n  mine \u003cwallet\u003e [number]                            Mine a new block\n  ```\n\n## Quick Start\n\nStart by brewing your network:\n\n```bash\n$ bitbrew brew\n```\n\nThis will create and start two nodes `node0` and `node1`.\n\n### List the nodes\n\nYou can list the nodes by running:\n\n```bash\n$ bitbrew ls\n```\n\n```bash\n┌─────────┬─────────┬───────────┬───────┬──────────┐\n│ (index) │  name   │  status   │ port  │ RPC port │\n├─────────┼─────────┼───────────┼───────┼──────────┤\n│    0    │ 'node0' │ 'running' │ 20443 │  21443   │\n│    1    │ 'node1' │ 'running' │ 20444 │  21444   │\n└─────────┴─────────┴───────────┴───────┴──────────┘\n```\n\n### Connect the nodes\n\nYou can connect the nodes by running:\n\n```bash\n$ bitbrew connect node0 node1\n```\n\nThis will create an outbound connection from `node0` to `node1`.\n\n### Create a wallet\n\nYou can then create a wallet using the following command:\n\n```bash\n$ bitbrew wallet create alice node0\n```\n\nThis will create a wallet named `alice` associated with `node0`.\nWe will create another wallet named `bob` associated with `node1`.\n\n```bash\n$ bitbrew wallet create bob node1\n```\n### List the wallets\n\nYou can list all the wallets by running:\n\n```bash\n$ bitbrew wallet ls\n```\n\n```bash\n┌─────────┬─────────┬─────────┐\n│ (index) │  name   │  node   │\n├─────────┼─────────┼─────────┤\n│    0    │ 'alice' │ 'node0' │\n│    1    │  'bob'  │ 'node1' │\n└─────────┴─────────┴─────────┘\n```\n\n### Mine blocks\n\nYou can mine blocks using the following command:\n\n```bash\n$ bitbrew mine alice 101\n```\nThis will mine 101 blocks and send the rewards to the `alice` wallet.\n\n### Send funds\n\nYou can send funds from one wallet to another using the following command:\n\n```bash\n$ bitbrew send alice bob 10\n```\n\nThis will send 10 BTC from the `alice` wallet to the `bob` wallet.\n\n### Check the balance\n\nYou can check the balance of a wallet using the following command:\n\n```bash\n$ bitbrew wallet balance alice\n```\n```yml\nmine:\n  trusted:           39.99999859\n  untrusted_pending: 0\n  immature:          5000\nlastprocessedblock:\n  hash:   5a730482a236de6f38adbd594af1bf8aa919c720d7ca964367c2fe13ae7c5bee\n  height: 101\n```\n\nCongratulations! You have successfully created a Bitcoin test network, connected the nodes, created wallets, mined blocks, and sent funds between wallets.\n\n## Advanced Usage\n\n### Attach to a node\n\nYou can attach to a running node using the following command:\n\n```bash\n$ bitbrew attach node0\n```\n\nThis will allow you to interact with the node's machine directly. You can use the `bitcoin-cli` command to interact with the node.\n\nEnter `exit` to exit the node's machine.\n\n### Execute a command\n\nOptionally, you can execute a `bitcoin-cli` command on a node using the following command:\n\n```bash\n$ bitbrew exec node0 getblockchaininfo\n```\n\n```yml\nchain:                regtest\nblocks:               101\nheaders:              101\nbestblockhash:        5a730482a236de6f38adbd594af1bf8aa919c720d7ca964367c2fe13ae7c5bee\ndifficulty:           4.656542373906925e-10\ntime:                 1721195807\nmediantime:           1721195806\nverificationprogress: 1\ninitialblockdownload: false\nchainwork:            00000000000000000000000000000000000000000000000000000000000000cc\nsize_on_disk:         30375\npruned:               false\nwarnings:\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishkwal%2Fbitbrew","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishkwal%2Fbitbrew","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishkwal%2Fbitbrew/lists"}