A simple, powerful, and interactive command-line tool to check real-time currency exchange rates directly from your terminal. With Exchange CLI, you can effortlessly retrieve the latest exchange rates, convert between multiple currencies, and enjoy a responsive and user-friendly interface.
-
Real-Time Currency Exchange Rates:
- Retrieve exchange rates quickly for a selected base currency (default is
USD
). - Supports a wide range of currencies, including
EUR
,GBP
,JPY
,CNY
, and more. - Easily switch between base currencies for custom requirements.
- Retrieve exchange rates quickly for a selected base currency (default is
-
Interactive CLI Interface:
-
Currency Conversion:
- Perform real-time conversions with multiple currencies.
- Allows precise input of amounts, supports batch conversions, and displays results with enhanced formatting.
-
Multiplatform Support:
- Compatible with Windows, macOS, and Linux systems.
-
Clone this repository:
git clone https://github.com/adriianh/currency-exchange-cli.git cd currency-exchange-cli
-
Set up the environment: Ensure Kotlin (v1.9 or higher) and Gradle are installed on your system. Then, build the project:
./gradlew installDist
-
Navigate to the build directory:
cd ./dist/bin
-
Run the application:
./app
After installation, you can execute various commands to fetch exchange rates or perform currency conversions. Below are the available commands and their usage instructions:
After installation, you can execute various commands to fetch exchange rates or perform currency conversions. Here are a few examples:
-
Display help: Shows a list of available commands and options.
./app --help
Displays all available commands and options in detail.
-
Fetch currency rates: Fetches the latest exchange rates for a specific base currency.
./app fetch -c USD
Fetches the latest exchange rates using
USD
as the base currency. -
Convert currencies interactively: Launch the interactive conversion mode:
./app convert
-
Direct conversion: To convert between specific currencies, run:
./app convert -a 100 -c USD -e EUR,GBP
Converts
100 USD
toEUR
andGBP
. -
View historical rates: Fetch historical exchange rates for a specific date:
./app history -c USD -d 2023-01-01
This retrieves exchange rates for
USD
on2023-01-01
-
Fetch and display all supported currencies: View a list of all supported currencies and their codes:
./app fetch --list
Displays a detailed table of all available currency codes.
Contributions are welcome! Feel free to fork the repository, make changes, and submit a pull request. For major changes, please open an issue first to discuss what you'd like to implement.
This project is licensed under the MIT License.
Special thanks to the authors of: