npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@spectratools/defillama-cli

v0.4.4

Published

DefiLlama API CLI for spectra-the-bot

Readme

@spectratools/defillama-cli

Query DefiLlama API data from the command line — TVL, volume, fees, and token prices.

Install

pnpm add -g @spectratools/defillama-cli

LLM / Agent Discovery

# Emit machine-readable command metadata
defillama-cli --llms

# Register as a reusable local skill for agent runtimes
defillama-cli skills add

# Register as an MCP server entry
defillama-cli mcp add

Quick Start

No API key required — DefiLlama is a free, public API.

# Top 10 protocols by TVL
defillama-cli tvl protocols --limit 10

# Top chains by TVL
defillama-cli tvl chains --limit 10

# Protocol detail with chain breakdown
defillama-cli tvl protocol aave

# TVL history for a protocol
defillama-cli tvl history aave --days 7

# Top DEXes by 24h volume
defillama-cli volume dexs --limit 10

# Volume for a specific DEX
defillama-cli volume protocol uniswap

# DEX aggregators ranked by volume
defillama-cli volume aggregators --limit 10

# Top protocols by fees
defillama-cli fees overview --limit 10

# Fee detail for a protocol
defillama-cli fees protocol aave

# Current token price
defillama-cli prices current ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7

# Historical token price
defillama-cli prices historical ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7 --date 2025-01-01

# Price chart
defillama-cli prices chart ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7 --start 2025-01-01 --period 1d

Command Groups

| Group | Description | |-------|-------------| | tvl | Total value locked — protocols, chains, protocol detail, history | | volume | DEX trading volume — dexs, protocol detail, aggregators | | fees | Protocol fees and revenue — overview, protocol detail | | prices | Token prices — current, historical, chart |

Chain Filtering

Several commands support --chain to filter by blockchain:

defillama-cli tvl protocols --chain ethereum --limit 10
defillama-cli volume dexs --chain abstract --limit 10
defillama-cli fees overview --chain base --limit 10

Output Modes

# Human-readable table output (default)
defillama-cli tvl protocols --limit 5

# JSON output for pipelines
defillama-cli tvl protocols --limit 5 --json

Documentation

Full documentation: spectratools.dev/defillama

License

MIT