Skip to main content

Overview

RTK supports global flags that work with all commands. These flags must appear before the subcommand.

Syntax

Global Flags

Verbosity

flag
Increase verbosity level:
  • -v - Basic diagnostics (command routing, token counts)
  • -vv - Detailed processing (filter steps, regex matches)
  • -vvv - Full debug (all internal state)
Use when:
  • Debugging RTK behavior
  • Understanding token savings
  • Reporting issues

Ultra-Compact Mode

flag
Enable Level 2 optimizations:
  • ASCII icons instead of emoji (πŸ“Š β†’ [i])
  • Inline format (no extra spacing)
  • Maximum density output
Use when:
  • Every token counts
  • Non-emoji terminal
  • Piping to other tools

Skip Environment Validation

flag
Set SKIP_ENV_VALIDATION=1 for child processes.Affects:
  • rtk next - Next.js builds
  • rtk tsc - TypeScript compiler
  • rtk lint - Linters
  • rtk prisma - Prisma CLI
Use when:
  • Environment validation is too strict
  • Local dev setup differs from production
  • CI/CD environment issues

Flag Placement

Global flags must come before the subcommand:

Verbosity Examples

Level 1 (-v)

Basic diagnostics:
Output:

Level 2 (-vv)

Detailed processing:
Output:

Level 3 (-vvv)

Full debug (includes internal state, regex matches, etc.):
Output:

Ultra-Compact Examples

Normal Output

Ultra-Compact Output

Skip-Env Flag

Problem: Next.js Env Validation

Error:

Solution: Skip Validation

Success:

How It Works

Sets SKIP_ENV_VALIDATION=1 before running:
  • Next.js (next build, next dev)
  • TypeScript (tsc)
  • Linters (eslint, etc.)
  • Prisma (prisma generate, etc.)

Combining Flags

Flag Interaction with Subcommands

Git Flags

Grep Flags

When to Use Each Flag

Verbosity (-v, -vv, -vvv)

Use -v when:
  • Verifying RTK is actually reducing tokens
  • Checking filter behavior
  • Confirming command routing
Use -vv when:
  • Debugging filter logic
  • Understanding why something was filtered out
  • Tuning filter parameters
Use -vvv when:
  • Reporting bugs
  • Contributing to RTK
  • Deep debugging

Ultra-Compact (-u)

Use when:
  • Every token is critical (large outputs)
  • Terminal doesn’t support emoji
  • Piping output to other tools
  • CI/CD logs (parseable format)
Don’t use when:
  • Human readability matters
  • Emoji provide useful visual cues
  • Output is already minimal

Skip-Env (--skip-env)

Use when:
  • Environment validation blocks builds
  • Local dev environment differs from prod
  • CI/CD has incomplete env vars
  • Testing with partial configuration
Don’t use when:
  • Env validation catches real issues
  • Production builds (always validate)
  • You can fix the env vars properly

Exit Codes

Global flags don’t affect exit codes - they’re always passed through from the underlying command.
  • All RTK commands support global flags
  • See command-specific docs for subcommand flags