rtk-ai / rtk-ai/rtk

feat: Add yarn workspace / yarn monorepo support (Turborepo pattern)

Open
#902 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:cli duplicate effort-medium enhancement help wanted priority:low
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

  1. Add yarn as a recognized command in rtk rewrite routing
  2. Sub-route yarn workspace <name> typecheck → tsc filter
  3. Sub-route yarn workspace <name> test / yarn test → test filter
  4. Sub-route yarn install / yarn add → err filter (progress bars stripped)

Happy to test a PR — Turborepo + yarn workspaces setup available.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.