Skip to content

Readme #22

@KSemenenko

Description

@KSemenenko

Write nice readme base on this info

I'll help you design a comprehensive technical solution for your AI CLI tools UI service. Let me provide an Architecture Decision Record (ADR) style document with high-level features and technical solutions.

Architecture Decision Record: AI CLI Tools Web UI Service

1. Executive Summary

Building a web-based UI service that provides unified access to multiple AI coding CLI tools (Claude Code, Gemini, Codex) with integrated file system navigation, git operations, and terminal access through Blazor Server-side application.

2. Core Technical Decisions

2.1 CLI Process Management in C#

Decision: Use System.Diagnostics.Process with CliWrap library

Options Evaluated:

  • Raw Process Class: Direct but complex for advanced scenarios
  • CliWrap: Fluent API, better streaming support, cancellation tokens
  • MedallionShell: Good but less maintained
  • ProcessX: Modern but less mature

Recommendation:

Primary: CliWrap (https://github.com/Tyrrrz/CliWrap)
Fallback: System.Diagnostics.Process with custom wrappers

Key Features Needed:

  • Async streaming of stdout/stderr
  • Interactive input handling
  • Process lifecycle management
  • Environment variable injection
  • Working directory control
  • Cancellation support

2.2 Terminal Emulation in Browser

Decision: Implement XTerm.js with SignalR backend

Components:

  • XTerm.js: Industry-standard terminal emulator for web
  • SignalR: Real-time bidirectional communication
  • PTY (Pseudo-Terminal): Use Pty.Net for proper terminal emulation

Architecture:

Browser (XTerm.js) <-> SignalR Hub <-> PTY Process <-> CLI Tools

2.3 File System Integration

Decision: Virtual File System abstraction with security boundaries

Components:

  • PhysicalFileProvider: ASP.NET Core's file system abstraction
  • Sandbox Mechanism: Restrict access to specific directories
  • File Watcher: Use FileSystemWatcher for real-time updates

3. High-Level Features & Components

3.1 Core Features Matrix

Feature | Technology | Priority | Complexity -- | -- | -- | -- Multi-CLI Management | Process Pool + Orleans Grains | P0 | High Terminal Emulation | XTerm.js + SignalR | P0 | High File Browser | Blazor Components + FileProvider | P0 | Medium Git Integration | LibGit2Sharp + Custom Diff Viewer | P1 | Medium AI Chat Interface | Semantic Kernel + Streaming | P0 | Medium Session Management | Orleans + ASP.NET Identity | P0 | Medium Command History | In-memory cache + persistence | P1 | Low Multi-tab Support | Blazor State Management | P1 | Medium Code Editor | Monaco Editor or CodeMirror | P2 | High Collaborative Sessions | Orleans + SignalR | P2 | High

8. Monitoring & Observability

  • OpenTelemetry for distributed tracing
  • Serilog for structured logging
  • Application Insights for performance metrics
  • Health checks for CLI tool availability
  • Custom metrics for command execution stats

9. Deployment Architecture

Aspire Composition:
- Blazor Server App (Main UI)
- Orleans Silo (Distributed processing)
- Redis (Session state, caching)
- PostgreSQL (User data, history)
- Seq/Elastic (Logging)

10. Success Metrics

  • Command execution latency < 100ms
  • Output streaming delay < 50ms
  • Support 100+ concurrent sessions
  • 99.9% uptime for self-hosted deployments
  • File operations < 200ms for directories with 1000+ files

This architecture provides a solid foundation for your AI CLI tools UI service. The key is to start with the MVP focusing on reliable CLI execution and output streaming, then progressively add features like git integration and multi-tool support.

And

AI Code Assistant Web UI - Design Brief

Project Overview

A responsive web interface for remote control of AI coding assistants (Claude Code, Gemini, etc.) running on your home computer. Access from any device (phone, tablet, laptop) to monitor code generation progress, review changes, and issue new commands. Think of it as a "remote control" for your AI pair programmer.

Core Value: Never miss what your AI is doing - check progress during coffee breaks, commute, or from the couch.

Screen Architecture

1. Dashboard (Home)

Purpose: Quick status overview of all active AI sessions

Must Have:

  • Active sessions cards (show: AI tool name, current task, elapsed time, status indicator)
  • Recent files changed list (last 10 with timestamps)
  • Quick action buttons: "New Session", "View Output", "Git Status"
  • System health indicator (CPU/Memory usage)
  • Live activity feed (scrolling log of AI actions)

Why: Users need immediate awareness of what's happening without diving into details.

2. Terminal Screen

Purpose: Primary interaction with AI tools - see output and send commands

Must Have:

  • Full-screen terminal emulator (black background, colored output)
  • Tool selector dropdown (Claude/Gemini/etc.)
  • Command input bar (bottom, always visible)
  • Split view toggle (terminal + file changes)
  • Copy button for code blocks
  • Stream status indicator (green=streaming, yellow=waiting, red=error)
  • Mobile: Collapsible keyboard with common commands shortcuts

Why: Core functionality - users spend most time here watching AI work and giving instructions.

3. File Explorer + Diff Viewer

Purpose: See what files AI modified and review changes

Must Have:

  • Left panel: File tree (highlight changed files in yellow, new in green)
  • Right panel: Diff viewer (before/after or unified view toggle)
  • Top bar: "Accept All", "Reject", "Accept Selected" buttons
  • Change summary ("+50 lines, -10 lines, 3 files")
  • Search box for finding files
  • Mobile: Swipeable panels instead of split view

Why: Users need to review AI changes before accepting them - trust but verify.

4. Chat Interface

Purpose: Natural language interaction with AI about the code

Must Have:

  • Chat messages list (user messages right, AI left)
  • Code blocks with syntax highlighting
  • "Apply Suggestion" button on AI code responses
  • File attachment button (reference existing files)
  • Context indicator (shows which files AI is looking at)
  • Voice input button (mobile)
  • Quick prompts chips ("Explain this", "Fix errors", "Add tests")

Why: Sometimes easier to discuss changes than write commands.

5. Git Control Panel

Purpose: Commit changes and manage version control

Must Have:

  • Staged/unstaged files lists
  • Commit message input
  • Diff preview for selected file
  • Branch selector
  • Quick actions: "Commit", "Push", "Stash", "Reset"
  • Commit history (last 10 with messages)
  • Mobile: Simplified view with essential actions only

Why: Complete the development cycle without switching tools.

Mobile-First Considerations

Navigation:

  • Bottom tab bar (Dashboard, Terminal, Files, Chat, Git)
  • Swipe gestures between screens
  • Floating action button for "New Command"

Responsive Behaviors:

  • Terminal: Landscape mode recommended indicator
  • Font size adjustment slider
  • Touch-friendly buttons (min 44px)
  • Long-press for context menus
  • Pull-to-refresh for status updates

Visual Design Principles

Theme: Dark mode default (easier on eyes during long sessions)

  • Background: #0d1117
  • Terminal: #000000
  • Accent: #58a6ff (links, buttons)
  • Success: #3fb950
  • Warning: #d29922
  • Error: #f85149

Typography:

  • Terminal: JetBrains Mono or Cascadia Code
  • UI: Inter or system font
  • Code blocks: Consistent with terminal font

Key Interactions

  1. Quick Command: Floating button → Type command → See immediate output
  2. Review Flow: Notification → File Explorer → Diff View → Accept/Reject
  3. Monitor Mode: Dashboard cards auto-update every 2 seconds
  4. Emergency Stop: Red button always visible to kill current process

Success Metrics

  • Load terminal in <2 seconds
  • Stream output with <100ms delay
  • Support 10+ terminal tabs
  • Work smoothly on 4G connection
  • Readable on 5" phone screen

This design prioritizes real-time monitoring and control, optimizing for the "check in quickly" use case while providing full functionality when needed.

And check code base to be correct about current state,and check issues .

And after this, I need you to create action for release pipeline. GitHub release, list issues, contributed and so on must be include. And artifacts you know what to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions