Skip to content

edycutjong/nansen-term

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

106 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘
β•šβ•β•  β•šβ•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•β•   β•šβ•β•   β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•     β•šβ•β•

The Hacker's Bloomberg Terminal β€” Interactive TUI for Nansen CLI

"Web apps are bloated. Real degens stay in the terminal."

CI Status License Node 20 Node 22 Node 24 Tests


🎬 Demo

NansenTerm Demo


✨ Features

Feature Description
πŸ“Š Multi-pane layout Smart Money flows, DEX trades, perp data, and wallet info side-by-side
πŸ”„ Live streaming NDJSON streaming for real-time DEX trade updates
⌨️ Keyboard-first Tab between panes, arrow keys to scroll, hotkeys for everything
πŸ’± 1-keystroke trading [Q] quote β†’ [T] execute via trade quote/trade execute
πŸ”— 18-chain support Cycle through all chains with [C]
πŸ“‹ Clean tables Formatted ASCII tables, not raw JSON walls

πŸš€ Quick Start

Minimum requirement: just a Nansen API key. No wallet needed to view analytics.

Terminal size: minimum 120 columns Γ— 32 rows. For best experience, 160Γ—40 (or full-screen iTerm2/Terminal) is recommended.

# 1. Install nansen-cli and authenticate
npm install -g nansen-cli
nansen login --api-key YOUR_API_KEY   # get key: app.nansen.ai/auth/agent-setup

# 2. Clone and run NansenTerm
git clone https://github.com/edycutjong/nansen-term.git
cd nansen-term
npm install
npm --silent run demo  # clean output, no npm preamble
# or: npm run dev      # development mode with hot reload

Wallet is optional. Netflow, DEX Trades, and Perp panes work without one. Only [Q] trade quote and [T] execute require a wallet:

nansen wallet create   # only needed for trading

πŸ“Έ Screenshots

Main Dashboard β€” 4 panes with live DEX streaming:

NansenTerm Dashboard

Token Detail Overlay β€” deep-dive any token with Enter:

Token Detail Overlay


⌨️ Keyboard Shortcuts

Key Action
Tab / Shift+Tab Cycle through panes
↑ / ↓ Scroll within active pane
Enter Select token β†’ open detail overlay
C Cycle chain (ethereum β†’ solana β†’ base β†’ ...)
W Switch wallet
Q Open trade quote modal
T Execute quoted trade (confirmation required)
R Refresh current pane
P Refresh all panes
S Toggle streaming mode
? Help overlay
Esc Close overlay / go back
Ctrl+C Exit

πŸ›  Tech Stack

Layer Technology
Runtime Node.js 20+
TUI Framework Ink v5 (React for CLI)
CLI Execution child_process.execFile / spawn
State Management React hooks
Streaming NDJSON via --stream flag
Testing Vitest Β· 246 tests Β· Istanbul coverage

πŸ”Œ Nansen CLI Endpoints

20+ endpoints across research, trade, and wallet:

research smart-money   netflow Β· dex-trades Β· holdings
research perp          screener Β· leaderboard
research token         info Β· indicators Β· ohlcv Β· screener Β· flow-intelligence
research profiler      balance Β· pnl-summary
research search
trade                  quote Β· execute
wallet                 list Β· show Β· create
account

πŸ”— Supported Chains

ethereum Β· solana Β· base Β· bnb Β· arbitrum Β· polygon Β· optimism Β· avalanche Β· linea Β· scroll Β· mantle Β· ronin Β· sei Β· plasma Β· sonic Β· monad Β· hyperevm Β· iotaevm


πŸ§‘β€πŸ’» Development

npm run dev             # Run with tsx (hot reload)
npm run mock            # Run with mock data (uses zero API credits)
npm run build           # Compile TypeScript
npm start               # Run compiled version
npm test                # Run 246 tests with Vitest
npm run test:coverage   # Tests with Istanbul coverage report

πŸ’‘ Tip: Use npm run mock to explore the full UI without consuming any Nansen API tokens.


πŸ† Built For

Week 2 of the Nansen CLI Build Challenge β€” #NansenCLI


πŸ“„ License

MIT Β© edycutjong

About

πŸ–₯️ TUI terminal dashboard for Nansen Analytics β€” live token streaming, portfolio tracking & trade execution from the CLI

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors