rtk-ai/rtk

feat: add built-in compact filters for yarn and sequelize-cli

Open

#1 920 ouverte le 16 mai 2026

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Rust (2 914 forks)batch import
area:clienhancementhelp wantedpriority:medium

Métriques du dépôt

Stars
 (48 085 stars)
Métriques de merge PR
 (Merge moyen 11j 1h) (45 PRs mergées en 30 j)

Description

RTK already has built-in filters for pnpm, npm, and prisma. Four common tools in the Node.js ecosystem are missing native support:

  • yarn — widely used package manager (classic and berry)
  • sequelize — Sequelize CLI for database migrations
  • ts-node-dev — TypeScript dev server with hot reload
  • nodemon — generic dev server with file watching

Currently these require manual TOML filters in ~/.config/rtk/filters.toml. Adding them as built-in filters would benefit the broader Node.js user base.

Suggested filter behavior

yarn (classic + berry)

Strip:

  • Version header: yarn install v1.x.x
  • Phase lines: [1/4] Resolving packages..., [2/4] Fetching..., etc.
  • Berry noise: ➤ YN0000: · Yarn, resolution/fetch/link step lines
  • Info lines: info Direct dependencies, info All dependencies
  • Blank lines

Keep: warnings, errors, success, Done in Xs

sequelize (sequelize-cli)

Strip:

  • CLI header: Sequelize CLI [Node: x, CLI: x, ORM: x]
  • Loaded configuration file "..."
  • Using environment "..."
  • Migrating lines: == migration_name: migrating ===

Keep: migrated confirmations, errors, warnings

ts-node-dev

Strip:

  • Version header: [INFO] HH:MM:SS ts-node-dev ver. x.x.x (using ts-node ver. x.x.x, typescript ver. x.x.x)
  • [INFO] HH:MM:SS Using ts-node version...
  • Blank lines

Keep: restart notifications, compilation errors, runtime errors

nodemon

Strip:

  • Version line: [nodemon] x.x.x
  • [nodemon] to restart at any time, enter \rs``
  • [nodemon] watching path(s): ...
  • [nodemon] watching extensions: ...
  • [nodemon] ignoring: ...
  • Blank lines

Keep: restart events ([nodemon] restarting due to changes...), errors, crash messages

Estimated savings

Based on local usage across 4 tools:

  • yarn install: ~60-70% token reduction
  • sequelize db:migrate: ~50% token reduction
  • ts-node-dev dev server: ~40% token reduction (header noise removed)
  • nodemon: ~30% token reduction (watching/config lines removed)

Current workaround

For reference, the TOML filters currently used locally:

[filters.yarn]
description = "yarn install/build - compact output (classic + berry)"
match_command = "^yarn\\b"
strip_ansi = true
strip_lines_matching = [
  "^\\s*$",
  "^yarn install v",
  "^\\[1/\\d\\]", "^\\[2/\\d\\]", "^\\[3/\\d\\]", "^\\[4/\\d\\]",
  "^info Direct dependencies",
  "^info All dependencies",
  "^info This module",
  "^➤ YN0000: · Yarn",
  "^➤ YN0000: .*(Resolution|Fetch|Link) step",
  "^➤ YN0000: [┌└│]",
]
max_lines = 40
on_empty = "yarn: ok"

[filters.sequelize]
description = "Sequelize CLI migrations - errors and final status only"
match_command = "^sequelize\\b"
strip_ansi = true
strip_lines_matching = [
  "^\\s*$",
  "^Sequelize CLI \\[",
  "^Loaded configuration",
  "^Using environment",
  "^== .+: migrating =+$",
] 
max_lines = 30
on_empty = "sequelize: ok"

[filters.ts-node-dev]
description = "ts-node-dev - strip version header, keep restarts and errors"
match_command = "^ts-node-dev\\b"
strip_ansi = true
strip_lines_matching = [
  "^\\s*$",
  "^\\[INFO\\] \\d{2}:\\d{2}:\\d{2} ts-node-dev ver\\.",
  "^\\[INFO\\] \\d{2}:\\d{2}:\\d{2} Using ts-node",
] 
max_lines = 30

[filters.nodemon]
description = "nodemon - strip watching/config lines, keep restarts and errors"
match_command = "^nodemon\\b"
strip_ansi = true
strip_lines_matching = [
  "^\\s*$",
  "^\\[nodemon\\] \\d+\\.\\d+\\.\\d+$",
  "^\\[nodemon\\] to restart",
  "^\\[nodemon\\] watching",
  "^\\[nodemon\\] ignoring",
]
max_lines = 20

Environment

- RTK version: rtk --version
- Use case: Claude Code sessions, Node.js/TypeScript projects with Express + Sequelize

Guide contributeur