Skip to content
robiuzzaman4Public

About

Currency Converter TUI

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Currency Converter TUI

A simple Currency Converter TUI (Terminal User Interface) application built with Go. This tool fetches real-time exchange rates and allows users to convert between multiple currencies using an interactive terminal form.

Thumbnail

Features

✅ Convert between multiple currencies (USD, EUR, GBP, JPY)
✅ Fetches real-time exchange rates via an API
✅ Interactive TUI using huh package
✅ Loads API keys securely from .env file

Requirements

  • Go 1.20 or later
  • An API key from ExchangeRate-API
  • Internet connection to fetch exchange rates

Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/your-username/currency-converter-tui.git
cd currency-converter-tui

2️⃣ Install Dependencies

go mod tidy

3️⃣ Create a .env File

Create a .env file in the project root and add your API key:

EXCHANGE_API_KEY=your_api_key_here

4️⃣ Run the Application

go run main.go

Usage

  1. Enter the amount to convert.
  2. Select the source currency (From Currency).
  3. Select the target currency (To Currency).
  4. The application will fetch exchange rates and display the converted amount.

Example output:

Enter amount: 100
From Currency: USD
To Currency: EUR

100.00 USD = 92.50 EUR

Packages Used

Future Improvements

✅ Support more currencies - Fetch supported currencies dynamically from the API
✅ Better error handling - Improve user feedback when API fails

About

Currency Converter TUI

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages