https://github.com/kumaarbalbir/crypto-coindex
Node.js CLI tool for checking real time cryptocurrency prices.
https://github.com/kumaarbalbir/crypto-coindex
cli-app commanderjs nodejs
Last synced: 7 months ago
JSON representation
Node.js CLI tool for checking real time cryptocurrency prices.
- Host: GitHub
- URL: https://github.com/kumaarbalbir/crypto-coindex
- Owner: KumaarBalbir
- Created: 2024-03-28T14:36:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-28T16:11:21.000Z (over 1 year ago)
- Last Synced: 2024-03-28T17:31:35.230Z (over 1 year ago)
- Topics: cli-app, commanderjs, nodejs
- Language: JavaScript
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crypto-Coindex
This project is a Node.js CLI tool for checking cryptocurrency prices. It utilizes various Node.js packages and the [CoinAPI](https://docs.coinapi.io/) to provide real-time cryptocurrency data.
## Description
- **Modules Used**: The modules used in the project are `commander` for handling CLI commands, `inquirer` for user input prompts, `config store` for configuration management, `axios` for API requests, and `colors` for CLI output styling.
- **Command Functionality**: Organized command functionality into separate files and folders for maintainability and modularity.
- **API Key Handling**: Implemented a "key manager" class to handle set, get, and delete operations for API keys using `config store`.
- **User Input Validation**: Utilized `inquirer` for prompting the user for an API key and implemented custom validation to ensure the key is not empty.
- **Error Handling**: Implemented error handling for scenarios such as missing API keys or API request failures.
## Demonstration
Here is demonstration of few commands
#### coindex

#### coindex key -h

#### coindex key set

#### coindex check price

#### coindex check price --cur=EUR

#### coindex check price --coin=BTC --cur=INR

## Getting Started
To get started with the Crypto-Coindex CLI tool, follow these steps:
1. Clone the repository to your local machine.
2. Install dependencies using `npm install`.
3. Run `npm link` for creating symbolic link for global command access.
4. Get an API key from the [CoinAPI](https://docs.coinapi.io/).
5. Open cmd prompt or powershell to explore the available commands (`key`, `check`, etc.) and check cryptocurrency prices (see attached screenshot).
Feel free to explore and customize it according to your requirements!
### Credit
- Brad Traversy (amazing man)
- CoinAPI (for providing API key for development purpose)