Frog-wizard-themed CLI to monitor Kaspa transactions and save receipts
Project description
|
|
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!
โ ๏ธ 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
--alertis enabled.
- Cannot be combined with
- Direction filtering โ use
--dir inor--dir outin either live or historical mode. - Alert sounds โ add
--alertto 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(orpip 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
inorouttransactions. - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af12bf81233c6e429ee8daff6c47f81ea36b3d1460296773e168792b23b26f6c
|
|
| MD5 |
88ad25de5188889e4b18a5b457f8bbbb
|
|
| BLAKE2b-256 |
e00dddb7bb14aaf01475ffa4dbd14fd562b8a5eebaa85558d306a5cfcc6c69a4
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
614443eba8655484cc58dd5face2282d9d234f9ff7a7f1408187b41cf5aa0e00
|
|
| MD5 |
d19003450db534601695c683d5c6ef60
|
|
| BLAKE2b-256 |
bdf843b343a3f7166667316ea7afce55404ae39a9db058deec2bc2b883e05376
|