A lightweight and fast CLI tool to fetch real-time cryptocurrency prices directly from your terminal.
Built with TypeScript using the CoinGecko public API — no API key required.
- 📈 Real-time cryptocurrency prices
- ⚡ Fast and minimal CLI output
- 🔒 Input validation & error handling
- 🧠 Strong typing with TypeScript
- 🌍 Supports multiple fiat & crypto currencies
- 🔓 No API key required
Install globally via npm:
npm install -g @nilesh-padiyar/crypto-trackerBefore installing, make sure you have
- Node.js (v14 or higher recommended)
- npm (comes with Node.js)
crypto <coin> <currency>crypto bitcoin usd
crypto ethereum inr
crypto dogecoin usdBITCOIN price: 46662 USDSupports all currencies available from the CoinGecko API.
To see the full list of supported currencies, run:
crypto --currencies- Fetches live price data from the CoinGecko API
- Validates user input
- Displays clean output in the terminal
CoinGecko public API allows up to 50 requests per minute per IP.
- If you hit the limit, the CLI will automatically retry with exponential backoff.
- Example warning:
⚠ 429 Rate limit hit, retrying in 1000ms...
⚠ 429 Rate limit hit, retrying in 2000ms...
⚠ 429 Rate limit hit, retrying in 4000ms...
✖ Something went wrong- This ensures users understand their usage limits while preventing the CLI from failing silently.
- Cached and fallback currencies help reduce unnecessary API calls.
If you want to work on the project locally:
git clone https://github.com/nilesh-padiyar/crypto-tracker.git
cd crypto-tracker
npm install
npm run buildRun locally:
node dist/index.js bitcoin usdnpm link
crypto bitcoin usdMake sure your package.json includes:
"bin": {
"crypto": "dist/index.js"
}And your entry file starts with:
#!/usr/bin/env nodenpm update -g @nilesh-padiyar/crypto-tracker- Node.js
- TypeScript
- Async/Await
- CoinGecko Public API
Contributions are welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Please keep commits clean and meaningful.
MIT — free to use, modify, and distribute
Nilesh Padiyar