@@ -8,45 +8,17 @@ alwaysApply: true
88
99This directory contains the implementation of the `spotlight` CLI commands.
1010
11- ## User-Facing Commands
11+ ## Commands
1212
13- The `spotlight` CLI is invoked by users from the terminal:
14-
15- | Command | Description | Implementation |
16- |---------|-------------|----------------|
13+ | Command | Description | Handler |
14+ |---------|-------------|---------|
1715| `spotlight run <cmd>` | Wraps and runs an application with Spotlight | `run.ts` |
18- | `spotlight` / `spotlight server` | Starts the sidecar server | `server.ts` |
16+ | `spotlight` / `spotlight server` | Starts the sidecar server (default) | `server.ts` |
1917| `spotlight tail [types]` | Streams events to terminal | `tail.ts` |
2018| `spotlight mcp` | Starts MCP server for AI assistants | `mcp.ts` |
2119| `spotlight help` | Shows help message | `help.ts` |
2220
23- ## Architecture
24-
25- ```
26- cli/
27- ├── help.ts # spotlight help
28- ├── mcp.ts # spotlight mcp
29- ├── run.ts # spotlight run <command>
30- ├── server.ts # spotlight / spotlight server
31- └── tail.ts # spotlight tail [types]
32- ```
33-
34- Entry point is `../cli.ts` which handles argument parsing and command routing.
35-
36- ## Command Routing
37-
38- Commands are registered in `CLI_CMD_MAP` in `../cli.ts`:
39-
40- ```typescript
41- export const CLI_CMD_MAP = new Map<string | undefined, CLIHandler>([
42- ['help', showHelp],
43- ['mcp', mcp],
44- ['tail', tail],
45- ['run', run],
46- ['server', server],
47- [undefined, server], // Default: no command = server
48- ]);
49- ```
21+ Entry point is `../cli.ts` which handles argument parsing and routes via `CLI_CMD_MAP`.
5022
5123## CLI Handler Pattern
5224
0 commit comments