pi-currencies
v1.0.0
Published
Show AI cost in your local currencies — extends the pi footer with real‑time exchange rates from frankfurter.dev
Maintainers
Readme
pi-currency
Show your AI costs in local currencies — right in the pi footer.
Replaces the built-in pi footer with one that appends real‑time currency conversions after the USD cost using exchange rates from frankfurter.dev (European Central Bank data).
Before:
~/project (main)
↑25k ↓13k R1.8M CH99.6% $0.029 4.7%/128k (auto)After:
~/project (main)
↑25k ↓13k R1.8M CH99.6% $0.029 MYR0.13 CNY0.21 EUR0.026 4.7%/128k (auto)Install
pi install npm:pi-currenciesOr try it without installing:
pi -e npm:pi-currenciesConfiguration
By default the extension shows no currencies — you add what you want.
Use /currency-add CODE at runtime, or set PI_CURRENCY_LIST to pre‑configure
a comma‑separated list of ISO 4217 codes:
PI_CURRENCY_LIST=MYR,CNY,THB,IDR,INR piCommands
| Command | Description |
|---|---|
| /currency-refresh | Force‑refresh exchange rates from frankfurter.dev |
| /currency-list | Show the configured currency list and current rates |
| /currency-add | Interactive picker — search & select currencies to add |
| /currency-remove | Interactive picker — select active currencies to remove |
How it works
- On startup, the extension fetches live rates from
https://api.frankfurter.dev/latest?base=USD. - Rates are cached on disk (
~/.pi/agent/data/pi-currency-rates.json) for 24 hours. - A custom footer component renders the same stats as the built‑in footer, plus currency conversions after the
$0.029cost. - The footer updates automatically after every turn.
License
MIT
