Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 854 Bytes

README.md

File metadata and controls

37 lines (24 loc) · 854 Bytes

curcon -- currency converter

Command-line tool for converting currencies using Open Exchange Rates.

Installation

npm install -g curcon

Configuration

Export your Open Exchange Rates App ID in your startup file (~/.bashrc, ~/.bash_profile, etc).

export OPEN_EXCHANGE_RATES_APP_ID=...

Remember to source your startup file (source ~/.bashrc) or restart your terminal.

Usage

Convert 100 Canadian dollars to Japanese Yen:

# curcon amount from to round-to
curcon 100 cad jpy 2
  • amount: Number The amount to convert. Defaults to 1.
  • from: String Any valid currency code such as CAD. Defaults to CAD.
  • to: String Any valid currency code such as JPY. Defaults to JPY.
  • round-to: Number The number of decimal places to round to. Defaults to 2.

License

MIT