OC

opencmc/coinmarketcap-cli

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 质量 61 趋势 24MIT

官方CoinMarketCap CLI用于市场数据、历史、监控和AI代理工作流程。

概览

为关注稳定标识符、机器可读负载和可重复工作流程的个人和代理提供研究级、终端原生的CoinMarketCap访问。 当符号模糊、有效载荷形状变化和浏览器驱动的工作流程对分析或自动化来说过于脆弱时,可以使用CMC。确定采用标准的CoinMarketCap ID,保持标准可预测性,并在检查、脚本和TUI之间切换,同时不更换工具。 该仓库还附带了专门的 Claude Code 和 OpenClaw 技能,因此相同的 cmc 命令表面可以直接用于终端工作流或通过代理原生工具提示。 当你的工作流程在终端内,并且你希望实现可重复、高数据量且操作较少的访问时,CMC是最合适的选择。它保持输出稳定,减少了手动HTTP管道,并为代理提供了一个可以检查、导出和编写脚本的单一命令面。

概述(AI 翻译)

为关注稳定标识符、机器可读负载和可重复工作流程的个人和代理提供研究级、终端原生的CoinMarketCap访问。

当符号模糊、有效载荷形状变化和浏览器驱动的工作流程对分析或自动化来说过于脆弱时,使用cmc。确定采用标准的CoinMarketCap ID,保持标准可预测性,并在检查、脚本和TUI之间切换,不更换工具。

仓库还附带了 Claude Code 和 OpenClaw 专用技能,因此相同的 cmc 命令表面可以直接用于终端工作流程或通过代理原生工具提示使用。

选择合适的时长

cmc 最适合你的工作流程在终端中,并且你希望实现可重复、高数据量的访问,且操作部件更少。它保持输出稳定,减少手动 HTTP 操作,并为代理提供一个可检查、导出和编写脚本的单一命令面。

时长 最佳匹配 为什么选择它
CMC CLI 终端优先分析师、高级用户和代理 稳定的 JSON/表输出、CSV 导出、--dry-run、TUI,以及捆绑的 Claude Code/OpenClaw 技能,支持代理原生工作流程

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

cmc - CoinMarketCap CLI

Research-grade, terminal-native CoinMarketCap access for people and agents that care about stable identifiers, machine-readable payloads, and reproducible workflows.

Use cmc when symbol ambiguity, shifting payload shapes, and browser-driven workflows are too fragile for your analysis or automation. Resolve to canonical CoinMarketCap IDs, keep stdout predictable, and move between inspection, scripting, and TUI without changing tools.

The repository also ships dedicated skills for Claude Code and OpenClaw, so the same cmc command surface can be used directly in terminal workflows or through agent-native tool prompts.

Choose The Right Runtime

cmc is the best fit when your workflow lives in the terminal and you want repeatable, high-data-volume access with fewer moving parts. It keeps output stable, reduces manual HTTP plumbing, and gives agents a single command surface they can inspect, export, and script against.

Runtime Best fit Why choose it
CMC CLI Terminal-first analysts, power users, and agents Stable JSON/table output, CSV export, --dry-run, TUI, and bundled Claude Code/OpenClaw skills for agent-native workflows
CMC Pro API Apps and services that want direct HTTP integration Lowest-level control when you are already building around the API and managing requests yourself
CMC MCP MCP-capable assistants and IDEs Convenient when the model should call CoinMarketCap tools inside an MCP runtime

If you need repeatable inspection, bulk pulls, or agent workflows that stay close to the shell, the CLI is usually the most ergonomic choice. If you are embedding CoinMarketCap data into a product or an MCP-native assistant, the API or MCP layer may be a better runtime match.

Try This First

No API key needed for these; they run on the Keyless Public API (see Keyless mode):

cmc price --id 1,1027
cmc api /v3/fear-and-greed/latest

These three show the core value quickly. All but --with-chain-stats also work without a key:

# Stable identity resolution
cmc resolve --id 1

# Quote plus chain-level enrichment in machine-readable form
cmc price --id 1 --with-info --with-chain-stats -o json | jq '.[] | .name, .symbol, .chain_stats'

# Chain-scoped discovery that is hard to do safely by hand
cmc search --chain ethereum --address 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Install

Homebrew and the shell installer are the primary paths.

# Homebrew
brew install openCMC/CoinMarketCap-CLI/cmc

# Shell installer (defaults to ~/.local/bin)
curl -sSfL https://raw.githubusercontent.com/openCMC/CoinMarketCap-CLI/main/install.sh | sh

If cmc is not on your PATH after the shell installer:

export PATH="$HOME/.local/bin:$PATH"

Build from source if you want the binary directly from the repository:

git clone [email protected]:openCMC/CoinMarketCap-CLI.git
cd CoinMarketCap-CLI
go build -o ./cmc .
./cmc version
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add opencmc/coinmarketcap-cli
新手?先看 mcpskill.org 教程 →