omp packages

pi-currencies1.0.0

Show AI cost in your local currencies — extends the pi footer with real‑time exchange rates from frankfurter.dev

hommesauvage Published 4 months ago MIT ~154 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

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-currencies

Or try it without installing:

pi -e npm:pi-currencies

Configuration

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 pi

Commands

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

  1. On startup, the extension fetches live rates from https://api.frankfurter.dev/latest?base=USD.
  2. Rates are cached on disk (~/.pi/agent/data/pi-currency-rates.json) for 24 hours.
  3. A custom footer component renders the same stats as the built‑in footer, plus currency conversions after the $0.029 cost.
  4. The footer updates automatically after every turn.

License

MIT