$ show ttnear/Clarc
Clarc is a native macOS desktop client for the Claude Code CLI, built with SwiftUI and Swift 6. It provides a project-centric GUI that wraps the terminal-based Claude Code agent, making it accessible to users who prefer a graphical interface. The application manages multiple projects (local folders or GitHub repositories), each with per-project session history, file browser, Git status, embedded terminal, memo pad, and a full-featured chat interface. It integrates deeply with the Claude Code CLI by spawning it as a subprocess, reading/writing its JSONL session files, and rendering tool calls (Bash, Edit, Write, MultiEdit, AskUserQuestion) with rich UI components like diffs and collapsible transient groups. Architecturally, Clarc is a standard macOS app with a monolithic AppState at the center, supported by several service modules (PersistenceService, GitHubService, ClaudeService, RateLimitService, MarketplaceService) and a reusable Swift Package (ClarcChatKit) for chat UI components. The codebase demonstrates solid craftsmanship: clean localization in 6 languages, Sparkle-based auto-updating, well-structured test coverage for core parsing logic, and thoughtful patterns for session normalization and sidecar metadata. The chat UI package is particularly well-isolated and could be reused in other SwiftUI chat applications. The application does not contain any data science or research components; it is purely a client application. However, it does handle complex data flows around session persistence and CLI integration, showing careful engineering for edge cases like in-flight streaming, legacy migration, and tool result pairing.
The LLM identified 4 files worth highlighting for reuse:
Validates and sanitizes bash commands before execution, handling metacharacters, operators (||, |, &&), and variable assignments. Returns either a safe command or a failure reason. Isolated component (imports only Foundation) that could be extracted into any macOS app needing to run user-provided shell commands safely.
Manages SSH key generation (ed25519), writes ~/.ssh/config entries, sets owner-only permissions, and handles key existence checks. Demonstrates careful system-level programming with Security framework and FileManager. Could be reused in any macOS tool that needs to programmatically configure SSH access (e.g., Git client, remote server manager).
A multi-language syntax highlighter tokenizer that supports Swift, JavaScript, Python, Ruby, shell, SQL, and several other languages using static keyword lists and simple state tracking. Generates attributed strings for rendering. Lightweight and isolated (Foundation only), it could be extracted as a standalone syntax highlighting component for any SwiftUI or AppKit text view.
A complete SwiftUI chat UI package containing input bar with attachments and slash commands, message bubbles with markdown rendering, file diff views, typing indicators, tool result displays, and shortcut management. Designed as an independent Swift package with its own localization resources. Represents a production-quality, reusable chat interface that could power any SwiftUI-based AI assistant or messaging application with minimal adaptation.