BitlaForge v0.1.1 - Make it actually mine
BitlaForge v0.1.1 — Make it actually mine.
v0.1.0 shipped the Forge-style TUI skeleton with sidebar nav, three screens, the help modal, and a confirm dialog — but minerd integration was a stub: pressing M just flipped a state flag. v0.1.1 turns the skeleton into a working tool.
What v0.1.1 ships (4 per-group commits)
🔒 G1 — Config persistence
New config_manager.py (tomllib for read + tomli_w for write) saves pool / wallet / algorithm / threads to ~/.config/bitlaforge/config.toml. Values survive across launches; the Config screen loads them on __init__. Schema is intentionally flat so future cycles can add [ui] / [log] sections without breaking the miner section.
⚙ G2 — Real minerd subprocess
New miner_runner.py with a MinerRunner class:
- Spawns minerd via
asyncio.create_subprocess_execwith pooler-cpuminer-compatible args (-a algo,-o pool,-u wallet,-p x,-t threads). - Streams stdout (merged with stderr — cpuminer logs to both) line-by-line via a background
asyncio.Task. - Each line: forwarded to the Log screen's 5,000-line bounded buffer.
- Each parsed hashrate / accepted / rejected / thread update: pushed into
app.miner_statsand the Dashboard repaints with real numbers. - Stop is
SIGTERMwith a 3-second grace,SIGKILLfallback.
The Dashboard goes from placeholders to live state: pool host / port / wallet (with mid-ellipsis on long Bitcoin addresses) / algorithm / threads / hashrate (kh/s) / uptime (HH MM SS) / shares.
🛡 G3 — Runtime check + Dashboard banner + friendly guards
shutil.which("minerd") runs at launch and on every M press. When the binary is missing:
- The Dashboard shows a persistent red ⚠ minerd not detected banner with install hint at the top.
- Pressing M produces a friendly toast: "install one of: cpuminer / cpuminer-multi / cpuminer-opt from AUR (e.g.
yay -S cpuminer)" — instead of the raw "binary not found" error.
🛠 G4 — Setup screen (4th nav)
New screen at 4 — a permanent home for the install guidance:
- Status block — ✓ installed at
<path>or ✗ not installed. - About minerd — what it is and why it's AUR-only.
- AUR providers —
cpuminer(recommended, pooler's original),cpuminer-multi,cpuminer-opt— each with a copy-pasteableyay -Scommand. - Paths — config file + binary location.
- T action — runs
minerd --versionto verify the install actually works (5s timeout).
What did not ship in v0.1.1 (yet)
- AUR submission — still v0.1.3 per the roadmap. The Forge release machinery (
testing/+ Test Matrix + man page + PKGBUILD with hardened headless-mountcheck()) lands then. - Pool reachability probe, wallet format validation — v0.1.2.
- Persistent log archive across launches — v0.1.2.
Install (v0.1.1, from source)
sudo pacman -S python-textual python-rich python-tomli-w
git clone https://github.com/jetomev/bitlaforge.git
cd bitlaforge
python main.pyThen press 4 for the install guide on getting minerd itself (AUR-only), or just:
yay -S cpuminerVerified
Textual Pilot tests across all four groups: config persistence across two app instances; minerd parser correctness on real cpuminer-format lines; full runner lifecycle with a fake minerd shell script (start → stream → parse → stop); the friendly install-guidance toast triggered when minerd is missing; the Dashboard banner shown / hidden as minerd's PATH presence flips; Setup screen renders both states and the T action runs the binary with a 5s timeout.
Co-developed by Javier (@jetomev) and Claude (Anthropic). Fourth tool in the KognogOS Forge suite.