Skip to main content

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)
  • biome
  • oxc (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

From src/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

From src/tsc_cmd.rs:

rtk next

Next.js build and dev with route metrics.

Usage

Commands

  • build: Production build
  • dev: Development server
  • start: 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 Client
  • migrate dev: Create and apply migration
  • db push: Push schema changes
  • studio: 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

  1. pnpm: Check for pnpm-lock.yaml
  2. yarn: Check for yarn.lock
  3. npm: Default to npx

Exit Code Preservation

All commands preserve exit codes for CI/CD:

Token Savings Summary

Next Steps

Python

Python development tools

Go

Go development tools