Skip to content

Commit d466ca7

Browse files
author
Ubuntu
committed
docs: Document CLI app and server architecture (PR aj47#988)
1 parent b188ae8 commit d466ca7

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

CLAUDE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ pnpm install # Install dependencies (must use pnpm)
1010
pnpm build-rs # Build Rust keyboard binary (required before dev)
1111
pnpm dev # Start Electron app in dev mode
1212

13+
# CLI Development (NEW - PR #988)
14+
cd apps/cli && bun run src/index.ts # Run CLI in embedded mode
15+
cd apps/cli && bun run src/index.ts --debug # Run with verbose logging
16+
cd packages/server && pnpm dev # Run server standalone
17+
1318
# Testing
1419
pnpm test # Run all tests (vitest)
1520
pnpm --filter @speakmcp/desktop test:run # Run desktop tests once
@@ -46,7 +51,9 @@ REMOTE_DEBUGGING_PORT=9222 pnpm dev -- -d
4651

4752
- `apps/desktop/` - Electron desktop app (main package)
4853
- `apps/mobile/` - React Native/Expo mobile app
54+
- `apps/cli/` - Terminal-based TUI client (NEW - see PR #988)
4955
- `packages/shared/` - Shared types, colors, and utilities used by both apps
56+
- `packages/server/` - Standalone MCP server with SSE streaming (NEW - see PR #988)
5057

5158
### Desktop App Architecture
5259

@@ -73,6 +80,40 @@ REMOTE_DEBUGGING_PORT=9222 pnpm dev -- -d
7380
- Native keyboard monitoring and text injection
7481
- Built separately via `pnpm build-rs`
7582

83+
### CLI App Architecture (NEW - PR #988)
84+
85+
**Terminal TUI Client** (`apps/cli/`):
86+
- Standalone terminal-based client with full feature parity to desktop app
87+
- Supports three connection modes:
88+
1. **Embedded Server** (default): Runs `@speakmcp/server` in-process
89+
2. **External Server**: Connects to remote server via `--url`
90+
3. **Auto-discover**: Probes default ports (3210, 3211, 3212, 8080)
91+
- Cloudflare tunnel support with QR code rendering
92+
- Full keyboard shortcuts and interactive settings
93+
- Built with OpenTUI framework
94+
95+
**Standalone Server** (`packages/server/`):
96+
- Fastify-based MCP server with OpenAI-compatible SSE streaming
97+
- Library exports: `@speakmcp/server/server` and `@speakmcp/server/config`
98+
- Cloudflare tunnel integration for remote access
99+
- Dual build: CLI entry (with shebang) + library exports
100+
101+
### CLI Quick Commands
102+
103+
```bash
104+
# Embedded mode (recommended - one command)
105+
cd apps/cli && bun run src/index.ts
106+
107+
# With debug logging
108+
cd apps/cli && bun run src/index.ts --debug
109+
110+
# External server mode
111+
cd apps/cli && bun run src/index.ts --url http://localhost:3210 --api-key <key>
112+
113+
# Custom port
114+
cd apps/cli && bun run src/index.ts --port 3211 --no-server
115+
```
116+
76117
### IPC Communication
77118

78119
Uses `@egoist/tipc` for type-safe IPC between main and renderer:

0 commit comments

Comments
 (0)