feat: Add yarn workspace / yarn monorepo support (Turborepo pattern)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the rtk rewrite routing entry point and inspect the existing tsc, test, and err filters. Trace how commands are classified and routed, then verify that the requested yarn workspace, test, install, and add forms produce the corresponding filtered output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, rust, typescript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100