You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The configuration docs under packages/web/src/content/docs/ (config.mdx and cli.mdx) were carried over from the OpenCode fork and were never migrated to the MiMoCode names. They instruct users to set environment variables, create directories, and reference a $schema URL that the current code does not honor — so a user following these docs is silently ignored.
I hit this while building a cross-platform MCP/hook adapter that has to write a config file MiMoCode will actually read: I reverse-engineered the real names from source (flag.ts / config/paths.ts / shared/global.ts) and found they disagree with the published docs. An integrator (or any user) reading the docs would reasonably set OPENCODE_CONFIG or drop files in ~/.config/opencode/ and get nothing.
Evidence — docs say OpenCode (verified on main):
packages/web/src/content/docs/config.mdx:
L3 / L6 / L12: prose still says "Using the OpenCode JSON config" / "configure OpenCode".
L16: jsonc title="opencode.jsonc" with "$schema": "https://opencode.ai/config.json".
L47: Global config (~/.config/opencode/opencode.json).
L127–L131 and L140–L150: document OPENCODE_CONFIG and OPENCODE_CONFIG_DIR.
packages/web/src/content/docs/cli.mdx: still describes the opencode binary and OpenCode paths throughout (e.g. L3 "OpenCode CLI options", L122 ~/.local/share/opencode/auth.json).
The committed example also points at the foreign schema — .mimocode/mimocode.jsonc L2: "$schema": "https://opencode.ai/config.json".
Evidence — the code only honors MiMoCode names (verified on main):
packages/opencode/src/flag/flag.ts: defines MIMOCODE_CONFIG (L44), MIMOCODE_CONFIG_CONTENT (L45), MIMOCODE_CONFIG_DIR (L157), MIMOCODE_HOME (L160), MIMOCODE_DISABLE_PROJECT_CONFIG (L151). There is noOPENCODE_CONFIG / OPENCODE_CONFIG_CONTENT / OPENCODE_CONFIG_DIR reader / alias in config resolution.
packages/shared/src/global.ts: const APP = "mimocode" (L6); resolveMimocodeHome() resolves the four base dirs from $MIMOCODE_HOME or XDG ~/.config/mimocode.
packages/opencode/src/config/paths.ts: directories() scans .mimocode dirs (targets [".mimocode"], L31 & L37) plus the global config dir — never .opencode.
Net effect: a user who follows config.mdx and sets OPENCODE_CONFIG, creates ~/.config/opencode/opencode.json, or puts overrides in a .opencode/ directory gets all of it silently ignored, because the runtime reads MIMOCODE_* / ~/.config/mimocode/ / .mimocode/ exclusively.
Proposed fix
Migrate the OpenCode names to MiMoCode in config.mdx and cli.mdx (and ideally the locale mirrors under the same dirs):
Update the committed .mimocode/mimocode.jsonc$schema too.
This is consistent with the in-progress rebrand work (e.g. #1147/#1148 for the package README, #144 for SECURITY.md, #135 for the site $schema), none of which touch these two config docs.
I verified every code name above against flag.ts / config/paths.ts / shared/global.ts on main. I'm happy to open the PR if a maintainer confirms the canonical MiMoCode $schema URL to point at.
Steps to reproduce
Follow config.mdx and set a custom config via the documented env var: export OPENCODE_CONFIG=/tmp/my-config.json (or create ~/.config/opencode/opencode.json, or a project .opencode/ directory).
Start MiMoCode.
Observe the config is ignored. Setting MIMOCODE_CONFIG (or using ~/.config/mimocode/mimocode.json / .mimocode/) is what actually takes effect.
MiMoCode version
Reproduced against current main.
Operating System
Verified by source inspection; path/env resolution is OS-independent (XDG / $MIMOCODE_HOME).
Description
The configuration docs under
packages/web/src/content/docs/(config.mdxandcli.mdx) were carried over from the OpenCode fork and were never migrated to the MiMoCode names. They instruct users to set environment variables, create directories, and reference a$schemaURL that the current code does not honor — so a user following these docs is silently ignored.I hit this while building a cross-platform MCP/hook adapter that has to write a config file MiMoCode will actually read: I reverse-engineered the real names from source (
flag.ts/config/paths.ts/shared/global.ts) and found they disagree with the published docs. An integrator (or any user) reading the docs would reasonably setOPENCODE_CONFIGor drop files in~/.config/opencode/and get nothing.Evidence — docs say OpenCode (verified on
main):packages/web/src/content/docs/config.mdx:jsonc title="opencode.jsonc"with"$schema": "https://opencode.ai/config.json".Global config (~/.config/opencode/opencode.json).Custom config (OPENCODE_CONFIG env var)..opencode directories.Inline config (OPENCODE_CONFIG_CONTENT env var).OPENCODE_CONFIGandOPENCODE_CONFIG_DIR.packages/web/src/content/docs/cli.mdx: still describes theopencodebinary and OpenCode paths throughout (e.g. L3 "OpenCode CLI options", L122~/.local/share/opencode/auth.json).The committed example also points at the foreign schema —
.mimocode/mimocode.jsoncL2:"$schema": "https://opencode.ai/config.json".Evidence — the code only honors MiMoCode names (verified on
main):packages/opencode/src/flag/flag.ts: definesMIMOCODE_CONFIG(L44),MIMOCODE_CONFIG_CONTENT(L45),MIMOCODE_CONFIG_DIR(L157),MIMOCODE_HOME(L160),MIMOCODE_DISABLE_PROJECT_CONFIG(L151). There is noOPENCODE_CONFIG/OPENCODE_CONFIG_CONTENT/OPENCODE_CONFIG_DIRreader / alias in config resolution.packages/shared/src/global.ts:const APP = "mimocode"(L6);resolveMimocodeHome()resolves the four base dirs from$MIMOCODE_HOMEor XDG~/.config/mimocode.packages/opencode/src/config/paths.ts:directories()scans.mimocodedirs (targets[".mimocode"], L31 & L37) plus the global config dir — never.opencode.Net effect: a user who follows config.mdx and sets
OPENCODE_CONFIG, creates~/.config/opencode/opencode.json, or puts overrides in a.opencode/directory gets all of it silently ignored, because the runtime readsMIMOCODE_*/~/.config/mimocode//.mimocode/exclusively.Proposed fix
Migrate the OpenCode names to MiMoCode in
config.mdxandcli.mdx(and ideally the locale mirrors under the same dirs):OPENCODE_CONFIG→MIMOCODE_CONFIG,OPENCODE_CONFIG_CONTENT→MIMOCODE_CONFIG_CONTENT,OPENCODE_CONFIG_DIR→MIMOCODE_CONFIG_DIR.~/.config/opencode/opencode.json→~/.config/mimocode/mimocode.json;.opencodedirectories →.mimocode.$schemaand theopencode.jsonccode-fence title → the MiMoCode schema /mimocode.jsonc(this is the same wrongopencode.ai/config.jsonURL tracked for the live site in [Bug] Invalid $schema URL (returns 404) in MiMo Code configuration #135)..mimocode/mimocode.jsonc$schematoo.This is consistent with the in-progress rebrand work (e.g. #1147/#1148 for the package README, #144 for SECURITY.md, #135 for the site
$schema), none of which touch these two config docs.I verified every code name above against
flag.ts/config/paths.ts/shared/global.tsonmain. I'm happy to open the PR if a maintainer confirms the canonical MiMoCode$schemaURL to point at.Steps to reproduce
config.mdxand set a custom config via the documented env var:export OPENCODE_CONFIG=/tmp/my-config.json(or create~/.config/opencode/opencode.json, or a project.opencode/directory).MIMOCODE_CONFIG(or using~/.config/mimocode/mimocode.json/.mimocode/) is what actually takes effect.MiMoCode version
Reproduced against current
main.Operating System
Verified by source inspection; path/env resolution is OS-independent (XDG /
$MIMOCODE_HOME).