From 51b80205aed95026826734b419991f35859b2ad2 Mon Sep 17 00:00:00 2001 From: Hermes Backup Date: Thu, 11 Jun 2026 13:29:53 +0800 Subject: [PATCH] refactor: rebrand OpenCode to MiMo Code in user-facing strings (#8, #14, #19, #29) --- CONTRIBUTING.md | 24 +++++++++---------- LICENSE | 2 +- packages/desktop/README.md | 4 ++-- packages/desktop/electron-builder.config.ts | 14 +++++------ packages/desktop/package.json | 2 +- packages/desktop/src/main/menu.ts | 4 ++-- packages/opencode/src/acp/agent.ts | 6 ++--- packages/opencode/src/mcp/oauth-callback.ts | 6 ++--- packages/opencode/src/mcp/oauth-provider.ts | 2 +- packages/opencode/src/plugin/codex.ts | 6 ++--- packages/sdk/js/src/v2/client.ts | 2 +- .../ui/src/assets/favicon/site.webmanifest | 4 ++-- packages/ui/src/components/favicon.tsx | 2 +- .../ui/src/theme/desktop-theme.schema.json | 4 ++-- 14 files changed, 41 insertions(+), 41 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 84dbd4be..d9f0b041 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to OpenCode +# Contributing to MiMo Code -We want to make it easy for you to contribute to OpenCode. Here are the most common type of changes that get merged: +We want to make it easy for you to contribute to MiMo Code. Here are the most common type of changes that get merged: - Bug fixes - Additional LSPs / Formatters @@ -29,7 +29,7 @@ Want to take on an issue? Leave a comment and a maintainer may assign it to you New providers shouldn't require many if ANY code changes, but if you want to add support for a new provider first make a PR to: https://github.com/anomalyco/models.dev -## Developing OpenCode +## Developing MiMo Code - Requirements: Bun 1.3+ - Install dependencies and start the dev server from the repo root: @@ -41,13 +41,13 @@ https://github.com/anomalyco/models.dev ### Running against a different directory -By default, `bun dev` runs OpenCode in the `packages/opencode` directory. To run it against a different directory or repository: +By default, `bun dev` runs MiMo Code in the `packages/opencode` directory. To run it against a different directory or repository: ```bash bun dev ``` -To run OpenCode in the root of the opencode repo itself: +To run MiMo Code in the root of the repo itself: ```bash bun dev . @@ -70,7 +70,7 @@ Then run it with: Replace `` with your platform (e.g., `darwin-arm64`, `linux-x64`). - Core pieces: - - `packages/opencode`: OpenCode core business logic & server. + - `packages/opencode`: MiMo Code core business logic & server. - `packages/opencode/src/cli/cmd/tui/`: The TUI code, written in SolidJS with [opentui](https://github.com/sst/opentui) - `packages/app`: The shared web UI components, written in SolidJS - `packages/desktop`: The native desktop app, built with Tauri (wraps `packages/app`) @@ -96,7 +96,7 @@ opencode # Start TUI in specific directory ### Running the API Server -To start the OpenCode headless API server: +To start the MiMo Code headless API server: ```bash bun dev serve @@ -112,7 +112,7 @@ bun dev serve --port 8080 To test UI changes during development: -1. **First, start the OpenCode server** (see [Running the API Server](#running-the-api-server) section above) +1. **First, start the MiMo Code server** (see [Running the API Server](#running-the-api-server) section above) 2. **Then run the web app:** ```bash @@ -159,12 +159,12 @@ Please try to follow the [style guide](./AGENTS.md) Bun debugging is currently rough around the edges. We hope this guide helps you get set up and avoid some pain points. -The most reliable way to debug OpenCode is to run it manually in a terminal via `bun run --inspect= dev ...` and attach +The most reliable way to debug MiMo Code is to run it manually in a terminal via `bun run --inspect= dev ...` and attach your debugger via that URL. Other methods can result in breakpoints being mapped incorrectly, at least in VSCode (YMMV). Caveats: -- If you want to run the OpenCode TUI and have breakpoints triggered in the server code, you might need to run `bun dev spawn` instead of +- If you want to run the MiMo Code TUI and have breakpoints triggered in the server code, you might need to run `bun dev spawn` instead of the usual `bun dev`. This is because `bun dev` runs the server in a worker thread and breakpoints might not work there. - If `spawn` does not work for you, you can debug the server separately: - Debug server: `bun run --inspect=ws://localhost:6499/ --cwd packages/opencode ./src/index.ts serve --port 4096`, @@ -183,7 +183,7 @@ If you use VSCode, you can use our example configurations [.vscode/settings.exam Some debug methods that can be problematic: - Debug configurations with `"request": "launch"` can have breakpoints incorrectly mapped and thus unusable -- The same problem arises when running OpenCode in the VSCode `JavaScript Debug Terminal` +- The same problem arises when running MiMo Code in the VSCode `JavaScript Debug Terminal` With that said, you may want to try these methods, as they might work for you. @@ -262,7 +262,7 @@ These are not strictly enforced, they are just general guidelines: ## Feature Requests -For net-new functionality, start with a design conversation. Open an issue describing the problem, your proposed approach (optional), and why it belongs in OpenCode. The core team will help decide whether it should move forward; please wait for that approval instead of opening a feature PR directly. +For net-new functionality, start with a design conversation. Open an issue describing the problem, your proposed approach (optional), and why it belongs in MiMo Code. The core team will help decide whether it should move forward; please wait for that approval instead of opening a feature PR directly. ## Trust & Vouch System diff --git a/LICENSE b/LICENSE index 83621ff2..02d68184 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ MIT License Copyright (c) 2026 MiMo Code, Xiaomi Corporation -Copyright (c) 2025 opencode +Copyright (c) 2025 OpenCode Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/desktop/README.md b/packages/desktop/README.md index 6dd9a202..70f52481 100644 --- a/packages/desktop/README.md +++ b/packages/desktop/README.md @@ -1,6 +1,6 @@ -# OpenCode Desktop +# MiMo Code Desktop -The OpenCode Desktop app, built with Electron. +The MiMo Code Desktop app, built with Electron. ## Development diff --git a/packages/desktop/electron-builder.config.ts b/packages/desktop/electron-builder.config.ts index 99e8c961..0d313c44 100644 --- a/packages/desktop/electron-builder.config.ts +++ b/packages/desktop/electron-builder.config.ts @@ -54,7 +54,7 @@ const getBase = (): Configuration => ({ sign: true, }, protocols: { - name: "OpenCode", + name: "MiMo Code", schemes: ["opencode"], }, win: { @@ -84,8 +84,8 @@ function getConfig() { case "dev": { return { ...base, - appId: "ai.opencode.desktop.dev", - productName: "OpenCode Dev", + appId: "ai.mimocode.desktop.dev", + productName: "MiMo Code Dev", rpm: { packageName: "opencode-dev" }, } } @@ -93,8 +93,8 @@ function getConfig() { return { ...base, appId: "ai.opencode.desktop.beta", - productName: "OpenCode Beta", - protocols: { name: "OpenCode Beta", schemes: ["opencode"] }, + productName: "MiMo Code Beta", + protocols: { name: "MiMo Code Beta", schemes: ["opencode"] }, publish: { provider: "github", owner: "anomalyco", repo: "opencode-beta", channel: "latest" }, rpm: { packageName: "opencode-beta" }, } @@ -103,8 +103,8 @@ function getConfig() { return { ...base, appId: "ai.opencode.desktop", - productName: "OpenCode", - protocols: { name: "OpenCode", schemes: ["opencode"] }, + productName: "MiMo Code", + protocols: { name: "MiMo Code", schemes: ["opencode"] }, publish: { provider: "github", owner: "anomalyco", repo: "opencode", channel: "latest" }, rpm: { packageName: "opencode" }, } diff --git a/packages/desktop/package.json b/packages/desktop/package.json index df5b9352..8604d378 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -6,7 +6,7 @@ "license": "MIT", "homepage": "https://opencode.ai", "author": { - "name": "OpenCode", + "name": "MiMo Code", "email": "hello@opencode.ai" }, "scripts": { diff --git a/packages/desktop/src/main/menu.ts b/packages/desktop/src/main/menu.ts index 0d9a697f..25e9b201 100644 --- a/packages/desktop/src/main/menu.ts +++ b/packages/desktop/src/main/menu.ts @@ -15,7 +15,7 @@ export function createMenu(deps: Deps) { const template: Electron.MenuItemConstructorOptions[] = [ { - label: "OpenCode", + label: "MiMo Code", submenu: [ { role: "about" }, { @@ -115,7 +115,7 @@ export function createMenu(deps: Deps) { { label: "Help", submenu: [ - { label: "OpenCode Documentation", click: () => shell.openExternal("https://opencode.ai/docs") }, + { label: "MiMo Code Documentation", click: () => shell.openExternal("https://opencode.ai/docs") }, { label: "Support Forum", click: () => shell.openExternal("https://discord.com/invite/opencode") }, { type: "separator" }, { type: "separator" }, diff --git a/packages/opencode/src/acp/agent.ts b/packages/opencode/src/acp/agent.ts index a3f2ebd0..a79af929 100644 --- a/packages/opencode/src/acp/agent.ts +++ b/packages/opencode/src/acp/agent.ts @@ -506,7 +506,7 @@ export class Agent implements ACPAgent { const authMethod: AuthMethod = { description: "Run `opencode auth login` in the terminal", - name: "Login with opencode", + name: "Login with MiMo Code", id: "opencode-login", } @@ -516,7 +516,7 @@ export class Agent implements ACPAgent { "terminal-auth": { command: "opencode", args: ["auth", "login"], - label: "OpenCode Login", + label: "MiMo Code Login", }, } } @@ -541,7 +541,7 @@ export class Agent implements ACPAgent { }, authMethods: [authMethod], agentInfo: { - name: "OpenCode", + name: "MiMo Code", version: InstallationVersion, }, } diff --git a/packages/opencode/src/mcp/oauth-callback.ts b/packages/opencode/src/mcp/oauth-callback.ts index fbb43d39..fa078ad8 100644 --- a/packages/opencode/src/mcp/oauth-callback.ts +++ b/packages/opencode/src/mcp/oauth-callback.ts @@ -12,7 +12,7 @@ let currentPath = OAUTH_CALLBACK_PATH const HTML_SUCCESS = ` - OpenCode - Authorization Successful + MiMo Code - Authorization Successful