Execute CLI command through Wings router.
Flow: CLI args → URL → Context → Router → stdout + exit code. Detects stdin pipe data, routes through middleware, maps HTTP status to exit codes.
Exit Codes: 200-299 → 0 (success), others → 1 (error). Stdin: Reads piped data when !isTTY, null otherwise. Error Handling: Unexpected errors → stderr + exit(1).
Command line arguments
Resolves after execution, process.exit() called
CLI command execution runtime using Wings routing system.
Architecture: Transform CLI args → Context → Router → terminal output. Same routes handle HTTP requests and CLI commands through unified abstractions.
Context Mapping:
Performance: Zero overhead abstraction—direct Node.js I/O primitives. Async stdin reading supports interactive patterns without blocking.
Example