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