Skip to content

Route more high-frequency commands: missing git/gh subcommands plus npm install, lsof, pgrep #2738

Description

@Akasha53

Route more high-frequency commands: missing git/gh subcommands plus npm install, lsof, pgrep

Summary

rtk discover on my last 30 days (51 sessions, 2863 Bash commands) reports ~204.5K tokens recoverable through existing RTK equivalents. It also lists frequent commands RTK doesn't route yet. Some are subcommands of routers that already exist (rtk git, rtk gh); others are new but produce verbose output worth filtering.

Environment

  • RTK scope: Global
  • Platform: macOS (Apple Silicon), zsh
  • Sample: 51 sessions / 2863 Bash commands (last 30 days)
  • Currently routed through RTK: 135 commands (4.7%)

Requested commands

A. Missing subcommands of existing routers

These routers exist but skip these subcommands, so the commands run raw:

Command Count Router Note
git checkout 12 rtk git e.g. git checkout -b feat/…
git config 8 rtk git e.g. git config user.name; output is small
gh auth 10 rtk gh e.g. gh auth status

B. New routers (verbose output)

Command Count Note
npm install 6 install logs with deprecation and warning noise
pgrep 4 process lookups, e.g. pgrep -fl "next dev"
lsof 4 port and process inspection; long tabular output

Out of scope

These show up in the unhandled list but are too freeform to route safely, so I left them out: node -p / node <<, python3 << heredocs, ssh … << REMOTE, . ./.env.local, cat > file, $(cat …), break, bare cat.

Why these

Group A + B covers about 44 commands per month in my sample. npm install and lsof have the largest raw output, so they save the most per call. Extending rtk git and rtk gh to the missing subcommands should carry low risk because the dispatch path already exists.

I can share more rtk discover output or test a build.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions