Get Started with Nansen CLI

Written By Nansen Team

Last updated 5 days ago

What is Nansen CLI?

Nansen CLI gives AI agents and developers direct terminal access to Nansen's onchain intelligence. Smart Money tracking, wallet profiling, token analytics, and DEX trading, all through structured JSON output.

Built for automation and agent-first workflows.

How do I install it?

Its very simple, just type in Terminal:

npm install -g nansen-cli 

Requires Node.js v18+. No additional dependencies.

How do I authenticate?

nansen login 

This prompts for your API key. Stored in ~/.nansen/config.json. Or use an environment variable:

export NANSEN_API_KEY=your_api_key_here 

How do I set up Nansen CLI for an AI agent?

npx skills add nansen-ai/nansen-cli 

Adds a SKILL.md file that Claude Code, Codex, OpenClaw, and other compatible agents can read to understand available commands and output formats. Seven pre-built skills are available.

Do I need a Nansen Pro subscription to use the CLI?

No, you don’t need a Pro subscription to use the CLI.

Users can even use the CLI without logging by paying via x402 per call. x402 is ideal for agents and builders who prefer usage-based pricing without managing an account.