Overview
RTK provides comprehensive support for the modern JavaScript/TypeScript ecosystem. Achieve 70-94% token savings through:- JSON parsing: Structured output from linters and compilers
- Error grouping: Group by file, rule, or error code
- Failures only: Show only failing tests and checks
- Package manager detection: Auto-detects pnpm/npm/yarn/npx
Supported Tools
ESLint
Linting with rule grouping (84% savings)
TypeScript
Compiler errors grouped by file (83% savings)
Next.js
Build/dev with route metrics (87% savings)
Prettier
Format checking (70% savings)
Vitest
Test failures only (99.5% savings)
Playwright
E2E test results (94% savings)
Prisma
Schema operations (88% savings)
rtk lint
ESLint and other linters with rule-based grouping.Usage
Supported Linters
eslint(default)biomeoxc(experimental)
Examples
Features
- Rule grouping: Group violations by rule ID
- Severity levels: Separate errors and warnings
- File locations: Show file:line for each violation
- Exit code preservation: Safe for CI/CD
Implementation
Fromsrc/lint_cmd.rs:
rtk tsc
TypeScript compiler errors grouped by file.Usage
Examples
Features
- File grouping: Group errors by file
- Error codes: Show TypeScript error codes (TS2322, etc.)
- Line numbers: Compact format
TScode:line - Context preservation: Keep error messages
Implementation
Fromsrc/tsc_cmd.rs:
rtk next
Next.js build and dev with route metrics.Usage
Commands
build: Production builddev: Development serverstart: Start production server
Examples
Features
- Route summary: Show all routes with sizes
- Build metrics: Total bundle size
- Error highlighting: Preserve build errors
- Dev mode: Compact startup messages
rtk prettier
Format checking with files-only output.Usage
Examples
Features
- Pass/fail summary: Single line if all formatted
- File list: Show only files needing changes
- Write mode: Compact confirmation on format
rtk vitest
Vitest test runner showing failures only.Usage
Examples
See Testing Commands for detailed examples.Token Savings
99.5% savings on passing tests, 90% savings on failures.rtk playwright
Playwright E2E tests with failure grouping.Usage
Examples
Features
- Failures only: Skip passing tests
- Suite grouping: Group by test file
- Error messages: Preserve failure details
- Tee recovery: Full output saved to file
rtk prisma
Prisma CLI without ASCII art.Usage
Supported Commands
generate: Generate Prisma Clientmigrate dev: Create and apply migrationdb push: Push schema changesstudio: Open Prisma Studio (passthrough)
Examples
Features
- No ASCII art: Strips Prisma logo
- Essential info: Schema path, datasource, timing
- Migration summaries: Compact migration output
- Error preservation: Full error messages on failure
Package Manager Detection
All JavaScript tools auto-detect package manager:Detection Order
- pnpm: Check for
pnpm-lock.yaml - yarn: Check for
yarn.lock - npm: Default to
npx
Exit Code Preservation
All commands preserve exit codes for CI/CD:Token Savings Summary
| Command | Standard Tokens | RTK Tokens | Savings |
|---|---|---|---|
eslint (5 errors) | 500 | 80 | -84% |
tsc (5 errors) | 300 | 50 | -83% |
next build | 800 | 100 | -87% |
prettier --check (all pass) | 200 | 60 | -70% |
vitest run (24 pass) | 3,000 | 10 | -99.5% |
playwright test (2 fail, 22 pass) | 1,500 | 90 | -94% |
prisma generate | 500 | 60 | -88% |
Next Steps
Python
Python development tools
Go
Go development tools
