A live CLI dashboard for Cardano on-chain treasury and governance activity, with an automated companion bot that posts structured updates to X (Twitter).
Run the included demo script directly with tsx (no demo script is defined in package.json, so don't use npm run demo):
npx tsx src/demo.tsExample output, based on a real cached epoch snapshot:
[DRY RUN] Would post:
📊 Epoch 635: Treasury 1.51B ADA | Reserves 6.33B ADA | 118,616 txs | Fees 43,282.92 ADA
Swap in the real templated text from
posts.tsif it differs. Also worth a quick screenshot of the live CLI dashboard itself (npm run dev) — thechalk+cli-table3formatted table is a stronger visual for this README than plain log lines, and takes the same effort to capture.
- Renders a live, color-formatted CLI dashboard of Cardano treasury and governance activity
- Polls Cardano on-chain data — treasury withdrawals, governance proposals, epoch-level activity — via the Blockfrost API
- Formats findings into four distinct post types, each constrained to X's 280-character limit
- Supports a dry-run mode for safe testing without posting live
- Built to operate within free-tier API constraints, with graceful fallbacks where paid-tier endpoints are required
Originally scoped as part of broader research into Cardano Hydra L2 for processing ADA microtransactions. After identifying hard blockers for that use case — node sync time, Hydra liveness constraints, X API cost, and regulatory exposure — the project was deliberately descoped to a focused on-chain monitoring and social bot. This repo is the actual shipped deliverable from that research.
- TypeScript / Node.js — run via
tsxin dev, compiled withtscfor production - Blockfrost API (on-chain Cardano data)
- X (Twitter) API v2
node-cronfor schedulingchalk+cli-table3for the CLI dashboard rendering
src/
├── index.ts # application entry point
├── scheduler.ts # polling / cron logic
├── posts.ts # post generation for the four post types
├── twitter.ts # X API posting logic + dry-run toggle
├── backfill.ts # historical epoch snapshot backfill
├── diagnose.ts # diagnostics / debug utilities
├── demo.ts # demo run script
├── blockfrost/ # on-chain Cardano data client
├── db/ # database access layer (treasury.db)
├── core/ # core treasury/governance processing logic
└── display/ # output/console formatting
- Clone the repo
npm install- Copy
.env.exampleto.envand fill in:BLOCKFROST_API_KEYTWITTER_API_KEY,TWITTER_API_SECRET,TWITTER_ACCESS_TOKEN,TWITTER_ACCESS_SECRETDRY_RUN=true(recommended for first run)
npm run devto run directly viatsx(recommended for trying it out)
For a production-style run: npm run build && npm run start (dist/ isn't tracked in the repo, so build has to run first).
- Free-tier Blockfrost accounts don't have access to the governance proposals endpoint. This is handled via an isolated try/catch so the rest of the bot keeps functioning without it.
- Live posting requires a funded X API credit balance on a dedicated bot account.
- Dedicated bot X account with funded credit balance for live posting
- Possible revisit of Hydra L2 integration for microtransaction-level treasury tracking
MIT



