Dune CLI
The Dune CLI lets you query, explore, and manage blockchain data without leaving your terminal. All commands support both human-readable and JSON output, making them equally useful for interactive work and agent-driven workflows.Install
dune auth to configure your API key, and installs the Dune Agent Skill via npx skills add. In most cases, this single command is all you need.
You’ll need a Dune API key during setup. Generate one at dune.com under APIs and Connectors > API Keys before running the install script.
Authenticate (manual)
If you need to re-authenticate or configure a different API key after installation, you can run:~/.config/dune/config.yaml for future sessions.
Alternatively, pass the key inline or via environment variable:
Usage
Rundune --help to see all available commands. All commands support -o json for structured, machine-parseable output — ideal for agent consumption:
Dune Skills
Agent Skills are an open standard for giving AI agents new capabilities. The Dune Skill teaches your agent how to use the Dune CLI to discover datasets, write DuneSQL, execute queries, handle errors, and manage costs — all from natural language prompts. Skills are supported by Claude Code, Cursor, OpenCode, OpenAI Codex, VS Code, Gemini CLI, Goose, and many more.Install
The Dune Skill is automatically installed when you run the CLI install script above — no extra steps required. If you need to install or reinstall the skill separately, you can run:- Claude Code
- Cursor
- Manual
Skills are automatically installed to
~/.claude/skills/ and loaded when your conversation matches blockchain-related triggers.How it works
Once installed, the Dune Skill activates automatically when your conversation involves blockchain data, on-chain analytics, DuneSQL, token transfers, DEX trades, smart contract events, or wallet analysis. The agent then:- Discovers the right tables using
dune dataset search - Inspects column schemas to build correct SQL
- Writes DuneSQL with proper partition filters for cost efficiency
- Executes the query and parses results
- Handles errors with built-in recovery strategies
Key Benefits
Agent-Native Data Access
Your AI agent queries blockchain data directly — no context switching, no copy-pasting SQL between apps.
Works Where You Work
Compatible with Claude Code, Cursor, VS Code, Codex, and any agent that supports the Agent Skills standard.
Cost-Aware by Default
The skill teaches agents to filter on partition columns and choose the right performance tier, reducing credit consumption.
Use Cases
Ad-Hoc Analysis
Ask your agent a question in plain English and get results backed by DuneSQL — from DEX volumes to gas trends.
Contract Exploration
Give the agent a contract address and let it discover all decoded event and call tables automatically.
Pipeline Scripting
Use the CLI’s JSON output and async execution to integrate Dune queries into CI/CD pipelines or monitoring scripts.
Reusable Parameterized Queries
Create saved queries with parameters, then run them with different inputs across sessions.