Skip to main content

Frog-wizard-themed CLI to monitor Kaspa transactions and save receipts

Project description

Flubs Ompi, DAG Mage

Kasmage

๐Ÿธ Kasmage is a whimsical, lightweight frog-wizard themed CLI that monitors a Kaspa address for transactions. It can print all historical transactions or watch for new ones in real time.

Fun fact: Flubs Ompi, DAG Mage is the official name of the Kasmage frog.
Follow me on X @evofcl and DM me to suggest cool new epithets!
If you're a graphic designer, send me a .png of your frog design โ€” I might just feature it!

PyPI PyPI Downloads Python

โš ๏ธ Note on Testnet Support

As of October 2025, the Kaspa public API does not support testnet addresses.
Kasmage currently only works with mainnet (kaspa:...) transactions.

As soon as testnet support becomes available in the API, Kasmage will be updated to support it.

โœจ NEW!! โ€“ Version 0.5.0 Update

Kasmage keeps leveling up! Hereโ€™s whatโ€™s new in this release:

  • Verification (live) โ†’ use --verify <amount> (repeatable) to flag exact inbound payments.
    • Each amount is only verified once per occurrence (no spam).
    • Example: --verify 1 --verify 1 --verify 5.25
  • Threshold filtering (live) โ†’ --threshold <amount> only shows inbound transactions โ‰ฅ that KAS value.
    • Cannot be combined with --dir.
    • Plays an alert sound if --alert is enabled.
  • Direction filtering โ†’ use --dir in or --dir out in either live or historical mode.
  • Alert sounds โ†’ add --alert to play a WAV sound on threshold or verify hits.
  • Sender display โ†’ live logs now include a compact list of sender addresses.
  • Guardrails โ†’ historical mode now blocks live-only flags (like --receipts, --verify, --alert, etc.) to prevent invalid combos.

๐Ÿ‘‰ See the CHANGELOG for full details.

โš™๏ธ Quickstart (Install & Run)

Note: Already installed Kasmage? Run
pipx upgrade kasmage (or pip install --upgrade kasmage) to get the latest version. Requires Python 3.8+. Tested on 3.10โ€“3.13.

Option 1: Install with pipx (recommended)

pipx installs CLI apps into isolated environments and makes them available globally on your system.

(If you have pipx installed already, skip to step 2)

Step 1. First, install pipx:

# if you use homebrew, use:
brew install pipx
pipx ensurepath

# if you don't use homebrew, use:
python3 -m pip install --user pipx
python3 -m pipx ensurepath

# for Windows users (Powershell):
py -m pip install --user pipx
py -m pipx ensurepath

โš ๏ธ PATH warning: After installing pipx, you may need to restart your terminal or run exec zsh (or exec bash) to refresh your $PATH. If you see zsh: command not found: pipx or zsh: command not found: kasmage, it usually means ~/.local/bin (where pipx puts executables) isnโ€™t in your PATH. Running pipx ensurepath fixes this.

Step 2. Install Kasmage:

pipx install kasmage
kasmage --address kaspa:yourkaspaaddresshere

Option 2: Install with pip inside a venv

python -m venv ~/.venvs/kasmage
source ~/.venvs/kasmage/bin/activate
pip install kasmage
kasmage --address kaspa:yourkaspaaddresshere

Option 3: Run from source (for developers). Clone the repo, build the wheel, and install locally:

git clone https://github.com/yourname/kasmage.git
cd kasmage
poetry build
pip install --force-reinstall dist/kasmage-0.2.0-py3-none-any.whl

Now run (default live mode):

kasmage --address kaspa:yourkaspaaddresshere

Features

  • Live mode: watch one or more addresses and stream new transactions as they confirm.
  • Historical mode (updated!): print all confirmed transactions with your choice of format (table, ledger, JSONL).
  • Receipts: automatically save each detected transaction as a TXT or JSON receipt โ€” useful for bookkeeping, POS, or your own transaction records.
  • Verification (new!): flag exact inbound payments with --verify.
  • Threshold alerts (new!): filter inbound transactions by minimum amount (--threshold N).
  • Direction filter (new!): only show in or out transactions.
  • Alert sounds (new!): play an optional WAV chime for verify/threshold hits.
  • Sender display (new!): logs now show the originating addresses of each tx.
  • Timezone support: show times in UTC, a specific IANA timezone (e.g. America/Chicago), or your local system time.
  • Configurable folder naming: choose short or full subfolder names for receipts.
  • Compatible with Kaspa mainnet addresses (kaspa:...)

Usage

Watch new transactions (live mode with receipts)

kasmage --address kaspa:yourkaspaaddresshere kaspa:... --receipts #add as many addresses as you want!

Output example:

๐Ÿธ๐Ÿ”ฎ Peering into the orb... (Ctrl+C to stop)
โœจ๐Ÿ‘€ I scry with my amphibian eye a tx:  49.99990000 KAS | txid: b4a4a0993d7e040105261a6f850fb27a0487737d1bb457d789350545f86780aa | 2025-10-15 17:28:13 UTC
    โ†ณ from: kaspa:qz23v0..., kaspa:qqw81s...
๐Ÿ“œ Behold! Another slimy scroll of coinage joins the spellbook: receipts/kaspa_qpwhk9yja6/receipt_20251015_b4a4a0993d.txt
โœจ๐Ÿ‘€ I scry with my amphibian eye a tx: -50.00000000 KAS | txid: b4a4a0993d7e040105261a6f850fb27a0487737d1bb457d789350545f86780aa | 2025-10-15 17:28:13 UTC
๐Ÿ“œ Behold! Another slimy scroll of coinage joins the spellbook: receipts/kaspa_qz23v0vptc/receipt_20251015_b4a4a0993d.txt

Filter live mode by threshold and direction:

kasmage --address kaspa:yourkaspaaddresshere --threshold 10 --dir in

Verify inbound payments

kasmage --address kaspa:yourkaspaaddresshere --verify 1 --verify 5.25

Output example:

โœ… Payment verified: 1.00000000 KAS to kaspa:qpwhk9... | txid: 1234abcd...
    โ†ณ from: kaspa:qz23v0..., kaspa:qqw81s...

Print all past transactions

kasmage --address kaspa:yourkaspaaddresshere kaspa:... --historical --historical-tz local --historical-limit 5 --historical-newest-first --short-txid

Output example:

๐Ÿ“œ Peering into the enchanted pond, past ripples reveal kaspa:qpwhk9yja6n2l73enwl62s2u52c7u87mjkh4mwhyeueum660ght4735mlsas5โ€™s deeds...
Address: kaspa_qpwhk9yja6n2l73enwl62s2u52c7u87mjkh4mwhyeueum660ght4735mlsas5
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Time                    โ”‚ Amount (KAS) โ”‚ Dir โ”‚ TxID        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2025-10-15 12:28:13 CDT โ”‚     +49.9999 โ”‚ IN  โ”‚ b4a4a0โ€ฆ80aa โ”‚
โ”‚ 2025-10-15 12:26:11 CDT โ”‚     -50.0005 โ”‚ OUT โ”‚ 613fe2โ€ฆe043 โ”‚
โ”‚ 2025-10-14 13:25:20 CDT โ”‚     -10.0010 โ”‚ OUT โ”‚ 15d03dโ€ฆ4419 โ”‚
โ”‚ 2025-10-14 13:11:17 CDT โ”‚    -100.0010 โ”‚ OUT โ”‚ a5781bโ€ฆc44f โ”‚
โ”‚ 2025-10-14 12:57:52 CDT โ”‚      +9.9995 โ”‚ IN  โ”‚ 08d53fโ€ฆ7ffb โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
๐Ÿ“œ Conjuring arcane transactions for kaspa:qz23v0vptctqztwk39quaeuvdxq4qnpr0ax5s8a6ds47gzgzteapu3lnq5tqg...
Address: kaspa_qz23v0vptctqztwk39quaeuvdxq4qnpr0ax5s8a6ds47gzgzteapu3lnq5tqg
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Time                    โ”‚ Amount (KAS) โ”‚ Dir โ”‚ TxID        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2025-10-15 12:28:13 CDT โ”‚     -50.0000 โ”‚ OUT โ”‚ b4a4a0โ€ฆ80aa โ”‚
โ”‚ 2025-10-15 12:26:11 CDT โ”‚     +50.0000 โ”‚ IN  โ”‚ 613fe2โ€ฆe043 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Ledger-style (grep-friendly)

kasmage --address kaspa:yourkaspaaddresshere --historical --historical-style ledger

Output example:

๐Ÿ“œ Gazing back through the mists of time for kaspa:qpwhk9yja6n2l73enwl62s2u52c7u87mjkh4mwhyeueum660ght4735mlsas5...
Address: kaspa_qpwhk9yja6n2l73enwl62s2u52c7u87mjkh4mwhyeueum660ght4735mlsas5
[2025-07-17 20:55:35 UTC]  +197.0231 KAS  IN   tx=e6b7c3d1ed49453b4780d226b5f182a758e9f2eacde3789cdc75183b1f3c3e45
[2025-07-18 20:40:46 UTC]  -197.0231 KAS  OUT  tx=9ab95d12949435487a6aeebf741782ea3c1e5823c42887e20ff6751aff90be1f
[2025-10-10 22:50:57 UTC]  +200.1184 KAS  IN   tx=1a3ede08005d22fb225a64b1e1633f07f0647eac69c988804450d91240ffd44c
[2025-10-13 00:17:51 UTC]  -100.0005 KAS  OUT  tx=8d54b611e3ca8163ad7147a94ee278fde44703aec3ea4d51d951eb293e0a9896
[2025-10-13 01:36:18 UTC]   +99.9999 KAS  IN   tx=6c7a0b8473badb50eba9c612b4461420d1d62666c96429cd586f95a4ba8736ff

JSONL (machine-friendly)

kasmage --address kaspa:yourkaspaaddresshere --historical --historical-style jsonl

Output example:

๐Ÿ“œ The spellbook creaks openโ€ฆ what fortunes befell kaspa:qpwhk9yja6n2l73enwl62s2u52c7u87mjkh4mwhyeueum660ght4735mlsas5?
{"time_utc_iso":"2025-07-17T20:55:35.051000+00:00","time_local":"2025-07-17 20:55:35 UTC","amount_kas":197.02308234,"direction":"IN","txid":"e6b7c3d1ed49453b4780d226b5f182a758e9f2eacde3789cdc75183b1f3c3e45"}
{"time_utc_iso":"2025-07-18T20:40:46.247000+00:00","time_local":"2025-07-18 20:40:46 UTC","amount_kas":-197.02308234,"direction":"OUT","txid":"9ab95d12949435487a6aeebf741782ea3c1e5823c42887e20ff6751aff90be1f"}
{"time_utc_iso":"2025-10-10T22:50:57.321000+00:00","time_local":"2025-10-10 22:50:57 UTC","amount_kas":200.11837708,"direction":"IN","txid":"1a3ede08005d22fb225a64b1e1633f07f0647eac69c988804450d91240ffd44c"}
{"time_utc_iso":"2025-10-13T00:17:51.135000+00:00","time_local":"2025-10-13 00:17:51 UTC","amount_kas":-100.0005,"direction":"OUT","txid":"8d54b611e3ca8163ad7147a94ee278fde44703aec3ea4d51d951eb293e0a9896"}
{"time_utc_iso":"2025-10-13T01:36:18.832000+00:00","time_local":"2025-10-13 01:36:18 UTC","amount_kas":99.9999,"direction":"IN","txid":"6c7a0b8473badb50eba9c612b4461420d1d62666c96429cd586f95a4ba8736ff"}

Options

-h, โ€“help                   Show this message and exit
-V, โ€“version                Print version and exit

โ€“address ADDR [ADDR โ€ฆ]    Kaspa address(es) to monitor (required)
โ€“interval N                 Poll interval in seconds (default: 10).
Tip: use 1โ€“2 for near real-time, but heavier on API.
โ€“page-size N                Number of tx per API page (default: 50)

โ€“historical                 Print all confirmed tx and exit
โ€“historical-style           table | ledger | jsonl (default: table)
โ€“historical-border          unicode | ascii | none (default: unicode)
โ€“historical-tz              IANA tz like โ€œAmerica/Chicagoโ€, or โ€œlocalโ€ for system tz
โ€“historical-limit N         Limit number of rows
โ€“historical-newest-first    Show newest tx first
โ€“short-txid                 Show shortened txids in table/ledger
โ€“no-color                   Disable colored IN/OUT

โ€“receipts                   Write a receipt per new tx (live mode)
โ€“receipts-dir PATH          Root directory for receipts (default: ./receipts)
โ€“receipts-dir-style         short | full (default: short)
โ€“receipt-format             txt | json (default: txt)
โ€“min-amount N               Only write a receipt if amount >= this KAS

โ€“verify AMOUNT              Flag exact inbound payment(s) of this amount (repeatable, live mode only)
โ€“threshold N                Only show inbound tx if amount >= this KAS (live mode, cannot be combined with โ€“dir)
โ€“dir {in,out}               Only show transactions of this direction (works in live & historical modes)
โ€“alert                      Play a WAV sound on verify or threshold hits (live mode)

โ€“no-update-check            Skip checking PyPI for newer Kasmage versions

So why Kasmage?

You might be wondering: why use this when wallets and explorers already show transactions?

Thatโ€™s true, but Kasmage fills a different niche:

  • Automation & scripting: run it headless on a server or in a script to trigger actions whenever a transaction lands.
  • Instant awareness: instead of refreshing an explorer, Kasmage streams new transactions as they appear.
  • Receipts & audit trails: automatically save TXT/JSON receipts for bookkeeping, invoicing, or compliance.
  • Lightweight & headless: no heavy wallet UI or node install required; just a simple CLI tool.
  • Extensible: fork it, extend it, or integrate with other systems (e.g., Slack, Discord, payment apps).
  • Fun factor: transaction tracking feels less like work when Flubs Ompi, the DAG Mage is your companion ๐Ÿธ.

Wallets are for spending. Explorers are for confirming. Kasmage is for watching, logging, and building.

Contributing

I'm new to programming for the crypto space and this might not be anything game-changing but it's a fun little project to work on. If you have ideas for new features, please open a feature request (Issue). If youโ€™ve built something cool, feel free to fork the repo and submit a PR!

Please make sure to update tests as appropriate.

License

MIT ยฉ Ethan Villalobos

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kasmage-0.5.0.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kasmage-0.5.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file kasmage-0.5.0.tar.gz.

File metadata

  • Download URL: kasmage-0.5.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for kasmage-0.5.0.tar.gz
Algorithm Hash digest
SHA256 af12bf81233c6e429ee8daff6c47f81ea36b3d1460296773e168792b23b26f6c
MD5 88ad25de5188889e4b18a5b457f8bbbb
BLAKE2b-256 e00dddb7bb14aaf01475ffa4dbd14fd562b8a5eebaa85558d306a5cfcc6c69a4

See more details on using hashes here.

File details

Details for the file kasmage-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: kasmage-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for kasmage-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 614443eba8655484cc58dd5face2282d9d234f9ff7a7f1408187b41cf5aa0e00
MD5 d19003450db534601695c683d5c6ef60
BLAKE2b-256 bdf843b343a3f7166667316ea7afce55404ae39a9db058deec2bc2b883e05376

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page