Skip to content

CLI: Add w3-kit chains list and chains show <chain> commands #85

@PetarStoev02

Description

@PetarStoev02

Context

The CLI today is light on read commands — most of its value lives in scaffolding. Adding chains list and chains show <chain> exposes registry data directly through the CLI, giving developers a quick way to look up chain metadata without leaving the terminal.

What to build

Two new commands:

  • w3-kit chains list — prints a table of all chains in the registry (name, chain ID, native currency).
  • w3-kit chains show <chain> — prints full metadata for a single chain (RPC URLs, block explorer, bridge addresses, gas oracle, etc.) accepting either chain name or chain ID.

Both should reuse the registry as the source of truth (no hardcoded data in the CLI).

Acceptance criteria

  • w3-kit chains list outputs a clean table to stdout
  • w3-kit chains show <chain> accepts name or chain ID
  • Unknown chain names produce a helpful error
  • Commands documented in CLI --help output
  • Tests cover happy path and unknown-chain error

Pointers

  • Related issue: cli --json flag (will pair well with these commands)
  • Related: registry chain data structure

Complexity

🟢 Good first issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions