From f7222b0f6ced9396e49f6b2be4f1d701eb3ec070 Mon Sep 17 00:00:00 2001 From: Augustin Date: Tue, 21 Apr 2026 22:02:09 +0200 Subject: [PATCH] docs: rewrite README and CHANGELOG for desktop app mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update README to reflect TUI removal and new React desktop UI with API backend, i18n, themes, and keyboard layout support. Fix duplicate v0.2.1 entries in CHANGELOG and add [Unreleased] section for recent desktop/i18n/theme changes. πŸ’˜ Generated with Crush Assisted-by: GLM-5.1 via Crush --- CHANGELOG.md | 91 +++++++++++---------------- README.md | 174 +++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 171 insertions(+), 94 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02ceea1..da7a432 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,33 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [Unreleased] + +### Added + +- **Desktop mode**: React 19 web UI served locally, auto-opens in browser. Frontend embedded in Go binary via `go:embed`. +- **API backend**: 15 REST endpoints (`/api/info`, `/api/system`, `/api/tools`, `/api/config`, `/api/providers`, `/api/skills`, `/api/lsp`, `/api/mcp`, `/api/updates`, `/api/scan`, `/api/install`, `/api/terminal`, `/api/mcp/configure`, `/api/preferences`). +- **i18n**: Full FR/EN translation system with keyboard layout awareness (AZERTY, QWERTY, QWERTZ). Preferences synced to backend. +- **Themes**: 4 built-in themes (Cyberpunk Red, Cyberpunk Pink, Midnight Blue, Matrix Green) with 30+ CSS custom properties applied at runtime. +- **Desktop flags**: `--port=PORT` to specify port, `--no-open` to skip browser auto-open. +- **SPA routing**: Frontend handles client-side routing via catch-all fallback. +- **CI**: Frontend build step (`npm ci && npm run build`) added to all 3 CI pipelines. + +### Changed + +- **Default mode**: `muyue` now launches the desktop web app instead of the TUI. The TUI has been removed entirely. +- **Single binary**: `cmd/muyue-desktop` merged into `cmd/muyue`. Only one binary needed. +- **Frontend**: Moved from `cmd/muyue-desktop/frontend/` to `web/` and embedded via `web/embed.go`. +- **Go module**: Dependencies cleaned up β€” removed indirect TUI-related packages. +- **Makefile**: `build` target now runs `frontend` (npm build) automatically. Added `dev-desktop` target for Vite dev server. + +### Removed + +- **TUI**: All `internal/tui/` code removed (model, views, handlers, animations, terminal, styles). +- **`cmd/muyue-desktop/`**: Separate desktop binary removed; merged into main binary. + ## v0.2.1 -### Changes since v0.2.1 - -- feat: complete TUI redesign with cyberpunk theme (#1) (cb8e3d0) - ### Downloads | Platform | File | @@ -21,47 +42,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). | Windows x86_64 | [muyue-windows-amd64.zip](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-windows-amd64.zip) | | Windows ARM64 | [muyue-windows-arm64.zip](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-windows-arm64.zip) | -### Install - -**Linux (x86_64)** -```bash -curl -sL https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-linux-amd64.tar.gz | tar xz -chmod +x muyue-linux-amd64 -sudo mv muyue-linux-amd64 /usr/local/bin/muyue -``` - -**macOS (Apple Silicon)** -```bash -curl -sL https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-darwin-arm64.tar.gz | tar xz -chmod +x muyue-darwin-arm64 -sudo mv muyue-darwin-arm64 /usr/local/bin/muyue -``` - -**Windows (x86_64)** -```powershell -Invoke-WebRequest -Uri "https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-windows-amd64.zip" -OutFile "muyue.zip" -Expand-Archive -Path "muyue.zip" -DestinationPath "." -Move-Item muyue-windows-amd64.exe C:\Windows\muyue.exe -``` - - -## v0.2.1 - ### Changes since v0.2.0 +- feat: complete TUI redesign with cyberpunk theme (#1) (cb8e3d0) - chore: bump version to 0.2.1, update README for TUI redesign (22fb282) -### Downloads - -| Platform | File | -|----------|------| -| Linux x86_64 | [muyue-linux-amd64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-linux-amd64.tar.gz) | -| Linux ARM64 | [muyue-linux-arm64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-linux-arm64.tar.gz) | -| macOS Intel | [muyue-darwin-amd64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-darwin-amd64.tar.gz) | -| macOS Apple Silicon | [muyue-darwin-arm64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-darwin-arm64.tar.gz) | -| Windows x86_64 | [muyue-windows-amd64.zip](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-windows-amd64.zip) | -| Windows ARM64 | [muyue-windows-arm64.zip](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.1/muyue-windows-arm64.zip) | - ### Install **Linux (x86_64)** @@ -85,9 +70,19 @@ Expand-Archive -Path "muyue.zip" -DestinationPath "." Move-Item muyue-windows-amd64.exe C:\Windows\muyue.exe ``` - ## v0.2.0 +### Downloads + +| Platform | File | +|----------|------| +| Linux x86_64 | [muyue-linux-amd64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-linux-amd64.tar.gz) | +| Linux ARM64 | [muyue-linux-arm64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-linux-arm64.tar.gz) | +| macOS Intel | [muyue-darwin-amd64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-darwin-amd64.tar.gz) | +| macOS Apple Silicon | [muyue-darwin-arm64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-darwin-arm64.tar.gz) | +| Windows x86_64 | [muyue-windows-amd64.zip](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-windows-amd64.zip) | +| Windows ARM64 | [muyue-windows-arm64.zip](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-windows-arm64.zip) | + ### Changes since start - refactor: redesign TUI with 4 tabs, red/rose theme, split layouts (035e923) @@ -121,17 +116,6 @@ Move-Item muyue-windows-amd64.exe C:\Windows\muyue.exe - ci: fix Gitea Actions - native checkout + auto-release on push (78c7239) - ci: migrate workflows to Gitea Actions with self-hosted runner (811a9aa) -### Downloads - -| Platform | File | -|----------|------| -| Linux x86_64 | [muyue-linux-amd64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-linux-amd64.tar.gz) | -| Linux ARM64 | [muyue-linux-arm64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-linux-arm64.tar.gz) | -| macOS Intel | [muyue-darwin-amd64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-darwin-amd64.tar.gz) | -| macOS Apple Silicon | [muyue-darwin-arm64.tar.gz](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-darwin-arm64.tar.gz) | -| Windows x86_64 | [muyue-windows-amd64.zip](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-windows-amd64.zip) | -| Windows ARM64 | [muyue-windows-arm64.zip](https://gitea.legion-muyue.fr/Muyue/MuyueWorkspace/releases/download/v0.2.0/muyue-windows-arm64.zip) | - ### Install **Linux (x86_64)** @@ -155,7 +139,6 @@ Expand-Archive -Path "muyue.zip" -DestinationPath "." Move-Item muyue-windows-amd64.exe C:\Windows\muyue.exe ``` - ## [0.2.0] - 2026-04-20 ### Added diff --git a/README.md b/README.md index a2ac5aa..3f63b7d 100644 --- a/README.md +++ b/README.md @@ -4,25 +4,30 @@ AI-powered development environment assistant by **La LΓ©gion de Muyue**. ## What it does -`muyue` is a single binary that transforms your entire development environment: +`muyue` is a single binary (frontend embedded) that transforms your entire development environment: +- **Desktop app** β€” React web UI served locally, auto-opens in your browser - **Scans** your system for tools, runtimes, and configs - **Installs** missing tools automatically (Crush, Claude Code, BMAD, Starship, runtimes...) - **Updates** everything in the background - **Profiles** you on first run to personalize the experience -- **Unifies** control of Crush and Claude Code from one TUI +- **Unifies** control of Crush and Claude Code from one interface - **Orchestrates** AI agents via MiniMax M2.7 -- **Customizes** your terminal prompt (branch, commits, language, etc.) - **Configures** MCP servers, LSPs, and skills automatically -- **Previews** HTML/visual outputs in your browser +- **i18n** β€” Full FR/EN support with keyboard layout awareness (AZERTY, QWERTY, QWERTZ) +- **4 themes** β€” Cyberpunk Red, Cyberpunk Pink, Midnight Blue, Matrix Green ## Tech Stack -- **Go** β€” single binary, no dependencies -- **Charm** β€” Bubble Tea, Lip Gloss, Huh (TUI, styling, forms) -- **Starship** β€” terminal prompt customization -- **MiniMax M2.7** β€” AI orchestration -- **BMAD-METHOD** β€” structured development workflows +| Layer | Technology | +|-------|-----------| +| **Backend** | Go 1.24 β€” single binary, no runtime dependencies | +| **Frontend** | React 19, Vite 8 β€” embedded via `go:embed` | +| **Styling** | CSS custom properties, 4 built-in themes | +| **i18n** | Custom FR/EN system with keyboard layout awareness | +| **CLI** | Charm (Bubble Tea, Huh) β€” for setup wizard, profiler, and CLI commands | +| **AI** | MiniMax M2.7 β€” orchestration | +| **CI/CD** | Gitea Actions β€” Go + Node build, multi-platform releases | ## Install @@ -37,10 +42,14 @@ make build make install-local ``` +The frontend is built automatically during `make build` (runs `npm ci && npm run build` in `web/`). + ## Usage ```bash -muyue # Start interactive TUI +muyue # Launch desktop app (opens browser) +muyue --port=8080 # Launch on a specific port +muyue --no-open # Launch without opening the browser muyue scan # Scan system muyue install # Install missing tools muyue update # Check and apply updates @@ -76,55 +85,116 @@ muyue skills deploy # Deploy skills to Crush and Claude Code muyue skills delete # Delete a skill ``` -## TUI β€” 4 Tabs +## Desktop App β€” 4 Tabs -The TUI is organized into 4 tabs with a red/rose theme (`#E8364F` β†’ `#FF6B8A`): +The web UI is organized into 4 tabs with a cyberpunk dark theme. Navigate with `Ctrl+1` through `Ctrl+4`. -### β—‰ Dashboard +### β–  Dashboard -System overview: installed tools with status, active agents, updates, LSP/MCP/daemon status, and quick actions (install, update, scan). +System overview with sub-tabs: +- **Tools** β€” installed/missing tools with status badges and version info +- **Notifications** β€” activity log with colored severity +- **Workflows** β€” quick actions (install missing, check updates, rescan, configure MCP) -### β—ˆ Studio +### ⟨⟩ Studio -Central AI chat with a collapsible sidebar (`Ctrl+S`) containing 3 panels: +AI chat interface with a sidebar containing 3 panels: -| Panel | Shortcut | Description | -|-------|----------|-------------| -| **Chat** | `1` | AI conversation, `/plan ` to start workflows | -| **Agents** | `2` | Start/stop Crush and Claude Code agents | -| **Workflows** | `3` | Planβ†’Execute workflow controls (approve, reject, next step) | +| Panel | Description | +|-------|-------------| +| **Chat** | AI conversation, `/plan ` to start workflows | +| **Agents** | Status of Crush and Claude Code agents | +| **Workflows** | Planβ†’Execute workflow controls | -### β–Ά Shell +### $ Shell -Split-view terminal with an AI assistant panel (`Ctrl+A` to toggle). The AI knows your system and suggests commands you can easily copy into the terminal. +Split-view: terminal emulator on the left (sends commands to the Go backend), collapsible AI assistant panel on the right. Full command history with `↑`/`↓` navigation. ### βš™ Config -Profile, API providers, terminal/starship settings, BMAD, and skills β€” displayed in a two-column layout. +Two-column profile settings: +- **Profile** β€” name, pseudo, email, editor, shell, default AI, languages +- **AI Providers** β€” active provider, API key status, model info +- **Theme** β€” 4 swatches (Cyberpunk Red, Cyberpunk Pink, Midnight Blue, Matrix Green) +- **Language** β€” FR/EN with keyboard layout selection (AZERTY, QWERTY, QWERTZ) +- **Skills** β€” installed skills list ### Keyboard Shortcuts | Key | Context | Action | |-----|---------|--------| -| `Ctrl+T` | Global | Open tab switcher | -| `Ctrl+S` | Studio | Toggle sidebar | -| `Ctrl+A` | Shell | Toggle AI assistant panel | -| `Ctrl+C` | Global | Quit confirmation | -| `i` | Dashboard | Install missing tools | -| `u` | Dashboard | Check for updates | -| `s` | Dashboard | Rescan system | -| `1` `2` `3` | Studio sidebar | Switch panels (Chat/Agents/Workflows) | -| `a` | Workflow | Approve plan | -| `r` | Workflow | Reject plan | -| `g` | Workflow | Generate plan | -| `n` | Workflow | Next step | -| `x` | Workflow | Cancel workflow | +| `Ctrl+1` | Global | Dashboard tab | +| `Ctrl+2` | Global | Studio tab | +| `Ctrl+3` | Global | Shell tab | +| `Ctrl+4` | Global | Config tab | +| `Enter` | Studio | Send message | +| `Shift+Enter` | Studio | New line | +| `Enter` | Shell | Run command | +| `↑`/`↓` | Shell | Command history | + +## API Endpoints + +The Go backend serves 15 REST endpoints under `/api/`: + +| Endpoint | Method | Description | +|----------|--------|-------------| +| `/api/info` | GET | App name, version, author | +| `/api/system` | GET | OS, arch, platform info | +| `/api/tools` | GET | Tool scan results | +| `/api/config` | GET | Profile, terminal, BMAD config | +| `/api/providers` | GET | AI provider list | +| `/api/skills` | GET | Installed skills | +| `/api/lsp` | GET | LSP server scan | +| `/api/mcp` | GET | MCP server scan | +| `/api/updates` | GET | Update check results | +| `/api/scan` | POST | Trigger system rescan | +| `/api/install` | POST | Install tools `{"tools": [...]}` | +| `/api/terminal` | POST | Execute command `{"command": "...", "cwd": "..."}` | +| `/api/mcp/configure` | POST | Configure MCP servers | +| `/api/preferences` | PUT | Save language/keyboard preferences | + +## Project Structure + +``` +. +β”œβ”€β”€ cmd/muyue/main.go # CLI entry point + command routing +β”œβ”€β”€ internal/ +β”‚ β”œβ”€β”€ api/ # HTTP server + handlers (15 endpoints) +β”‚ β”œβ”€β”€ config/ # YAML config + XDG paths +β”‚ β”œβ”€β”€ daemon/ # Background daemon +β”‚ β”œβ”€β”€ desktop/ # Desktop mode (HTTP server + SPA) +β”‚ β”œβ”€β”€ installer/ # Tool installation logic +β”‚ β”œβ”€β”€ lsp/ # LSP server scan + install +β”‚ β”œβ”€β”€ mcp/ # MCP server configuration +β”‚ β”œβ”€β”€ orchestrator/ # AI agent orchestration +β”‚ β”œβ”€β”€ platform/ # Cross-platform abstractions +β”‚ β”œβ”€β”€ preview/ # HTML preview server +β”‚ β”œβ”€β”€ profiler/ # First-run setup wizard +β”‚ β”œβ”€β”€ proxy/ # AI proxy agents +β”‚ β”œβ”€β”€ scanner/ # System tool/runtime scanner +β”‚ β”œβ”€β”€ secret/ # AES-256-GCM key encryption +β”‚ β”œβ”€β”€ skills/ # Skills management (CRUD, deploy, AI-generate) +β”‚ β”œβ”€β”€ updater/ # Tool auto-updater +β”‚ β”œβ”€β”€ version/ # Version constants +β”‚ └── workflow/ # Planβ†’Execute workflow engine +β”œβ”€β”€ web/ # Frontend (React 19 + Vite) +β”‚ β”œβ”€β”€ embed.go # go:embed dist/ +β”‚ β”œβ”€β”€ src/ +β”‚ β”‚ β”œβ”€β”€ api/client.js # API client +β”‚ β”‚ β”œβ”€β”€ components/ # App, Dashboard, Studio, Shell, Config +β”‚ β”‚ β”œβ”€β”€ i18n/ # FR/EN translations + keyboard layouts +β”‚ β”‚ β”œβ”€β”€ styles/global.css # Full CSS theme system +β”‚ β”‚ └── themes/index.js # 4 themes with CSS variable injection +β”‚ └── vite.config.js # Vite + dev proxy to :8095 +β”œβ”€β”€ .gitea/workflows/ # CI/CD (PR check, beta, stable) +└── Makefile # build, test, lint, cross-compile +``` ## Configuration Config stored at `$XDG_CONFIG_HOME/muyue/config.yaml` (defaults to `~/.config/muyue/config.yaml`). -API keys are encrypted at rest using AES-GCM with a machine-local key stored in `~/.muyue_key`. +API keys are encrypted at rest using AES-256-GCM with a machine-local key stored in `~/.muyue_key`. First run launches an interactive profiling wizard that: 1. Asks your name, pseudo, email @@ -133,17 +203,39 @@ First run launches an interactive profiling wizard that: 4. Scans your system 5. Installs missing tools +## Themes + +4 built-in themes, selectable from the Config tab: + +| Theme | Accent Color | +|-------|-------------| +| Cyberpunk Red | `#FF0033` | +| Cyberpunk Pink | `#FF1A8C` | +| Midnight Blue | `#0088FF` | +| Matrix Green | `#00FF41` | + +Themes are applied via CSS custom properties injected at runtime. All colors (30+ variables) adapt automatically. + +## i18n & Keyboard Layouts + +- **Languages**: FranΓ§ais, English +- **Keyboard layouts**: AZERTY (fr-FR), QWERTY (en-US), QWERTZ (de-DE) +- Keyboard layout affects displayed shortcuts in the status bar (e.g., `Ctrl+&-Γ©-"-'` on AZERTY vs `Ctrl+1-4` on QWERTY) +- Preferences saved to backend and synced across sessions + ## Security -- API keys are encrypted at rest (AES-256-GCM) with a per-machine key +- API keys encrypted at rest (AES-256-GCM) with a per-machine key - Config files use restrictive permissions (0600) - MCP config files use restrictive permissions (0600) -- Integrated terminal blocks dangerous commands (rm -rf /, mkfs, fork bombs, etc.) +- Terminal API executes commands via shell β€” only accessible on localhost ## Cross-Platform Built for Linux (primary), macOS, and Windows. WSL supported. +Single binary includes both CLI and embedded web frontend. + ## Contributing β€” GitFlow Workflow This project uses a **lightweight GitFlow** with 2 permanent branches and conventional commits. @@ -179,6 +271,8 @@ hotfix/xxx ──PR (squash)──▢ main (+ backport develop) | `ci-develop.yml` | Push to `develop` | vet + test + build all platforms + create beta release | | `ci-main.yml` | Push to `main` | vet + test + build all platforms + update CHANGELOG.md + create stable release | +All CI pipelines build the frontend (`npm ci && npm run build`) before Go vet/test/build. + ### Step-by-step: contribute a feature ```bash