Fixed fork of the original CoinGecko CLI tool with User-Agent header support.
The original coingecko-cli package (v1.6.1) stopped working because:
- CoinGecko API now requires a User-Agent header
- The dependency
@codingholt/coingecko-api-v3@0.0.13didn't set one - All requests returned 403 errors
This fork (v1.7.2) fixes it by:
- Switching from scoped
@codingholt/coingecko-api-v3tocoingecko-api-v3@0.0.31 - Version 0.0.31 includes proper User-Agent header
- Updated axios from 0.27.2 to 1.7.9 (security patches)
- Removed deprecated regex dependency
npm install -g coingecko-cliThe CLI is available as cg command.
cg price bitcoin ethereum virtual-protocolOutput:
┌──────────────────┬──────────┬──────────────────────┐
│ Coin │ $ │ 24h change │
├──────────────────┼──────────┼──────────────────────┤
│ bitcoin │ 74082 │ 0.60 % │
│ ethereum │ 2071 │ -3.06 % │
│ virtual-protocol │ 0.784183 │ 3.74 % │
└──────────────────┴──────────┴──────────────────────┘
cg trending # Trending coins
cg topMC # Top by market cap
cg chart bitcoin 7 # 7-day price chart
cg coinoverview bitcoin # Detailed coin info
cg description bitcoin # Coin descriptionRun cg --help for full command list.
All original functionality preserved:
- Real-time price feeds
- Market data (volume, market cap, 24h changes)
- Trending coins
- ASCII charts
- Token metadata
- Multi-coin queries
- Original author: codingholt
- Fork maintainer: dolepee
- Underlying library: samuraitruong/coingecko-api-v3
The original repository (codingholt/CoinGecko-CLI) was deleted. This fork:
- Restores functionality
- Fixes the User-Agent issue
- Updates dependencies
- Maintains the original license (ISC)
ISC License (same as original)
- NPM: https://www.npmjs.com/package/coingecko-cli (original package)
- GitHub (fork): https://github.com/dolepee/coingecko-cli
- CoinGecko API: https://www.coingecko.com/en/api