feat: Add yarn workspace / yarn monorepo support (Turborepo pattern)
#902 ouverte le 28 mars 2026
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
Summary
rtk discover shows yarn workspace as the most frequent unhandled command
in my project — 194 calls in 30 days, more than find (148) or ls (179).
Currently all output goes unfiltered into Claude's context.
Environment
- Package manager: yarn workspaces (Turborepo monorepo)
- Project type: TypeScript + Next.js + Fastify + Drizzle ORM
- RTK version: 0.24.0
Commands from discover output (unhandled)
| Command | Count | Example |
|---|---|---|
yarn workspace |
194 | yarn workspace api typecheck 2>&1 |
yarn install |
12 | yarn install 2>&1 |
yarn typecheck |
2 | yarn typecheck 2>&1 |
yarn test |
2 | yarn test 2>&1 |
yarn add |
2 | yarn add -D husky lint-staged |
Why it matters
In a Turborepo monorepo, yarn workspace <name> typecheck 2>&1 produces
large TypeScript compiler traces across multiple packages. Without filtering,
every typecheck dumps full tsc output into context — same problem that
rtk tsc solves for direct npx tsc calls.
Expected savings (based on rtk tsc ~11.7K tokens / 32 calls ratio):
194 yarn calls × ~365 tokens avg = ~70K tokens/month for yarn workspace alone.
Expected behavior
RTK should intercept and filter yarn commands similarly to existing handlers:
# Typecheck — route through rtk tsc filter
yarn workspace api typecheck → rtk tsc (errors grouped by file)
# Tests — route through rtk test filter
yarn workspace api test → rtk test (failures only)
yarn test → rtk test (failures only)
# Install — strip progress bars, show only errors
yarn install → rtk err yarn install
# Add packages — compact output
yarn add -D husky → show only final installed versions
Workaround (current)
rtk err yarn workspace api typecheck
rtk test yarn workspace api test
Works but requires manual prefix — defeats the purpose of hook-based automation.
Request
- Add
yarnas a recognized command inrtk rewriterouting - Sub-route
yarn workspace <name> typecheck→ tsc filter - Sub-route
yarn workspace <name> test/yarn test→ test filter - Sub-route
yarn install/yarn add→ err filter (progress bars stripped)
Happy to test a PR — Turborepo + yarn workspaces setup available.