Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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 <directory>
```

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 .
Expand All @@ -70,7 +70,7 @@ Then run it with:
Replace `<platform>` 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`)
Expand All @@ -96,7 +96,7 @@ opencode <directory> # 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
Expand All @@ -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
Expand Down Expand Up @@ -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=<url> dev ...` and attach
The most reliable way to debug MiMo Code is to run it manually in a terminal via `bun run --inspect=<url> 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`,
Expand All @@ -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.

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
14 changes: 7 additions & 7 deletions packages/desktop/electron-builder.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const getBase = (): Configuration => ({
sign: true,
},
protocols: {
name: "OpenCode",
name: "MiMo Code",
schemes: ["opencode"],
},
win: {
Expand Down Expand Up @@ -84,17 +84,17 @@ 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" },
}
}
case "beta": {
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" },
}
Expand All @@ -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" },
}
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"homepage": "https://opencode.ai",
"author": {
"name": "OpenCode",
"name": "MiMo Code",
"email": "hello@opencode.ai"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/src/main/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function createMenu(deps: Deps) {

const template: Electron.MenuItemConstructorOptions[] = [
{
label: "OpenCode",
label: "MiMo Code",
submenu: [
{ role: "about" },
{
Expand Down Expand Up @@ -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" },
Expand Down
6 changes: 3 additions & 3 deletions packages/opencode/src/acp/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}

Expand All @@ -516,7 +516,7 @@ export class Agent implements ACPAgent {
"terminal-auth": {
command: "opencode",
args: ["auth", "login"],
label: "OpenCode Login",
label: "MiMo Code Login",
},
}
}
Expand All @@ -541,7 +541,7 @@ export class Agent implements ACPAgent {
},
authMethods: [authMethod],
agentInfo: {
name: "OpenCode",
name: "MiMo Code",
version: InstallationVersion,
},
}
Expand Down
6 changes: 3 additions & 3 deletions packages/opencode/src/mcp/oauth-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let currentPath = OAUTH_CALLBACK_PATH
const HTML_SUCCESS = `<!DOCTYPE html>
<html>
<head>
<title>OpenCode - Authorization Successful</title>
<title>MiMo Code - Authorization Successful</title>
<style>
body { font-family: system-ui, -apple-system, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #1a1a2e; color: #eee; }
.container { text-align: center; padding: 2rem; }
Expand All @@ -23,7 +23,7 @@ const HTML_SUCCESS = `<!DOCTYPE html>
<body>
<div class="container">
<h1>Authorization Successful</h1>
<p>You can close this window and return to OpenCode.</p>
<p>You can close this window and return to MiMo Code.</p>
</div>
<script>setTimeout(() => window.close(), 2000);</script>
</body>
Expand All @@ -32,7 +32,7 @@ const HTML_SUCCESS = `<!DOCTYPE html>
const HTML_ERROR = (error: string) => `<!DOCTYPE html>
<html>
<head>
<title>OpenCode - Authorization Failed</title>
<title>MiMo Code - Authorization Failed</title>
<style>
body { font-family: system-ui, -apple-system, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #1a1a2e; color: #eee; }
.container { text-align: center; padding: 2rem; }
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/mcp/oauth-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class McpOAuthProvider implements OAuthClientProvider {
get clientMetadata(): OAuthClientMetadata {
return {
redirect_uris: [this.redirectUrl],
client_name: "OpenCode",
client_name: "MiMo Code",
client_uri: "https://opencode.ai",
grant_types: ["authorization_code", "refresh_token"],
response_types: ["code"],
Expand Down
6 changes: 3 additions & 3 deletions packages/opencode/src/plugin/codex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async function refreshAccessToken(refreshToken: string): Promise<TokenResponse>
const HTML_SUCCESS = `<!doctype html>
<html>
<head>
<title>OpenCode - Codex Authorization Successful</title>
<title>MiMo Code - Codex Authorization Successful</title>
<style>
body {
font-family:
Expand Down Expand Up @@ -178,7 +178,7 @@ const HTML_SUCCESS = `<!doctype html>
<body>
<div class="container">
<h1>Authorization Successful</h1>
<p>You can close this window and return to OpenCode.</p>
<p>You can close this window and return to MiMo Code.</p>
</div>
<script>
setTimeout(() => window.close(), 2000)
Expand All @@ -189,7 +189,7 @@ const HTML_SUCCESS = `<!doctype html>
const HTML_ERROR = (error: string) => `<!doctype html>
<html>
<head>
<title>OpenCode - Codex Authorization Failed</title>
<title>MiMo Code - Codex Authorization Failed</title>
<style>
body {
font-family:
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/js/src/v2/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function createOpencodeClient(config?: Config & { directory?: string; exp
client.interceptors.response.use((response) => {
const contentType = response.headers.get("content-type")
if (contentType === "text/html")
throw new Error("Request is not supported by this version of OpenCode Server (Server responded with text/html)")
throw new Error("Request is not supported by this version of MiMo Code Server (Server responded with text/html)")

return response
})
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/assets/favicon/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OpenCode",
"short_name": "OpenCode",
"name": "MiMo Code",
"short_name": "MiMo Code",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/favicon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Favicon = () => {
<Link rel="shortcut icon" href="/favicon-v3.ico" />
<Link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-v3.png" />
<Link rel="manifest" href="/site.webmanifest" />
<Meta name="apple-mobile-web-app-title" content="OpenCode" />
<Meta name="apple-mobile-web-app-title" content="MiMo Code" />
</>
)
}
4 changes: 2 additions & 2 deletions packages/ui/src/theme/desktop-theme.schema.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://opencode.ai/desktop-theme.json",
"title": "OpenCode Desktop Theme",
"description": "A theme definition for the OpenCode desktop application",
"title": "MiMo Code Desktop Theme",
"description": "A theme definition for the MiMo Code desktop application",
"type": "object",
"required": ["name", "id", "light", "dark"],
"properties": {
Expand Down