# CxIDE A native macOS code editor built with SwiftUI, featuring a C++17 static analysis engine and an embedded 56-tool MCP coding agent. ## Features - **SwiftUI Editor** — Syntax highlighting, line numbers, breakpoints, multi-tab, minimap - **C++ Analysis Engine** — Tokenizer, symbol extraction, cyclomatic complexity, maintainability index, 16 configurable lint rules - **MCP Agent (56 tools)** — File ops, code intelligence, Git, Xcode, diagnostics, terminal, autopilot — all in-process, no server needed - **Command Palette** — Cmd+Shift+P with fuzzy search across 22+ commands - **Dark Theme** — Multiple themes with live cycling (Cmd+K) - **Sandbox Mode** — Safe code execution and agent read-only restriction ## Requirements | Tool | Version | | ---- | ------- | | macOS | 14.0+ (Sonoma) | | Swift | 5.9+ | | Xcode | 15.0+ | | Git | 2.x | ## Quick Start ```bash git clone CxIDE && cd CxIDE # First-time setup (validates toolchain, installs git hooks) ./scripts/setup.sh # Build C++ engine + agent ./scripts/build.sh # Open in Xcode open CxIDE.xcodeproj ``` ## Scripts ```bash ./scripts/build.sh # Build (debug) ./scripts/build.sh release # Build (release) ./scripts/test.sh # Run tests & validation ./scripts/lint.sh # Static analysis ./scripts/clean.sh # Clean build artifacts ./scripts/setup.sh # First-time project setup ``` ## Architecture ```text SwiftIDEApp └─ IDEContainerView ├─ Activity Bar + Sidebar (Explorer, Search, Snippets, Debug, Agent, Settings) ├─ CodeEditorView + Minimap └─ ConsoleView (Console, Problems, Output, Debug, Agent Chat) EditorViewModel ├─ SwiftCodeEngine / SandboxedSwiftEngine ← code execution ├─ CppEngineController → SwiftEngineWrapper → CodeEngine (C++17) ← static analysis └─ AgentService → MCPServer → 56 tools (8 modules) ← AI agent ``` ## Agent Tools (56) | Category | Count | Examples | | -------- | ----- | ------- | | File Operations | 10 | file_read, file_write, file_search, file_tree | | Code Intelligence | 10 | code_explain, code_review, code_fix, code_test | | Git | 8 | git_status, git_diff, git_log, git_commit | | Xcode | 10 | xcode_build, xcode_test, xcode_analyze | | Diagnostics | 5 | diag_workspace, diag_lint, diag_complexity | | AutoPilot | 6 | autopilot_plan, autopilot_execute | | Project | 5 | project_detect, project_run, project_deps | | Terminal | 2 | terminal_exec, terminal_env | ## Keyboard Shortcuts | Action | Shortcut | | ------ | -------- | | Run Code | Cmd+Return | | Command Palette | Cmd+Shift+P | | Toggle Sidebar | Cmd+B | | New Tab | Cmd+N | | Find & Replace | Cmd+F | | Cycle Theme | Cmd+K | | Agent: Explain | Cmd+Shift+E | | Agent: Review | Cmd+Shift+R | ## Documentation - [docs/BUILD.md](docs/BUILD.md) — Build targets, C++ engine config, troubleshooting - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — Layer diagram, data flow, security model - [docs/DEVELOPER.md](docs/DEVELOPER.md) — Daily workflow, adding features, commit conventions - [docs/AGENT_TOOLS.md](docs/AGENT_TOOLS.md) — All 56 tools with usage examples ## License Proprietary. All rights reserved.