Skip to content

Improve CLI help formatting for command groups#445

Open
dafeda wants to merge 1 commit into
nansen-ai:mainfrom
dafeda:cli-help
Open

Improve CLI help formatting for command groups#445
dafeda wants to merge 1 commit into
nansen-ai:mainfrom
dafeda:cli-help

Conversation

@dafeda
Copy link
Copy Markdown

@dafeda dafeda commented May 26, 2026

Render command-group help with standard usage text and one command per line, and section leaf subcommand help into usage, options, returns, and examples.

Summary

Before fix:

nansen-cli git:(main) nansen research portfolio defi --help
portfolio defi — DeFi holdings across protocols
Params (* required): --wallet*
Cost: 10 credits (Free tier) / 1 credit (Pro tier)
Example: nansen research portfolio defi --wallet <val>

After fix:

nansen-cli git:(cli-help) nansen research portfolio defi --help
USAGE: nansen research portfolio defi [options]

DeFi holdings across protocols

OPTIONS (* required):
  --wallet*

Cost: 10 credits (Free tier) / 1 credit (Pro tier)

EXAMPLE:
  nansen research portfolio defi --wallet <val>

Before fix:

nansen-cli git:(main) nansen research --help
research — Research and analytics commands
Subcommands: portfolio, smart-money, profiler, token, search, perp, prediction-market, points, historical-dex-trades, historical-pnl-leaderboard, historical-token-flow-summary, historical-token-quant-scores, historical-top-holders, historical-who-bought-sold, historical-smart-money-balances, historical-token-screener, historical-wallet-balances, historical-tx-lookup, historical-wallet-transactions
Use: nansen research <subcommand> --help

After fix:

nansen-cli git:(cli-help) nansen research --help
USAGE: nansen research <command> [options]

Research and analytics commands

COMMANDS:
  portfolio
  smart-money
  profiler
  token
  search
  perp
  prediction-market
  points
  historical-dex-trades
  historical-pnl-leaderboard
  historical-token-flow-summary
  historical-token-quant-scores
  historical-top-holders
  historical-who-bought-sold
  historical-smart-money-balances
  historical-token-screener
  historical-wallet-balances
  historical-tx-lookup
  historical-wallet-transactions

Run 'nansen research <command> --help' for more information on a command.

Checklist

  • Tests pass (npm test)
  • src/schema.json updated if new commands or flags were added
  • README.md updated if new top-level commands or categories were added
  • Changeset added (.changeset/) — only required for user-facing changes (new commands, flags, bug fixes, breaking changes)

Render command-group help with standard usage text and one command per line,
and section leaf subcommand help into usage, options, returns, and examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant