https://github.com/duneanalytics/cli
Dune CLI
https://github.com/duneanalytics/cli
Last synced: 3 months ago
JSON representation
Dune CLI
- Host: GitHub
- URL: https://github.com/duneanalytics/cli
- Owner: duneanalytics
- License: mit
- Created: 2026-03-02T09:22:37.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-09T16:23:23.000Z (3 months ago)
- Last Synced: 2026-03-09T18:29:50.605Z (3 months ago)
- Language: Go
- Size: 54.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dune CLI
A command-line interface for interacting with the [Dune](https://dune.com/) API.
## Installation
```bash
curl -sSfL https://github.com/duneanalytics/cli/raw/main/install.sh | bash
```
## Authentication
```bash
# Save your API key to ~/.config/dune/config.yaml
dune auth --api-key
# Or run interactively (prompts for key)
dune auth
# Or set via environment variable
export DUNE_API_KEY=
```
The `--api-key` flag is available on all commands to override the stored key.
## Commands
### `dune query`
Manage and execute Dune queries.
| Command | Description |
|---------|-------------|
| `query create --name --sql [--description] [--private] [--temp]` | Create a new saved query |
| `query get ` | Get a saved query's details and SQL |
| `query update [--name] [--sql] [--description] [--private] [--tags]` | Update an existing query |
| `query archive ` | Archive a saved query |
| `query run [--param key=value] [--performance medium\|large] [--limit] [--timeout] [--no-wait]` | Execute a saved query and display results |
| `query run-sql --sql [--param key=value] [--performance medium\|large] [--limit] [--timeout] [--no-wait]` | Execute raw SQL directly |
### `dune execution`
Manage query executions.
| Command | Description |
|---------|-------------|
| `execution results [--limit] [--offset] [--timeout] [--no-wait]` | Fetch results of a query execution |
### `dune dataset`
Search the Dune dataset catalog.
| Command | Description |
|---------|-------------|
| `dataset search [--query] [--categories] [--blockchains] [--schemas] [--dataset-types] [--owner-scope] [--include-private] [--include-schema] [--include-metadata] [--limit] [--offset]` | Search for datasets |
| `dataset search-by-contract --contract-address
[--blockchains] [--include-schema] [--limit] [--offset]` | Search for decoded tables by contract address |
Categories: `canonical`, `decoded`, `spell`, `community`
### `dune docs`
Search and browse Dune documentation. No authentication required.
| Command | Description |
|---------|-------------|
| `docs search --query [--api-reference-only] [--code-only]` | Search the Dune documentation |
### `dune usage`
Show credit and resource usage for your account.
```bash
dune usage [--start-date YYYY-MM-DD] [--end-date YYYY-MM-DD]
```
## Output Format
All commands (except `auth`) support `-o, --output ` with `text` (default) or `json`.