Skip to content

feat(cli): add devmetrics command to rsk-cli with GitHub + Rootstock insights#299

Open
lucifer1017 wants to merge 1 commit intorsksmart:mainfrom
lucifer1017:devCli-update
Open

feat(cli): add devmetrics command to rsk-cli with GitHub + Rootstock insights#299
lucifer1017 wants to merge 1 commit intorsksmart:mainfrom
lucifer1017:devCli-update

Conversation

@lucifer1017
Copy link

Summary

This PR adds a new native CLI command, devmetrics, to rsk-cli for collecting developer and contract-level metrics in a single workflow.

It integrates:

  • GitHub metrics (repository activity and contributor-related signals)
  • Rootstock contract metrics (network-aware on-chain insights)
  • Multiple output formats for different use cases: table, json, and markdown
  • CI-friendly mode (--ci) for automation pipelines

What was added

  • New command: rsk-cli devmetrics
  • Repeatable input flags:
    • --repo (repeatable)
    • --contract (repeatable)
  • Modular implementation under src/devmetrics/:
    • validation
    • services (github and rootstock)
    • formatters (table, json, markdown)
    • shared types
  • Command wiring in bin/index.ts to keep behavior consistent with existing CLI command patterns

Implementation notes

  • Rootstock integration is implemented using the existing stack approach (viem) for safer compatibility.
  • Validation and error handling were added for malformed/missing inputs and mismatch scenarios.
  • The command is designed to be additive and non-breaking to existing rsk-cli functionality.

Usage examples

# Table output
rsk-cli devmetrics --repo owner/repo --contract 0x... --network mainnet --format table

# JSON output
rsk-cli devmetrics --repo owner/repo --contract 0x... --network testnet --format json

# CI mode
rsk-cli devmetrics --repo owner/repo --contract 0x... --ci

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