MoonshotAI / MoonshotAI/kimi-code

Proposal: official desktop app (Electron) — embedded engine + official Web UI

Open
#2,955 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Summary

I built a working desktop application for Kimi Code — kimi-desktop — and I'd like to propose contributing it upstream as apps/kimi-desktop in this monorepo.

Kimi Code today ships a CLI/TUI, a VS Code extension, and a local web UI (kimi web). There is no desktop app. This project fills that gap without forking anything: the app embeds agent-core-v2 + kap-server in-process and serves the official dist-web bundle, so the UI and the engine stay 100% official and update with the monorepo.

What it is

An Electron shell (same architectural recipe as other agent desktop apps) whose main process:

  • boots startServer() from @moonshot-ai/kap-server in-process (127.0.0.1, stable port 58627 with adoption of an already-running compatible server)
  • serves the official dist-web assets (via symlinks — byte-identical UI to kimi web)
  • loads the UI in a BrowserWindow with native macOS chrome (hiddenInset, theme-following, drag regions)

Because the engine is the real one, everything under ~/.kimi-code is honored natively: permissions, hooks, MCP servers, plugins, custom agents, skills, SYSTEM.md — verified item by item against a live instance.

What it adds beyond kimi web
Feature Detail
Native window chrome ChatGPT-style unified title bar, proper traffic-light clearance (open + collapsed sidebar)
Watchdog + auto-recovery 5s health probe, same-port restart in ~13s, reconnect banner, persistent log (~/.kimi-code/logs/kimi-desktop.log)
Native settings tabs New tabs inside the official Settings modal — Hooks (full editor writing config.toml via the config API), MCP (always-populated server list + live status), Plugins (enable/disable/marketplace), AGENTS.md (editor with save/reload) — none of these exist in any Kimi surface today, including the TUI
French-language layer replyStyleGuide host identity for French replies + French native screens (the bridge to real i18n once the web UI ships more locales)
Maintenance model

The entire contribution is one self-contained directory (apps/kimi-desktop/, ~2.5k lines): no changes to existing packages, no forked code, no vendored UI. Upgrading = rebuild with the workspace. The only coupling points are documented: startServer options, the #token= auth fragment, the window.kimiDesktop native-shell contract the bundle already exposes, and CSS class names used for chrome injection (flagged as fragile-by-nature).

Status
  • Working on macOS (dev mode): streaming, subagent progress, session list live updates all verified
  • Committed on a feature branch, Conventional Commits, zero changes outside apps/kimi-desktop/
  • Not yet done: packaging (dmg + notarization + auto-update), Windows/Linux testing, tests
Questions for maintainers
  1. Is a desktop app in scope for this repo, and is apps/kimi-desktop the right home?
  2. The Web UI source lives in a separate repo (code-app); our native settings tabs are injected into dist-web. Would you rather see these contributed to the Web UI itself (vue-i18n en/zh exist — a French catalog + real tabs would be cleaner)?
  3. The bundle's window.kimiDesktop contract already expects a native shell (onMenuAction, update status…). Was a desktop shell already planned? Happy to align with it rather than duplicate.
  4. Any hard requirements (signing/notarization, tests, CI) before a PR would be considered?
Screenshots

Screenshots (main window, Settings modal with the 4 native tabs, Hooks editor, MCP tab, AGENTS.md tab) will be attached in a comment below.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed apps/kimi-desktop directory and its integration points with startServer(), dist-web, and the window.kimiDesktop contract. Confirm the maintainers’ scope and requirements before proceeding, then assess packaging, Windows/Linux testing, and tests. Done means the desktop app’s acceptance criteria, packaging, and validation requirements are agreed and met.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.