Skip to content

dolepee/coingecko-cli

Repository files navigation

coingecko-cli

npm version

Fixed fork of the original CoinGecko CLI tool with User-Agent header support.

What's Fixed

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.13 didn't set one
  • All requests returned 403 errors

This fork (v1.7.2) fixes it by:

  • Switching from scoped @codingholt/coingecko-api-v3 to coingecko-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

Installation

npm install -g coingecko-cli

The CLI is available as cg command.

Usage

Price Check

cg price bitcoin ethereum virtual-protocol

Output:

┌──────────────────┬──────────┬──────────────────────┐
│ Coin             │ $        │ 24h change           │
├──────────────────┼──────────┼──────────────────────┤
│ bitcoin          │ 74082    │ 0.60 %               │
│ ethereum         │ 2071     │ -3.06 %              │
│ virtual-protocol │ 0.784183 │ 3.74 %               │
└──────────────────┴──────────┴──────────────────────┘

Other Commands

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 description

Run cg --help for full command list.

Original Features

All original functionality preserved:

  • Real-time price feeds
  • Market data (volume, market cap, 24h changes)
  • Trending coins
  • ASCII charts
  • Token metadata
  • Multi-coin queries

Credits

  • Original author: codingholt
  • Fork maintainer: dolepee
  • Underlying library: samuraitruong/coingecko-api-v3

Why This Fork?

The original repository (codingholt/CoinGecko-CLI) was deleted. This fork:

  1. Restores functionality
  2. Fixes the User-Agent issue
  3. Updates dependencies
  4. Maintains the original license (ISC)

License

ISC License (same as original)

Links

About

Fixed fork of coingecko-cli with User-Agent header support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors