rtk-ai/rtk

Add commands - PM2 & Redis-cli

Open

#1,859 建立於 2026年5月12日

在 GitHub 查看
 (1 留言) (1 反應) (0 負責人)Rust (2,914 fork)batch import
area:clienhancementhelp wantedpriority:medium

倉庫指標

Star
 (48,085 star)
PR 合併指標
 (平均合併 11天 1小時) (30 天內合併 45 個 PR)

描述

Hi,

Feature Request: Add support for pm2 and redis-cli

Commands

  • pm2 logs, pm2 list, pm2 status, pm2 env, pm2 restart, pm2 reload
  • redis-cli get, redis-cli del, and other redis-cli subcommands

Why

Both commands appear frequently in Node.js/backend Claude Code sessions and produce verbose output that pollutes the context window.

From rtk discover on my setup (88 sessions, last 30 days):

Command Count
pm2 logs 57
pm2 list 36
pm2 restart 34
pm2 reload 23
pm2 status 6
pm2 env 5
redis-cli 31
redis-cli get 11

Expected compression

pm2 logs — output is very repetitive (timestamps, repeated log lines, process names). Truncation + deduplication should yield 70-80% savings.

pm2 list / status — tabular output with fixed-width padding. Structure compression similar to ps aux (already handled by RTK at 91.8%).

redis-cli — responses are short for single-key queries but can be large for KEYS *, HGETALL, or LRANGE. Truncation + type-aware formatting would help.

Happy to test

I can run benchmarks on real output if you need before/after token counts.

貢獻者指南