Glassnode CLI

The Glassnode CLIarrow-up-right (gn) is a command-line interface for the Glassnode API. Use it to list assets and metrics, fetch data, and integrate with scripts or AI assistants via the optional skill.

Installation

Linux / macOS

curl -sSL https://raw.githubusercontent.com/glassnode/glassnode-cli/main/install.sh | bash

This installs the latest release to /usr/local/bin (uses sudo if needed). To install to a custom directory:

INSTALL_DIR=~/bin curl -sSL https://raw.githubusercontent.com/glassnode/glassnode-cli/main/install.sh | bash

Windows (PowerShell)

irm https://raw.githubusercontent.com/glassnode/glassnode-cli/main/install.ps1 | iex

This installs to %LOCALAPPDATA%\glassnode\bin and adds it to your user PATH if needed.

Manual download

Download the archive for your OS and architecture from Releasesarrow-up-right, extract it, then move the binary into your PATH and make it executable (chmod +x gn on Unix).

From source

go install github.com/glassnode/glassnode-cli@latest

The binary from go install is named glassnode-cli. To get the gn command, build with:

and put gn in your PATH.

Authentication

Set your API key so the CLI can access the Glassnode API. The CLI resolves the key in this order:

  1. --api-key flag (highest priority)

  2. GLASSNODE_API_KEY environment variable

  3. ~/.gn/config.yaml configuration file

To persist the key in the config file:

See API Key for how to get your API key. API usage consumes API credits as with direct API calls.

Quick start

Add the CLI skill (AI assistants)

To let AI coding assistants (e.g. Cursor, Codex) use the Glassnode CLI and API knowledge, add the official skill:

After adding the skill, the assistant can run gn commands, discover metrics and assets, and follow CLI best practices when helping you work with Glassnode data.

For full usage, examples, and bulk metrics, see the Glassnode CLI repositoryarrow-up-right.

Last updated