rtk icon indicating copy to clipboard operation
rtk copied to clipboard

Feature Request: Support OpenClaw CLI commands for token optimization

Open downwind7clawd-ctrl opened this issue 7 months ago • 1 comments

Summary

RTK is great for standard dev commands, but it doesn't rewrite OpenClaw CLI commands, which are heavily used in OpenClaw-based AI agent sessions (10-20+ calls per session).

Frequently used OpenClaw commands that need RTK coverage

# Most frequent - sent every response via Telegram/Discord
openclaw message send --channel telegram --target <ID> --message ...
openclaw message send --channel discord --message ...

# Status/debug
openclaw status
openclaw gateway status
openclaw plugins list

# Model management
openclaw models status

# Cron
openclaw cron list

# Wiki
openclaw wiki search <query>
openclaw wiki ingest <file>

Suggested token savings

  • openclaw message send output: strip plugin loading logs ([plugins] ..., [lcm] ...) - saves ~100-200 tokens per call
  • openclaw status output: compact format with key metrics only
  • openclaw plugins list: table → compact list
  • openclaw cron list: table → compact list

Current behavior

rtk rewrite returns exit code 1 (no match) for all openclaw commands:

$ rtk rewrite "openclaw message send --channel telegram --target 6572517363 --message test"
# no output, exit 1

Environment

  • rtk: 0.35.0
  • Platform: Linux (Ubuntu 24.04)
  • Use case: OpenClaw AI assistant sessions via Telegram
  • OpenClaw repo: https://github.com/openclaw/openclaw

Impact estimate

In a typical OpenClaw session, openclaw message send is called 10-20 times. Each call outputs ~150 tokens of plugin loading logs that are injected into LLM context. Adding RTK support could save 1,500-3,000 tokens per session just from message sends alone.

Thank you for the great tool! 🦞

downwind7clawd-ctrl avatar Apr 12 '26 08:04 downwind7clawd-ctrl

wshm · Automated triage by AI

🔍 Automated Triage

✨ Category feature
🟢 Priority low
🎯 Confidence 91%

Summary

Feature request to add RTK rewrite support for OpenClaw CLI commands; well-scoped but targets a niche third-party tool with limited broader adoption.


Triaged automatically by wshm · This is an automated analysis, not a human review.

pszymkowiak avatar Apr 12 '26 08:04 pszymkowiak