fx-calculator
Version, currently master branch1 version
- master branchlatestJun 18, 2026
github.com/crystal-money/fx-calculator
⚖️ Simple command line tool for currency rate conversion
Installation
# Add this to your shard.yml
dependencies:
fx-calculator:
github: crystal-money/fx-calculator
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
~> 1.18- License
- MIT
- Author
- Sijawusz Pur Rahnama
- Target
fx-calculatorfrom src/cli.cr
Dependencies
Runtime Dependencies
- money*github: crystal-money/money, branch: master
Development Dependencies
- ameba*github: crystal-ameba/ameba, branch: masterdev
README
FX-Calculator

Simple command line tool for calculating foreign exchange rates.
Installation
git clone https://github.com/crystal-money/fx-calculator.git
cd fx-calculator
shards install
shards build --release
Usage
[!NOTE] Available rate providers can be found at https://github.com/crystal-money/money/tree/master/src/money/currency/rate_provider.
Get a currency exchange rate between EUR and USD,
using the FloatRates provider.
./bin/fx-calculator -p FloatRates 'EUR to USD'
Convert 200 USD to PLN (by providing the currency inline),
using the FloatRates provider.
./bin/fx-calculator -p FloatRates '$200 in PLN'
./bin/fx-calculator -p FloatRates '$200 to PLN'
Convert 200 USD and 430 EUR to PLN (by setting the default currency),
using the FloatRates provider.
./bin/fx-calculator -p FloatRates -C PLN '$200' '430 EUR'
You can use a configuration file (-c /path/to/config.yml) instead of providing
options through the command line:
currency: EUR
exchange:
rate_store:
name: File
options:
path: ~/.cache/fx-calculator/currency-rates.json
ttl: 15 minutes
rate_provider:
name: Compound
options:
providers:
- name: FloatRates
- name: UniRateAPI
options:
api_key: your-api-key
To see all available options run ./bin/fx-calculator --help.
Contributing
- Fork it (https://github.com/crystal-money/fx-calculator/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Sijawusz Pur Rahnama - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jun 18, 2026
- Crystal
~> 1.18- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/crystal-money/fx-calculator
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1