Overview
RTK supports global flags that work with all commands. These flags must appear before the subcommand.Syntax
Global Flags
Verbosity
Increase verbosity level:
-v- Basic diagnostics (command routing, token counts)-vv- Detailed processing (filter steps, regex matches)-vvv- Full debug (all internal state)
- Debugging RTK behavior
- Understanding token savings
- Reporting issues
Ultra-Compact Mode
Enable Level 2 optimizations:
- ASCII icons instead of emoji (π β [i])
- Inline format (no extra spacing)
- Maximum density output
- Every token counts
- Non-emoji terminal
- Piping to other tools
Skip Environment Validation
Set
SKIP_ENV_VALIDATION=1 for child processes.Affects:rtk next- Next.js buildsrtk tsc- TypeScript compilerrtk lint- Lintersrtk prisma- Prisma CLI
- 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:
Level 2 (-vv)
Detailed processing:
Level 3 (-vvv)
Full debug (includes internal state, regex matches, etc.):
Ultra-Compact Examples
Normal Output
Ultra-Compact Output
Skip-Env Flag
Problem: Next.js Env Validation
Solution: Skip Validation
How It Works
SetsSKIP_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
-vv when:
- Debugging filter logic
- Understanding why something was filtered out
- Tuning filter parameters
-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)
- 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
- 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.Related Commands
- All RTK commands support global flags
- See command-specific docs for subcommand flags
