Living Document Notice
Published 2026-09-17. The evolving architecture, revisions, and connected notes for this dispatch live in the Stax Digital Garden.

Sub-Millisecond Balance Queries via CLI stdio JSON-RPC

Sub-Millisecond Balance Queries via CLI stdio JSON-RPC: Dual-trace Phosphor P1 high-persistence green and P4 paper white vector CRT macro showing sub-millisecond JSON-RPC balance query sweeps, CLI memory buffers, and balance sheet vector displays

Checking current balances before executing a transaction should be instantaneous. Launching heavy accounting applications or querying web dashboards interrupts operational focus. Quartermaster provides a lightweight background daemon that exposes financial ledger balances over local stdio JSON-RPC.

The JSON-RPC Stdio Interface

The Quartermaster daemon monitors ledger files using OS filesystem events (inotify/kqueue). When a query arrives over stdin, the daemon responds immediately from in-memory balance caches:

{"jsonrpc": "2.0", "id": 1, "method": "getBalance", "params": {"account": "Assets:Checking:FirstTech"}}

Response payload:

{"jsonrpc": "2.0", "id": 1, "result": {"account": "Assets:Checking:FirstTech", "balance": 4812.45, "currency": "USD"}}

The entire query cycle finishes in under 1.2 milliseconds.

Shell Integration and Prompt Status

Because queries execute in sub-millisecond timeframes, operators can embed live budget horizons directly into terminal shell prompts or status bars:

# Fast balance retrieval in shell
$ qtm bal "Assets:Checking"
$4,812.45 USD (1.1 ms)

The operator maintains continuous situational awareness of operational cash reserves without manual ledger lookups.


  • Directus Target: quartermaster
  • Garden Source Reference: MOC - Personal Finance, Ledgers & Tax Manifests, MOC - Bosun PKM Tools
  • Garden Source Reference: [QTM-1007 - Sub-Millisecond Balance Queries via CLI stdio JSON-RPC](QTM-1007 - Sub-Millisecond Balance Queries via CLI stdio JSON-RPC)