diff --git a/DIVERGENCES.md b/DIVERGENCES.md index 4058d0a70f..d68474a421 100644 --- a/DIVERGENCES.md +++ b/DIVERGENCES.md @@ -39,6 +39,7 @@ upstream maintainers — see README → Syncing with upstream for why and how. | `packages/tui/src/routes/session/permission.tsx`, `packages/opencode/src/cli/cmd/run/permission.shared.ts`, `packages/opencode/test/cli/run/permission.shared.test.ts`, `packages/tui/src/component/error-component.tsx`, `packages/opencode/src/cli/cmd/run/splash.ts` | Visible sentences/badges "OpenCode"/"opencode" → "CoDev Code"/"codev-code" (incl. the permission always-allow copy and its test expectations) | User-facing copy. | Keep our strings. | | `packages/opencode/src/installation/index.ts` | Updater detects/queries/installs `codev-code` (npm-family); GitHub fallback → quickbeard/codev-code | `codev-code upgrade` and the update notification target OUR npm package, never stock opencode. brew/choco/scoop probes never match (no such packages). | Keep our package names. | | `packages/opencode/src/config/config.ts` | `share` defaults to `"disabled"` when unset | Sharing publishes sessions to upstream's share service; internal users must opt in via config. | Keep our default block. | +| Config-file rename: `packages/opencode/src/config/{config,managed,tui-migrate}.ts`, `packages/core/src/config.ts`, `packages/opencode/src/plugin/install.ts`, `packages/opencode/src/cli/cmd/{mcp,plug,providers,error}.ts`, user-facing strings (`packages/{tui,app}` dialogs/tips/i18n, skill descriptions in `packages/core/src/plugin/skill.ts` + `packages/opencode/src/skill/index.ts`), bundled prompts (`customize-opencode.md`, `initialize.txt`), tests seeding config fixtures, docs (`packages/web/src/content/docs` en + es) | Config file `opencode.json(c)` → `codev.json(c)` everywhere (global, project walk-up, config dirs, managed); global `config.json` support and the legacy TOML `config` migration removed; managed config dir `/Library/Application Support/opencode`→`…/codev`, `/etc/opencode`→`/etc/codev`, `%ProgramData%\opencode`→`…\codev` | The fork's config surface uses the fork's name; hard rename, no legacy fallback. NOT renamed: the `$schema` URL `https://opencode.ai/config.json`, `OPENCODE_*` env vars, `@opencode-ai/*` packages, theme asset files named `opencode.json`, brew/scoop manifest URLs. | Keep our file names; take upstream's surrounding logic. Rename any new upstream `opencode.json`/global-`config.json` reference to `codev.json` (watch the not-renamed list). | | `packages/tui/src/component/dialog-provider.tsx`, `packages/tui/src/component/dialog-model.tsx`, `packages/opencode/src/cli/cmd/providers.ts` | Filter `opencode`/`opencode-go` out of provider pickers and the `/model` dialog (model list + Favorites/Recent; the model dialog's opencode-first sort became a plain name sort) | Upstream's hosted offerings (Zen/Go) are detours for gateway users. | Keep our filters. | | `packages/tui/src/component/prompt/index.tsx` | Gated the prompt footer's model/provider indicator on `useConnected()` (the shared "a real provider is configured" predicate) | Don't advertise the free hosted Zen default (e.g. "Big Pickle · OpenCode Zen") in the footer while nothing is configured — same rationale and predicate as `app.tsx`'s startup gate and the provider/model filters. A configured gateway/real provider, or a deliberately-authenticated opencode/opencode-go, still shows its model. | Keep the extra `Show` condition; take upstream's surrounding changes. | | `packages/app/index.html` | `` → "CoDev Code" | Web UI tab title. | Keep our title. | @@ -49,7 +50,7 @@ upstream maintainers — see README → Syncing with upstream for why and how. | `README.md` | Replaced with fork README | Fork identity, sync + divergence policy. | Keep ours entirely. | | `CONTRIBUTING.md`, `SECURITY.md` | Product-brand prose "OpenCode" → "CoDev Code"; built-CLI command examples `opencode …` → `codev …` | Docs people actually read should name the fork's product. Upstream issue/advisory links, `packages/opencode` paths, env vars, and build-output paths stay upstream. | Keep our strings; take upstream's structural changes. | | `STATS.md` | Deleted | Upstream's download-stats log; meaningless for the fork. | Keep deleted. | -| Test prose across `packages/*/test`, `packages/opencode/test/lib` | describe titles + comments naming the CLI command or product: `opencode <cmd>`/"opencode CLI"/"OpenCode" → `codev …`/"CoDev Code" (incl. help-snapshot keys/labels — regenerate the `.snap`, see the scriptName row). Functional names stay: `OPENCODE_*` env vars, `@opencode-ai/*`, `opencode.json`/`.opencode/` paths, provider id `opencode`, fixture APIs (`opencode.run`, `OpencodeCli`), auth method `opencode-login`, default username `opencode`, upstream issue refs, third-party names. | Test names/comments are read by people; identifiers are load-bearing. | Keep our prose; take upstream's test-logic changes. | +| Test prose across `packages/*/test`, `packages/opencode/test/lib` | describe titles + comments naming the CLI command or product: `opencode <cmd>`/"opencode CLI"/"OpenCode" → `codev …`/"CoDev Code" (incl. help-snapshot keys/labels — regenerate the `.snap`, see the scriptName row). Functional names stay: `OPENCODE_*` env vars, `@opencode-ai/*`, `.opencode/` paths, provider id `opencode`, fixture APIs (`opencode.run`, `OpencodeCli`), auth method `opencode-login`, default username `opencode`, upstream issue refs, third-party names. Config-file fixtures follow the config-file rename row (`codev.json`). | Test names/comments are read by people; identifiers are load-bearing. | Keep our prose; take upstream's test-logic changes. | | `README.*.md` (21 translations) | Deleted | Upstream marketing translations, irrelevant to the fork. | Keep deleted (`git rm` the upstream side of modify/delete conflicts). | | `screenshot-uk.png` | Deleted | Orphaned README-translation asset; referenced by nothing. | Keep deleted. | | `.github/TEAM_MEMBERS` | Deleted | Upstream's team roster. The five workflows that read it (pr-standards, pr-management, triage, duplicate-issues, compliance-close) fetch it from a `dev` branch this fork doesn't have, so they are already inert here. | Keep deleted. | @@ -59,7 +60,7 @@ upstream maintainers — see README → Syncing with upstream for why and how. | `packages/core/test/ripgrep.test.ts` | `120_000` timeout on both `it.live` tests | First use downloads + extracts the ripgrep binary; GitHub-hosted Windows runners blow bun's 5s default. | Keep our timeouts; take upstream's test changes. | | `packages/opencode/test/cli/run/run-process.test.ts`, `packages/opencode/test/cli/acp/lifecycle.test.ts`, `packages/opencode/test/server/httpapi-file.test.ts`, `packages/opencode/test/server/httpapi-sdk.test.ts` | Slow-runner headroom: unknown-model test `timeoutMs`/bound 15s → 30s (test timeout 60s); ACP stdin-EOF exit timeout 5s → 30s; file-search-index poll 5s → 120s with a 150s test timeout (the search-endpoints test pays ripgrep's first-use download on Windows runners, like ripgrep.test.ts) | Loaded GitHub-hosted runners spawn processes, fetch ripgrep, and build the lazy file index slower than upstream's Blacksmith runners; 5–30s budgets flake or fail outright. Hang regressions are still caught (a hang exceeds the bound; polls return as soon as ready). | Keep our numbers; take upstream's test changes. | | `packages/opencode/test/tool/external-directory.test.ts`, `packages/opencode/test/tool/read.test.ts` | Windows path-variant tests keep the drive letter in the `alt` form (drop the `.replace(/^[A-Za-z]:/, "")` step) | A drive-less path is drive-relative: it resolves against the CWD's drive (D: on GitHub-hosted Windows) while the temp dir lives on C:, so the file genuinely isn't there. Slash + case variants still exercise normalization. | Keep our `alt` construction; take upstream's test changes. | -| `packages/opencode/test/server/httpapi-exercise/environment.ts` | Exercise config/data dirs `config/opencode`,`data/opencode` → `…/codev-code`; seeds `config.json` with `{"share":"manual"}` | Follows the `global.ts` app-dir rename (row above); the fork's `share: "disabled"` default (config.ts row) would 500 the share/unshare scenarios, so the isolated environment opts back in (network stays stubbed by `OPENCODE_DISABLE_SHARE`). | Keep our dir names + seeded config; take upstream's surrounding changes. | +| `packages/opencode/test/server/httpapi-exercise/environment.ts` | Exercise config/data dirs `config/opencode`,`data/opencode` → `…/codev-code`; seeds `codev.json` with `{"share":"manual"}` | Follows the `global.ts` app-dir rename (row above); the fork's `share: "disabled"` default (config.ts row) would 500 the share/unshare scenarios, so the isolated environment opts back in (network stays stubbed by `OPENCODE_DISABLE_SHARE`). Seed file follows the config-file rename row (global `config.json` is no longer read). | Keep our dir names + seeded config; take upstream's surrounding changes. | | `sdks/vscode/package.json`, `sdks/vscode/README.md` | `description` "opencode for VS Code" → "CoDev Code for VS Code"; README title → "CoDev Code VS Code Extension" | Manifest branding. `name`, `displayName`, command IDs/titles and README body (which names actual UI elements) stay upstream — the fork doesn't publish this extension; revisit before shipping it. | Keep our description + title; take upstream's other fields/body. | | Locale dicts in `packages/{ui,app}/src/i18n/`, `packages/desktop/src/renderer/i18n/`, `packages/console/app/src/i18n/`, `packages/stats/app/src/i18n/`, `packages/web/src/content/i18n/`; translated docs dirs in `packages/web/src/content/docs/` | Deleted every locale except `en`/`es` (incl. `packages/app/src/i18n/parity.test.ts`) | Fork ships English + Spanish only. | Keep deleted (`git rm` the upstream side of modify/delete conflicts); also delete any locale files upstream adds. | | `packages/app/src/context/language.tsx`, `packages/app/src/entry.tsx`, `packages/desktop/src/renderer/i18n/index.ts`, `packages/console/app/src/i18n/index.ts`, `packages/console/app/src/lib/language.ts`, `packages/console/app/src/component/footer.tsx`, `packages/stats/app/src/i18n.ts`, `packages/web/src/i18n/locales.ts`, `packages/web/astro.config.mjs`, `packages/enterprise/src/app.tsx`, `packages/app/e2e/regression/session-timeline-locale-projection.spec.ts` | Locale registries trimmed to `en` + `es`: `Locale` types, LOCALES/LABEL/TAG/DOCS maps, dict loaders, accept-language matchers, starlight `locales` config; enterprise/entry `zh` special cases now use `es`; console footer always links Discord (Feishu was zh-only); e2e locale-projection spec tests `es` ("Explorado") instead of de/ar | Fork ships English + Spanish only. | Keep our trimmed lists; take upstream's structural changes and re-trim any new locale entries. | diff --git a/packages/app/src/components/status-popover-body.tsx b/packages/app/src/components/status-popover-body.tsx index 68a3f6b226..083fc2dac8 100644 --- a/packages/app/src/components/status-popover-body.tsx +++ b/packages/app/src/components/status-popover-body.tsx @@ -288,7 +288,7 @@ export function StatusPopoverBody(props: { shown: Accessor<boolean> }) { (sync().data.config.plugin ?? []).map((item) => (typeof item === "string" ? item : item[0])), ) const pluginCount = createMemo(() => plugins().length) - const pluginEmpty = createMemo(() => pluginEmptyMessage(language.t("dialog.plugins.empty"), "opencode.json")) + const pluginEmpty = createMemo(() => pluginEmptyMessage(language.t("dialog.plugins.empty"), "codev.json")) return ( <div class="flex items-center gap-1 w-[360px] rounded-xl shadow-[var(--shadow-lg-border-base)]"> diff --git a/packages/app/src/i18n/en.ts b/packages/app/src/i18n/en.ts index 9d122447a8..4c549ae792 100644 --- a/packages/app/src/i18n/en.ts +++ b/packages/app/src/i18n/en.ts @@ -312,7 +312,7 @@ export const dict = { "dialog.mcp.empty": "No MCPs configured", "dialog.lsp.empty": "LSPs auto-detected from file types", - "dialog.plugins.empty": "Plugins configured in opencode.json", + "dialog.plugins.empty": "Plugins configured in codev.json", "mcp.status.connected": "connected", "mcp.status.failed": "failed", @@ -586,7 +586,7 @@ export const dict = { "error.chain.responseBody": "Response body:\n{{body}}", "error.chain.didYouMean": "Did you mean: {{suggestions}}", "error.chain.modelNotFound": "Model not found: {{provider}}/{{model}}", - "error.chain.checkConfig": "Check your config (opencode.json) provider/model names", + "error.chain.checkConfig": "Check your config (codev.json) provider/model names", "error.chain.mcpFailed": 'MCP server "{{name}}" failed. Note, OpenCode does not support MCP authentication yet.', "error.chain.providerAuthFailed": "Provider authentication failed ({{provider}}): {{message}}", "error.chain.providerInitFailed": diff --git a/packages/app/src/i18n/es.ts b/packages/app/src/i18n/es.ts index 0610f2de00..00161914a6 100644 --- a/packages/app/src/i18n/es.ts +++ b/packages/app/src/i18n/es.ts @@ -311,7 +311,7 @@ export const dict = { "dialog.mcp.empty": "No hay MCPs configurados", "dialog.lsp.empty": "LSPs detectados automáticamente por tipo de archivo", - "dialog.plugins.empty": "Plugins configurados en opencode.json", + "dialog.plugins.empty": "Plugins configurados en codev.json", "mcp.status.connected": "conectado", "mcp.status.failed": "fallido", @@ -567,7 +567,7 @@ export const dict = { "error.chain.responseBody": "Cuerpo de la respuesta:\n{{body}}", "error.chain.didYouMean": "¿Quisiste decir: {{suggestions}}", "error.chain.modelNotFound": "Modelo no encontrado: {{provider}}/{{model}}", - "error.chain.checkConfig": "Comprueba los nombres de proveedor/modelo en tu configuración (opencode.json)", + "error.chain.checkConfig": "Comprueba los nombres de proveedor/modelo en tu configuración (codev.json)", "error.chain.mcpFailed": 'El servidor MCP "{{name}}" falló. Nota, OpenCode no soporta autenticación MCP todavía.', "error.chain.providerAuthFailed": "Autenticación de proveedor fallida ({{provider}}): {{message}}", "error.chain.providerInitFailed": diff --git a/packages/app/src/utils/server-errors.ts b/packages/app/src/utils/server-errors.ts index b34ae609ae..e22d78a8a9 100644 --- a/packages/app/src/utils/server-errors.ts +++ b/packages/app/src/utils/server-errors.ts @@ -98,7 +98,7 @@ function parseReadableProviderModelNotFoundError(errorInput: ProviderModelNotFou const m = errorInput.data.modelID.trim() const list = (errorInput.data.suggestions ?? []).map((v) => v.trim()).filter(Boolean) const body = tr(translator, "error.chain.modelNotFound", `Model not found: ${p}/${m}`, { provider: p, model: m }) - const tail = tr(translator, "error.chain.checkConfig", "Check your config (opencode.json) provider/model names") + const tail = tr(translator, "error.chain.checkConfig", "Check your config (codev.json) provider/model names") if (list.length) { const suggestions = list.slice(0, 5).join(", ") return [body, tr(translator, "error.chain.didYouMean", `Did you mean: ${suggestions}`, { suggestions }), tail].join( diff --git a/packages/codev-gateway/src/config-block.ts b/packages/codev-gateway/src/config-block.ts index df088e613d..dba5a73960 100644 --- a/packages/codev-gateway/src/config-block.ts +++ b/packages/codev-gateway/src/config-block.ts @@ -1,6 +1,6 @@ import { GATEWAY_COMPACT_RESERVED, GATEWAY_CONTEXT_WINDOW, GATEWAY_MAX_OUTPUT_TOKENS } from "./const" -// The exact opencode.json fragment the codev hub writes for CoDev Code (hub +// The exact codev.json fragment the codev hub writes for CoDev Code (hub // src/lib/configure.ts configureOpenCodeKind), so hub-managed and // self-configured installs are indistinguishable — including the hub's // `provider.aigateway` presence check that marks a config as CoDev-managed. diff --git a/packages/codev-gateway/src/const.ts b/packages/codev-gateway/src/const.ts index 247ff26f5a..50e990507c 100644 --- a/packages/codev-gateway/src/const.ts +++ b/packages/codev-gateway/src/const.ts @@ -10,7 +10,7 @@ export const CLIENT_ID = atob("bGl0ZWxsbS10ZXN0") // The self-hosted gateway model window and the compaction reserve derived from // firing auto-compaction at ~85% of it — identical to the hub's constants so a -// hub-written and an agent-written opencode.json agree byte-for-byte. +// hub-written and an agent-written codev.json agree byte-for-byte. export const GATEWAY_CONTEXT_WINDOW = 196608 export const GATEWAY_COMPACT_PCT = 85 export const GATEWAY_COMPACT_TRIGGER = Math.round(GATEWAY_CONTEXT_WINDOW * (GATEWAY_COMPACT_PCT / 100)) diff --git a/packages/codev-gateway/test/config-block.test.ts b/packages/codev-gateway/test/config-block.test.ts index 35821e854c..2abe6690ab 100644 --- a/packages/codev-gateway/test/config-block.test.ts +++ b/packages/codev-gateway/test/config-block.test.ts @@ -14,7 +14,7 @@ describe("normalizeGatewayBaseUrl", () => { }) describe("buildGatewayConfig", () => { - test("matches the hub-written opencode.json shape", () => { + test("matches the hub-written codev.json shape", () => { const config = buildGatewayConfig({ apiKey: "sk-test", baseUrl: "https://gw.test", diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index c76486968b..347daee6ee 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -139,7 +139,7 @@ const layer = Layer.effect( const global = yield* Global.Service const location = yield* Location.Service const policy = yield* Policy.Service - const names = ["opencode.json", "opencode.jsonc"] + const names = ["codev.json", "codev.jsonc"] const decodeOptions = { errors: "all", onExcessProperty: "ignore", propertyOrder: "original" } as const const decodeInfo = Schema.decodeUnknownOption(Info, decodeOptions) const decodeV1Info = Schema.decodeUnknownOption(ConfigV1.Info, decodeOptions) diff --git a/packages/core/src/plugin/command/initialize.txt b/packages/core/src/plugin/command/initialize.txt index 5fc073d61c..d6e662662f 100644 --- a/packages/core/src/plugin/command/initialize.txt +++ b/packages/core/src/plugin/command/initialize.txt @@ -12,7 +12,7 @@ Read the highest-value sources first: - build, test, lint, formatter, typecheck, and codegen config - CI workflows and pre-commit / task runner config - existing instruction files (`AGENTS.md`, `CLAUDE.md`, `.cursor/rules/`, `.cursorrules`, `.github/copilot-instructions.md`) -- repo-local OpenCode config such as `opencode.json` +- repo-local OpenCode config such as `codev.json` If architecture is still unclear after reading config and docs, inspect a small number of representative code files to find the real entrypoints, package boundaries, and execution flow. Prefer reading the files that explain how the system is wired together over random leaf files. @@ -56,7 +56,7 @@ Exclude: - long tutorials or exhaustive file trees - obvious language conventions - speculative claims or anything you could not verify -- content better stored in another file referenced via `opencode.json` `instructions` +- content better stored in another file referenced via `codev.json` `instructions` When in doubt, omit. diff --git a/packages/core/src/plugin/skill.ts b/packages/core/src/plugin/skill.ts index ea723dd89d..f1d0f46a25 100644 --- a/packages/core/src/plugin/skill.ts +++ b/packages/core/src/plugin/skill.ts @@ -20,7 +20,7 @@ export const Plugin = define({ skill: SkillV2.Info.make({ name: "customize-opencode", description: - "Use ONLY when the user is editing or creating opencode's own configuration: opencode.json, opencode.jsonc, files under .opencode/, or files under ~/.config/opencode/. Also use when creating or fixing opencode agents, subagents, commands, skills, plugins, MCP servers, or permission rules. Do not use for the user's own application code, or for any project that is not configuring opencode itself.", + "Use ONLY when the user is editing or creating opencode's own configuration: codev.json, codev.jsonc, files under .opencode/, or files under ~/.config/opencode/. Also use when creating or fixing opencode agents, subagents, commands, skills, plugins, MCP servers, or permission rules. Do not use for the user's own application code, or for any project that is not configuring opencode itself.", location: AbsolutePath.make("/builtin/customize-opencode.md"), content: CustomizeOpencodeContent, }), diff --git a/packages/core/src/plugin/skill/customize-opencode.md b/packages/core/src/plugin/skill/customize-opencode.md index 6932dbfd54..8c633fa437 100644 --- a/packages/core/src/plugin/skill/customize-opencode.md +++ b/packages/core/src/plugin/skill/customize-opencode.md @@ -23,14 +23,14 @@ shape before writing config, **fetch that URL and read the schema directly** rather than guessing. opencode hard-fails on invalid config, so the cost of a wrong shape is a broken startup. -Independently, every `opencode.json` should declare +Independently, every `codev.json` should declare `"$schema": "https://opencode.ai/config.json"` so the user's editor catches mistakes as they type. ## Applying changes Config is loaded once when opencode starts and is not hot-reloaded. After -saving changes to `opencode.json`, an agent file, a skill, a plugin, or any +saving changes to `codev.json`, an agent file, a skill, a plugin, or any other config-time file, **tell the user to quit and restart opencode** for the changes to take effect. The running session will keep using the already-loaded config until then. @@ -39,8 +39,8 @@ already-loaded config until then. | Scope | Path | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| Project config | `./opencode.json`, `./opencode.jsonc`, or `.opencode/opencode.json` (opencode walks up from the cwd to the worktree root) | -| Global config | `~/.config/opencode/opencode.json` (NOT `~/.opencode/`) | +| Project config | `./codev.json`, `./codev.jsonc`, or `.opencode/codev.json` (opencode walks up from the cwd to the worktree root) | +| Global config | `~/.config/opencode/codev.json` (NOT `~/.opencode/`) | | Project agents | `.opencode/agent/<name>.md` or `.opencode/agents/<name>.md` | | Global agents | `~/.config/opencode/agent(s)/<name>.md` | | Project commands | `.opencode/command/<name>.md` or `.opencode/commands/<name>.md` | @@ -50,9 +50,9 @@ already-loaded config until then. | External skills (auto-loaded) | `~/.claude/skills/<name>/SKILL.md`, `~/.agents/skills/<name>/SKILL.md` | Configs from each scope are deep-merged. Project overrides global. Unknown -top-level keys in `opencode.json` are rejected with `ConfigInvalidError`. +top-level keys in `codev.json` are rejected with `ConfigInvalidError`. -## opencode.json +## codev.json Every field is optional. @@ -225,7 +225,7 @@ Local `path` values may be relative to the declaring config, absolute, or use Two ways to define an agent. Use the file form for anything non-trivial. -### Inline (in `opencode.json`) +### Inline (in `codev.json`) ```json { @@ -425,7 +425,7 @@ the `plan` agent's permission ruleset (`edit: deny *`). When a user's config is broken and opencode won't start, these env vars help: -- `OPENCODE_DISABLE_PROJECT_CONFIG=1`: skip the project's local `opencode.json` +- `OPENCODE_DISABLE_PROJECT_CONFIG=1`: skip the project's local `codev.json` and start from globals only. Run from the project directory, opencode loads, the user edits the broken file, then they restart without the flag. - `OPENCODE_CONFIG=/path/to/file.json`: load an additional explicit config. @@ -444,7 +444,7 @@ When a user's config is broken and opencode won't start, these env vars help: `https://opencode.ai/config.json` and read the schema rather than guessing. - Preserve `$schema` and any existing fields the user did not ask to change. - For agent, command, skill, and plugin definitions, prefer creating new files - in the correct location over inlining everything in `opencode.json`. + in the correct location over inlining everything in `codev.json`. - If the user's existing config is malformed, point them at the env-var escape hatches above so they can edit from inside opencode without breaking their session. diff --git a/packages/core/test/config/config.test.ts b/packages/core/test/config/config.test.ts index c3c42cab30..6570089357 100644 --- a/packages/core/test/config/config.test.ts +++ b/packages/core/test/config/config.test.ts @@ -171,11 +171,11 @@ describe("Config", () => { yield* Effect.promise(() => Promise.all([ fs.writeFile( - path.join(tmp.path, "opencode.json"), + path.join(tmp.path, "codev.json"), JSON.stringify({ $schema: "base", providers: { base: provider } }), ), fs.writeFile( - path.join(tmp.path, "opencode.jsonc"), + path.join(tmp.path, "codev.jsonc"), `{ // Later global files override scalar fields while retaining providers. "$schema": "last", @@ -192,11 +192,11 @@ describe("Config", () => { expect(documents.map((document) => document.type)).toEqual(["document", "document"]) expect(documents.map((document) => document.info.$schema)).toEqual(["base", "last"]) expect(documents[0]).toBeInstanceOf(Config.Document) - expect(documents[0]?.path).toBe(path.join(tmp.path, "opencode.json")) + expect(documents[0]?.path).toBe(path.join(tmp.path, "codev.json")) expect(documents[1]?.info.providers?.last).toBeInstanceOf(ConfigProvider.Info) yield* Effect.promise(() => - fs.writeFile(path.join(tmp.path, "opencode.jsonc"), JSON.stringify({ $schema: "changed" })), + fs.writeFile(path.join(tmp.path, "codev.jsonc"), JSON.stringify({ $schema: "changed" })), ) expect( (yield* config.entries()) @@ -231,6 +231,31 @@ describe("Config", () => { ), ) + it.live("does not load legacy opencode.json files", () => + Effect.acquireRelease( + Effect.promise(() => tmpdir()), + (tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]()), + ).pipe( + Effect.flatMap((tmp) => + Effect.gen(function* () { + yield* Effect.promise(() => + fs.writeFile(path.join(tmp.path, "opencode.json"), JSON.stringify({ $schema: "legacy" })), + ) + yield* Effect.promise(() => + fs.writeFile(path.join(tmp.path, "opencode.jsonc"), JSON.stringify({ $schema: "legacy" })), + ) + + return yield* Effect.gen(function* () { + const config = yield* Config.Service + const documents = (yield* config.entries()).filter((entry) => entry.type === "document") + + expect(documents).toHaveLength(0) + }).pipe(Effect.provide(testLayer(tmp.path))) + }), + ), + ), + ) + it.live("accepts $schema metadata without writing it into config files", () => Effect.acquireRelease( Effect.promise(() => tmpdir()), @@ -238,7 +263,7 @@ describe("Config", () => { ).pipe( Effect.flatMap((tmp) => Effect.gen(function* () { - const file = path.join(tmp.path, "opencode.json") + const file = path.join(tmp.path, "codev.json") const contents = JSON.stringify({ shell: "/bin/zsh", experimental: { policies: [{ effect: "deny", action: "provider.use", resource: "openai" }] }, @@ -273,7 +298,7 @@ describe("Config", () => { Effect.gen(function* () { yield* Effect.promise(() => fs.writeFile( - path.join(tmp.path, "opencode.json"), + path.join(tmp.path, "codev.json"), JSON.stringify({ shell: "/bin/bash", model: "anthropic/claude", @@ -461,7 +486,7 @@ describe("Config", () => { Effect.gen(function* () { yield* Effect.promise(() => fs.writeFile( - path.join(tmp.path, "opencode.json"), + path.join(tmp.path, "codev.json"), JSON.stringify({ reference: { local: { path: "../library" }, @@ -497,7 +522,7 @@ describe("Config", () => { Effect.gen(function* () { yield* Effect.promise(() => fs.writeFile( - path.join(tmp.path, "opencode.json"), + path.join(tmp.path, "codev.json"), JSON.stringify({ shell: "/bin/zsh", default_agent: "reviewer", @@ -675,8 +700,8 @@ describe("Config", () => { Effect.gen(function* () { yield* Effect.promise(() => Promise.all([ - fs.writeFile(path.join(tmp.path, "opencode.json"), JSON.stringify({ $schema: "base" })), - fs.writeFile(path.join(tmp.path, "opencode.jsonc"), "{ invalid"), + fs.writeFile(path.join(tmp.path, "codev.json"), JSON.stringify({ $schema: "base" })), + fs.writeFile(path.join(tmp.path, "codev.jsonc"), "{ invalid"), ]), ) return yield* Effect.gen(function* () { @@ -701,13 +726,13 @@ describe("Config", () => { yield* Effect.promise(async () => { await fs.mkdir(global, { recursive: true }) await fs.writeFile( - path.join(global, "opencode.json"), + path.join(global, "codev.json"), JSON.stringify({ experimental: { policies: [{ effect: "deny", action: "provider.use", resource: "openai" }] }, }), ) await fs.writeFile( - path.join(tmp.path, "opencode.json"), + path.join(tmp.path, "codev.json"), JSON.stringify({ experimental: { policies: [{ effect: "allow", action: "provider.use", resource: "openai" }] }, }), @@ -741,14 +766,14 @@ describe("Config", () => { await fs.mkdir(path.join(root, ".opencode"), { recursive: true }) await fs.mkdir(path.join(directory, ".opencode"), { recursive: true }) await Promise.all([ - fs.writeFile(path.join(tmp.path, "opencode.json"), JSON.stringify({ $schema: "outside" })), - fs.writeFile(path.join(global, "opencode.json"), JSON.stringify({ $schema: "global" })), - fs.writeFile(path.join(root, "opencode.json"), JSON.stringify({ $schema: "root" })), - fs.writeFile(path.join(parent, "opencode.jsonc"), JSON.stringify({ $schema: "parent" })), - fs.writeFile(path.join(directory, "opencode.json"), JSON.stringify({ $schema: "directory" })), - fs.writeFile(path.join(root, ".opencode", "opencode.json"), JSON.stringify({ $schema: "root-dot" })), + fs.writeFile(path.join(tmp.path, "codev.json"), JSON.stringify({ $schema: "outside" })), + fs.writeFile(path.join(global, "codev.json"), JSON.stringify({ $schema: "global" })), + fs.writeFile(path.join(root, "codev.json"), JSON.stringify({ $schema: "root" })), + fs.writeFile(path.join(parent, "codev.jsonc"), JSON.stringify({ $schema: "parent" })), + fs.writeFile(path.join(directory, "codev.json"), JSON.stringify({ $schema: "directory" })), + fs.writeFile(path.join(root, ".opencode", "codev.json"), JSON.stringify({ $schema: "root-dot" })), fs.writeFile( - path.join(directory, ".opencode", "opencode.jsonc"), + path.join(directory, ".opencode", "codev.jsonc"), JSON.stringify({ $schema: "directory-dot" }), ), ]) diff --git a/packages/core/test/config/plugin.test.ts b/packages/core/test/config/plugin.test.ts index 2e134c55e1..a214a62220 100644 --- a/packages/core/test/config/plugin.test.ts +++ b/packages/core/test/config/plugin.test.ts @@ -25,7 +25,7 @@ describe("ConfigExternalPlugin", () => { const location = yield* Location.Service const npm = yield* Npm.Service const host = yield* PluginHost.make(plugins) - const document = path.join(import.meta.dir, "opencode.json") + const document = path.join(import.meta.dir, "codev.json") yield* ConfigExternalPlugin.Plugin.effect(host).pipe( Effect.provideService(PluginV2.Service, plugins), @@ -82,7 +82,7 @@ describe("ConfigExternalPlugin", () => { Effect.succeed([ new Config.Document({ type: "document", - path: path.join(import.meta.dir, "opencode.json"), + path: path.join(import.meta.dir, "codev.json"), info: decode({ plugins: [ { @@ -125,7 +125,7 @@ describe("ConfigExternalPlugin", () => { Effect.succeed([ new Config.Document({ type: "document", - path: path.join(import.meta.dir, "opencode.json"), + path: path.join(import.meta.dir, "codev.json"), info: decode({ plugins: [ "../plugin/fixtures/missing-plugin.ts", diff --git a/packages/core/test/location-layer.test.ts b/packages/core/test/location-layer.test.ts index e28e758c87..aa291d304e 100644 --- a/packages/core/test/location-layer.test.ts +++ b/packages/core/test/location-layer.test.ts @@ -78,7 +78,7 @@ describe("LocationServiceMap", () => { }) yield* Effect.promise(() => fs.writeFile( - path.join(blocked.path, "opencode.json"), + path.join(blocked.path, "codev.json"), JSON.stringify({ experimental: { policies: [{ effect: "deny", action: "provider.use", resource: "test" }] }, }), @@ -150,7 +150,7 @@ describe("LocationServiceMap", () => { const location = Location.Ref.make({ directory: AbsolutePath.make(dir.path) }) yield* Effect.promise(() => fs.writeFile( - path.join(dir.path, "opencode.json"), + path.join(dir.path, "codev.json"), JSON.stringify({ providers: { unavailable: { diff --git a/packages/opencode/specs/effect/errors.md b/packages/opencode/specs/effect/errors.md index fe526c2faa..a4d9a3e1b6 100644 --- a/packages/opencode/specs/effect/errors.md +++ b/packages/opencode/specs/effect/errors.md @@ -154,7 +154,7 @@ group identical rendered messages and list the affected request names once. For example: ```text -Configuration is invalid at /path/to/opencode.json +Configuration is invalid at /path/to/codev.json ↳ Expected object, got "not-object" provider.bad.options Affected startup requests: config.providers, provider.list, app.agents, config.get ``` @@ -172,7 +172,7 @@ Unknown `500` responses should log full details server-side with `Cause.pretty(cause)` and return a safe public body. The config startup regression in #27056 is the failure mode this rule is meant -to avoid: a user-authored invalid `opencode.json` crossed the HttpApi boundary +to avoid: a user-authored invalid `codev.json` crossed the HttpApi boundary as a defect, so middleware replaced a useful `ConfigInvalidError` with a safe generic `UnknownError`. The compatibility fix is to preserve config parse and validation errors as client-visible `400`s. The target architecture is better: diff --git a/packages/opencode/src/cli/cmd/mcp.ts b/packages/opencode/src/cli/cmd/mcp.ts index c2d2ee2f3b..89669d965b 100644 --- a/packages/opencode/src/cli/cmd/mcp.ts +++ b/packages/opencode/src/cli/cmd/mcp.ts @@ -187,7 +187,7 @@ export const McpAuthCommand = effectCmd({ if (servers.length === 0) { prompts.log.warn("No OAuth-capable MCP servers configured") - prompts.log.info("Remote MCP servers support OAuth by default. Add a remote server in opencode.json:") + prompts.log.info("Remote MCP servers support OAuth by default. Add a remote server in codev.json:") prompts.log.info(` "mcp": { "my-server": { @@ -393,10 +393,10 @@ export const McpLogoutCommand = effectCmd({ async function resolveConfigPath(baseDir: string, global = false) { // Check for existing config files (prefer .jsonc over .json, check .opencode/ subdirectory too) - const candidates = [path.join(baseDir, "opencode.json"), path.join(baseDir, "opencode.jsonc")] + const candidates = [path.join(baseDir, "codev.json"), path.join(baseDir, "codev.jsonc")] if (!global) { - candidates.push(path.join(baseDir, ".opencode", "opencode.json"), path.join(baseDir, ".opencode", "opencode.jsonc")) + candidates.push(path.join(baseDir, ".opencode", "codev.json"), path.join(baseDir, ".opencode", "codev.jsonc")) } for (const candidate of candidates) { @@ -405,7 +405,7 @@ async function resolveConfigPath(baseDir: string, global = false) { } } - // Default to opencode.json if none exist + // Default to codev.json if none exist return candidates[0] } diff --git a/packages/opencode/src/cli/cmd/plug.ts b/packages/opencode/src/cli/cmd/plug.ts index 1529e9b71d..8c5ad49f44 100644 --- a/packages/opencode/src/cli/cmd/plug.ts +++ b/packages/opencode/src/cli/cmd/plug.ts @@ -28,7 +28,7 @@ export type PlugDeps = { readText: (file: string) => Promise<string> write: (file: string, text: string) => Promise<void> exists: (file: string) => Promise<boolean> - files: (dir: string, name: "opencode" | "tui") => string[] + files: (dir: string, name: "codev" | "tui") => string[] global: string } diff --git a/packages/opencode/src/cli/cmd/providers.ts b/packages/opencode/src/cli/cmd/providers.ts index f0d132ae3d..0d1caccf85 100644 --- a/packages/opencode/src/cli/cmd/providers.ts +++ b/packages/opencode/src/cli/cmd/providers.ts @@ -452,7 +452,7 @@ export const ProvidersLoginCommand = effectCmd({ } yield* Prompt.log.warn( - `This only stores a credential for ${provider} - you will need configure it in opencode.json, check the docs for examples.`, + `This only stores a credential for ${provider} - you will need configure it in codev.json, check the docs for examples.`, ) } @@ -461,7 +461,7 @@ export const ProvidersLoginCommand = effectCmd({ "Amazon Bedrock authentication priority:\n" + " 1. Bearer token (AWS_BEARER_TOKEN_BEDROCK or /connect)\n" + " 2. AWS credential chain (profile, access keys, IAM roles, EKS IRSA)\n\n" + - "Configure via opencode.json options (profile, region, endpoint) or\n" + + "Configure via codev.json options (profile, region, endpoint) or\n" + "AWS environment variables (AWS_PROFILE, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_WEB_IDENTITY_TOKEN_FILE).", ) } diff --git a/packages/opencode/src/cli/error.ts b/packages/opencode/src/cli/error.ts index 68e9a6c607..6ef6679ab0 100644 --- a/packages/opencode/src/cli/error.ts +++ b/packages/opencode/src/cli/error.ts @@ -65,7 +65,7 @@ export function FormatError(input: unknown): string | undefined { `Model not found: ${stringField(providerModelNotFound, "providerID")}/${stringField(providerModelNotFound, "modelID")}`, ...(suggestions.length ? ["Did you mean: " + suggestions.join(", ")] : []), `Try: \`codev models\` to list available models`, - `Or check your config (opencode.json) provider/model names`, + `Or check your config (codev.json) provider/model names`, ].join("\n") } diff --git a/packages/opencode/src/command/template/initialize.txt b/packages/opencode/src/command/template/initialize.txt index 90751e3d6f..8d61f0e37d 100644 --- a/packages/opencode/src/command/template/initialize.txt +++ b/packages/opencode/src/command/template/initialize.txt @@ -12,7 +12,7 @@ Read the highest-value sources first: - build, test, lint, formatter, typecheck, and codegen config - CI workflows and pre-commit / task runner config - existing instruction files (`AGENTS.md`, `CLAUDE.md`, `.cursor/rules/`, `.cursorrules`, `.github/copilot-instructions.md`) -- repo-local OpenCode config such as `opencode.json` +- repo-local OpenCode config such as `codev.json` If architecture is still unclear after reading config and docs, inspect a small number of representative code files to find the real entrypoints, package boundaries, and execution flow. Prefer reading the files that explain how the system is wired together over random leaf files. @@ -57,7 +57,7 @@ Exclude: - long tutorials or exhaustive file trees - obvious language conventions - speculative claims or anything you could not verify -- content better stored in another file referenced via `opencode.json` `instructions` +- content better stored in another file referenced via `codev.json` `instructions` When in doubt, omit. diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 6e8037ec08..785ae7a32c 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -2,11 +2,9 @@ import { LayerNode } from "@opencode-ai/core/effect/layer-node" import { httpClient } from "@opencode-ai/core/effect/app-node-platform" import { serviceUse } from "@opencode-ai/core/effect/service-use" import path from "path" -import { pathToFileURL } from "url" import os from "os" import { mergeDeep } from "remeda" import { Global } from "@opencode-ai/core/global" -import fsNode from "fs/promises" import { Flag } from "@opencode-ai/core/flag/flag" import { Auth } from "../auth" import { Env } from "../env" @@ -137,7 +135,7 @@ export class Service extends Context.Service<Service, Interface>()("@opencode/Co export const use = serviceUse(Service) function globalConfigFile() { - const candidates = ["opencode.jsonc", "opencode.json", "config.json"].map((file) => + const candidates = ["codev.jsonc", "codev.json"].map((file) => path.join(Global.Path.config, file), ) for (const file of candidates) { @@ -255,26 +253,8 @@ const layer = Layer.effect( .pipe(Effect.catch(() => Effect.void)) } } - result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "config.json"), env)) - result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "opencode.json"), env)) - result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "opencode.jsonc"), env)) - - const legacy = path.join(Global.Path.config, "config") - if (existsSync(legacy)) { - yield* Effect.promise(() => - import(pathToFileURL(legacy).href, { with: { type: "toml" } }) - .then(async (mod) => { - const { provider, model, ...rest } = mod.default - if (provider && model) result.model = `${provider}/${model}` - result["$schema"] = "https://opencode.ai/config.json" - result = mergeConfig(result, rest) - await fsNode.writeFile(path.join(Global.Path.config, "config.json"), JSON.stringify(result, null, 2)) - await fsNode.unlink(legacy) - }) - .catch(() => {}), - ) - } - + result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "codev.json"), env)) + result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "codev.jsonc"), env)) return result }) @@ -404,7 +384,7 @@ const layer = Layer.effect( } if (!Flag.OPENCODE_DISABLE_PROJECT_CONFIG) { - for (const file of yield* ConfigPaths.files("opencode", ctx.directory, ctx.worktree).pipe(Effect.orDie)) { + for (const file of yield* ConfigPaths.files("codev", ctx.directory, ctx.worktree).pipe(Effect.orDie)) { yield* merge(file, yield* loadFile(file, authEnv), "local") } } @@ -423,7 +403,7 @@ const layer = Layer.effect( for (const dir of directories) { if (dir.endsWith(".opencode") || dir === Flag.OPENCODE_CONFIG_DIR) { - for (const file of ["opencode.json", "opencode.jsonc"]) { + for (const file of ["codev.json", "codev.jsonc"]) { const source = path.join(dir, file) yield* Effect.logDebug(`loading config from ${source}`) yield* merge(source, yield* loadFile(source, authEnv)) @@ -515,7 +495,7 @@ const layer = Layer.effect( const managedDir = ConfigManaged.managedConfigDir() if (existsSync(managedDir)) { - for (const file of ["opencode.json", "opencode.jsonc"]) { + for (const file of ["codev.json", "codev.jsonc"]) { const source = path.join(managedDir, file) yield* merge(source, yield* loadFile(source), "global") } diff --git a/packages/opencode/src/config/managed.ts b/packages/opencode/src/config/managed.ts index 877d30aaa5..9fa16bf781 100644 --- a/packages/opencode/src/config/managed.ts +++ b/packages/opencode/src/config/managed.ts @@ -20,11 +20,11 @@ const PLIST_META = new Set([ function systemManagedConfigDir(): string { switch (process.platform) { case "darwin": - return "/Library/Application Support/opencode" + return "/Library/Application Support/codev" case "win32": - return path.join(process.env.ProgramData || "C:\\ProgramData", "opencode") + return path.join(process.env.ProgramData || "C:\\ProgramData", "codev") default: - return "/etc/opencode" + return "/etc/codev" } } diff --git a/packages/opencode/src/config/tui-migrate.ts b/packages/opencode/src/config/tui-migrate.ts index 6ca254311e..103456e809 100644 --- a/packages/opencode/src/config/tui-migrate.ts +++ b/packages/opencode/src/config/tui-migrate.ts @@ -22,7 +22,7 @@ interface MigrateInput { } /** - * Migrates tui-specific keys (theme, keybinds, tui) from opencode.json files + * Migrates tui-specific keys (theme, keybinds, tui) from codev.json files * into dedicated tui.json files. Migration is performed per-directory and * skips only locations where a tui.json already exists. */ @@ -114,11 +114,11 @@ async function backupAndStripLegacy(file: string, source: string) { async function opencodeFiles(input: { directories: string[]; cwd: string }) { const files = [ - ...ConfigPaths.fileInDirectory(Global.Path.config, "opencode"), - ...(await Filesystem.findUp(["opencode.json", "opencode.jsonc"], input.cwd, undefined, { rootFirst: true })), + ...ConfigPaths.fileInDirectory(Global.Path.config, "codev"), + ...(await Filesystem.findUp(["codev.json", "codev.jsonc"], input.cwd, undefined, { rootFirst: true })), ] for (const dir of unique(input.directories)) { - files.push(...ConfigPaths.fileInDirectory(dir, "opencode")) + files.push(...ConfigPaths.fileInDirectory(dir, "codev")) } if (Flag.OPENCODE_CONFIG) files.push(Flag.OPENCODE_CONFIG) diff --git a/packages/opencode/src/config/tui.ts b/packages/opencode/src/config/tui.ts index 8f503751f3..5bd4ee1124 100644 --- a/packages/opencode/src/config/tui.ts +++ b/packages/opencode/src/config/tui.ts @@ -104,7 +104,7 @@ const loadState = Effect.fn("TuiConfig.loadState")(function* (ctx: { directory: const data = ConfigParse.jsonc(expanded, configFilepath) if (!isRecord(data)) return {} as Info // Flatten a nested "tui" key so users who wrote `{ "tui": { ... } }` inside tui.json - // (mirroring the old opencode.json shape) still get their settings applied. + // (mirroring the old codev.json shape) still get their settings applied. const normalized = dropUnknownKeybinds(normalize(data)) const parsed = ConfigParse.schema(Info, normalized, configFilepath) const validated = parsed.attention?.sounds diff --git a/packages/opencode/src/control-plane/dev/README.md b/packages/opencode/src/control-plane/dev/README.md index 74d68a75a8..1082827718 100644 --- a/packages/opencode/src/control-plane/dev/README.md +++ b/packages/opencode/src/control-plane/dev/README.md @@ -1,4 +1,4 @@ -This is a plugin to simulate a remote environment locally. Add this to `.opencode/opencode.jsonc`: +This is a plugin to simulate a remote environment locally. Add this to `.opencode/codev.jsonc`: ```json "plugin": ["../packages/opencode/src/control-plane/dev/debug-workspace-plugin.ts"], diff --git a/packages/opencode/src/plugin/install.ts b/packages/opencode/src/plugin/install.ts index f07b78bc36..f9bbcce70e 100644 --- a/packages/opencode/src/plugin/install.ts +++ b/packages/opencode/src/plugin/install.ts @@ -31,7 +31,7 @@ export type PatchDeps = { readText: (file: string) => Promise<string> write: (file: string, text: string) => Promise<void> exists: (file: string) => Promise<boolean> - files: (dir: string, name: "opencode" | "tui") => string[] + files: (dir: string, name: "codev" | "tui") => string[] } export type PatchInput = { @@ -337,8 +337,8 @@ function patchDir(input: PatchInput) { return path.join(root, ".opencode") } -function patchName(kind: Kind): "opencode" | "tui" { - if (kind === "server") return "opencode" +function patchName(kind: Kind): "codev" | "tui" { + if (kind === "server") return "codev" return "tui" } diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index f8f3b91fac..c1bd9c045b 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -366,7 +366,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> { } // Region resolution precedence (highest to lowest): - // 1. options.region from opencode.json provider config + // 1. options.region from codev.json provider config // 2. defaultRegion from AWS_REGION environment variable // 3. Default "us-east-1" (baked into defaultRegion) const region = options?.region ?? defaultRegion diff --git a/packages/opencode/src/skill/index.ts b/packages/opencode/src/skill/index.ts index 5a04ec2139..fe0b29162b 100644 --- a/packages/opencode/src/skill/index.ts +++ b/packages/opencode/src/skill/index.ts @@ -25,13 +25,13 @@ const OPENCODE_SKILL_PATTERN = "{skill,skills}/**/SKILL.md" const SKILL_PATTERN = "**/SKILL.md" // Built-in skill that ships with opencode. The model's intuition for what an -// opencode.json should look like is often wrong, and opencode hard-fails on +// codev.json should look like is often wrong, and opencode hard-fails on // invalid config, so users hit cryptic startup errors. Loading this skill // when the model is asked to touch opencode's own config files gives it the // actual schemas instead of guesses. const CUSTOMIZE_OPENCODE_SKILL_NAME = "customize-opencode" const CUSTOMIZE_OPENCODE_SKILL_DESCRIPTION = - "Use ONLY when the user is editing or creating opencode's own configuration: opencode.json, opencode.jsonc, files under .opencode/, or files under ~/.config/opencode/. Also use when creating or fixing opencode agents, subagents, skills, plugins, MCP servers, or permission rules. Do not use for the user's own application code, or for any project that is not configuring opencode itself." + "Use ONLY when the user is editing or creating opencode's own configuration: codev.json, codev.jsonc, files under .opencode/, or files under ~/.config/opencode/. Also use when creating or fixing opencode agents, subagents, skills, plugins, MCP servers, or permission rules. Do not use for the user's own application code, or for any project that is not configuring opencode itself." const CUSTOMIZE_OPENCODE_SKILL_BODY = SkillPlugin.CustomizeOpencodeContent export const Info = Schema.Struct({ diff --git a/packages/opencode/test/AGENTS.md b/packages/opencode/test/AGENTS.md index 464b75cd82..da22ffeb33 100644 --- a/packages/opencode/test/AGENTS.md +++ b/packages/opencode/test/AGENTS.md @@ -19,7 +19,7 @@ test("example", async () => { ### Options - `git?: boolean` - Initialize a git repo with a root commit -- `config?: Partial<Config.Info>` - Write an `opencode.json` config file +- `config?: Partial<Config.Info>` - Write an `codev.json` config file - `init?: (dir: string) => Promise<T>` - Custom setup function, returns value accessible as `tmp.extra` - `dispose?: (dir: string) => Promise<T>` - Custom cleanup function diff --git a/packages/opencode/test/cli/error.test.ts b/packages/opencode/test/cli/error.test.ts index e88c21f4c0..dd0c9e57e0 100644 --- a/packages/opencode/test/cli/error.test.ts +++ b/packages/opencode/test/cli/error.test.ts @@ -8,14 +8,14 @@ describe("cli.error", () => { const cases = [ { tag: "ConfigJsonError", - data: { path: "/tmp/opencode.jsonc", message: "Unexpected token" }, - expected: "Config file at /tmp/opencode.jsonc is not valid JSON(C): Unexpected token", + data: { path: "/tmp/codev.jsonc", message: "Unexpected token" }, + expected: "Config file at /tmp/codev.jsonc is not valid JSON(C): Unexpected token", }, { tag: "ConfigDirectoryTypoError", - data: { path: "/tmp/opencode.jsonc", dir: ".opencode", suggestion: "opencode" }, + data: { path: "/tmp/codev.jsonc", dir: ".opencode", suggestion: "opencode" }, expected: - 'Directory ".opencode" in /tmp/opencode.jsonc is not valid. Rename the directory to "opencode" or remove it. This is a common typo.', + 'Directory ".opencode" in /tmp/codev.jsonc is not valid. Rename the directory to "opencode" or remove it. This is a common typo.', }, { tag: "ConfigFrontmatterError", @@ -25,11 +25,11 @@ describe("cli.error", () => { { tag: "ConfigInvalidError", data: { - path: "/tmp/opencode.jsonc", + path: "/tmp/codev.jsonc", message: "schema mismatch", issues: [{ message: "Expected string", path: ["provider", "id"] }], }, - expected: "Configuration is invalid at /tmp/opencode.jsonc: schema mismatch\n↳ Expected string provider.id", + expected: "Configuration is invalid at /tmp/codev.jsonc: schema mismatch\n↳ Expected string provider.id", }, ] @@ -41,7 +41,7 @@ describe("cli.error", () => { test("preserves multiline JSONC diagnostics for tagged config errors", () => { const data = { - path: "/tmp/opencode.jsonc", + path: "/tmp/codev.jsonc", message: '\n--- JSONC Input ---\n{\n "model": \n}\n--- Errors ---\nValueExpected at line 3, column 1\n Line 3: }\n ^\n--- End ---', } @@ -74,7 +74,7 @@ describe("cli.error", () => { "Model not found: anthropic/claude-sonet-4", "Did you mean: claude-sonnet-4", "Try: `codev models` to list available models", - "Or check your config (opencode.json) provider/model names", + "Or check your config (codev.json) provider/model names", ].join("\n") expect(FormatError({ name: "ProviderModelNotFoundError", data })).toBe(expected) diff --git a/packages/opencode/test/cli/mcp-add.test.ts b/packages/opencode/test/cli/mcp-add.test.ts index b1639e6b39..639515dd7c 100644 --- a/packages/opencode/test/cli/mcp-add.test.ts +++ b/packages/opencode/test/cli/mcp-add.test.ts @@ -22,7 +22,7 @@ describe("codev mcp add (non-interactive subprocess)", () => { opencode.expectExit(result, 0) const config = yield* Effect.promise(() => - Bun.file(path.join(home, ".config", "codev-code", "opencode.json")).json(), + Bun.file(path.join(home, ".config", "codev-code", "codev.json")).json(), ) expect(config.mcp.github).toEqual({ type: "remote", @@ -58,7 +58,7 @@ describe("codev mcp add (non-interactive subprocess)", () => { opencode.expectExit(result, 0) const config = yield* Effect.promise(() => - Bun.file(path.join(home, ".config", "codev-code", "opencode.json")).json(), + Bun.file(path.join(home, ".config", "codev-code", "codev.json")).json(), ) expect(config.mcp.local).toEqual({ type: "local", diff --git a/packages/opencode/test/cli/tui/plugin-loader.test.ts b/packages/opencode/test/cli/tui/plugin-loader.test.ts index 49ea06affc..8a3a658443 100644 --- a/packages/opencode/test/cli/tui/plugin-loader.test.ts +++ b/packages/opencode/test/cli/tui/plugin-loader.test.ts @@ -832,7 +832,7 @@ test("does not bootstrap server plugins while initializing tui plugins", async ( "", ].join("\n"), ) - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: [pathToFileURL(plugin).href] })) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: [pathToFileURL(plugin).href] })) return { marker } }, }) diff --git a/packages/opencode/test/config/config.test.ts b/packages/opencode/test/config/config.test.ts index e281831ddf..9868e2a0f7 100644 --- a/packages/opencode/test/config/config.test.ts +++ b/packages/opencode/test/config/config.test.ts @@ -147,13 +147,13 @@ afterEach(async () => { }) const writeManagedSettingsEffect = (settings: object, filename?: string) => - FSUtil.use.writeWithDirs(path.join(managedConfigDir, filename ?? "opencode.json"), JSON.stringify(settings)) + FSUtil.use.writeWithDirs(path.join(managedConfigDir, filename ?? "codev.json"), JSON.stringify(settings)) -async function writeConfig(dir: string, config: object, name = "opencode.json") { +async function writeConfig(dir: string, config: object, name = "codev.json") { await Filesystem.write(path.join(dir, name), JSON.stringify(config)) } -const writeConfigEffect = (dir: string, config: object, name = "opencode.json") => +const writeConfigEffect = (dir: string, config: object, name = "codev.json") => FSUtil.use.writeWithDirs(path.join(dir, name), JSON.stringify(config)) const withInstanceDir = <A, E, R>(dir: string, effect: Effect.Effect<A, E, R>) => @@ -313,7 +313,7 @@ it.effect("creates global jsonc config with schema when no global configs exist" Effect.gen(function* () { yield* Config.use.get().pipe(provideInstanceEffect(dir)) - const content = yield* FSUtil.use.readFileString(path.join(dir, "opencode.jsonc")) + const content = yield* FSUtil.use.readFileString(path.join(dir, "codev.jsonc")) expect(content).toContain('"$schema": "https://opencode.ai/config.json"') }).pipe(Effect.provide(testInstanceStoreLayer), Effect.provide(LayerNode.compile(CrossSpawnSpawner.node))), ), @@ -329,7 +329,7 @@ it.effect("does not create global config when OPENCODE_CONFIG_DIR is set", () => Effect.gen(function* () { yield* Config.use.get().pipe(provideInstanceEffect(dir)) - expect(yield* FSUtil.use.existsSafe(path.join(dir, "opencode.jsonc"))).toBe(false) + expect(yield* FSUtil.use.existsSafe(path.join(dir, "codev.jsonc"))).toBe(false) }).pipe(Effect.provide(testInstanceStoreLayer), Effect.provide(LayerNode.compile(CrossSpawnSpawner.node))), ), ) @@ -376,18 +376,18 @@ it.effect("updates global config and omits empty shell key in json", () => Effect.gen(function* () { yield* Config.use.updateGlobal({ shell: "" }) - const writtenConfig = yield* FSUtil.use.readJson(path.join(dir, "opencode.json")) + const writtenConfig = yield* FSUtil.use.readJson(path.join(dir, "codev.json")) expect(writtenConfig).not.toHaveProperty("shell") }), ), ) it.effect("updates global config and omits empty shell key in jsonc", () => - withGlobalConfig({ config: { shell: "bash", model: "test/model" }, name: "opencode.jsonc" }, ({ dir }) => + withGlobalConfig({ config: { shell: "bash", model: "test/model" }, name: "codev.jsonc" }, ({ dir }) => Effect.gen(function* () { yield* Config.use.updateGlobal({ shell: "" }) - const file = path.join(dir, "opencode.jsonc") + const file = path.join(dir, "codev.jsonc") const writtenConfig = yield* FSUtil.use.readFileString(file) const parsed = ConfigParse.schema(ConfigV1.Info, ConfigParse.jsonc(writtenConfig, file), file) expect(writtenConfig).not.toContain('"shell"') @@ -453,7 +453,7 @@ it.instance("loads JSONC config file", () => Effect.gen(function* () { const test = yield* TestInstance yield* FSUtil.use.writeWithDirs( - path.join(test.directory, "opencode.jsonc"), + path.join(test.directory, "codev.jsonc"), `{ // This is a comment "$schema": "https://opencode.ai/config.json", @@ -477,7 +477,7 @@ it.instance("jsonc overrides json in the same directory", () => model: "base", username: "base", }, - "opencode.jsonc", + "codev.jsonc", ) yield* writeConfigEffect(test.directory, { $schema: "https://opencode.ai/config.json", @@ -513,14 +513,14 @@ it.instance("preserves env variables when adding $schema to config", () => const test = yield* TestInstance // Config without $schema - should trigger auto-add yield* FSUtil.use.writeWithDirs( - path.join(test.directory, "opencode.json"), + path.join(test.directory, "codev.json"), JSON.stringify({ username: "{env:PRESERVE_VAR}" }), ) const config = yield* Config.use.get() expect(config.username).toBe("secret_value") // Read the file to verify the env variable was preserved - const content = yield* FSUtil.use.readFileString(path.join(test.directory, "opencode.json")) + const content = yield* FSUtil.use.readFileString(path.join(test.directory, "codev.json")) expect(content).toContain("{env:PRESERVE_VAR}") expect(content).not.toContain("secret_value") expect(content).toContain("$schema") @@ -612,7 +612,7 @@ it.instance("validates config schema and throws on invalid fields", () => it.instance("throws error for invalid JSON", () => Effect.gen(function* () { const test = yield* TestInstance - yield* FSUtil.use.writeWithDirs(path.join(test.directory, "opencode.json"), "{ invalid json }") + yield* FSUtil.use.writeWithDirs(path.join(test.directory, "codev.json"), "{ invalid json }") const exit = yield* Config.use.get().pipe(Effect.exit) expect(Exit.isFailure(exit)).toBe(true) }), @@ -1218,7 +1218,7 @@ it.instance( it.instance("managed jsonc settings override managed json settings", () => Effect.gen(function* () { yield* writeManagedSettingsEffect({ model: "managed/json" }) - yield* writeManagedSettingsEffect({ model: "managed/jsonc" }, "opencode.jsonc") + yield* writeManagedSettingsEffect({ model: "managed/jsonc" }, "codev.jsonc") const config = yield* Config.use.get() expect(config.model).toBe("managed/jsonc") @@ -1388,7 +1388,7 @@ it.instance("project config can override MCP server enabled status", () => }, }, }, - "opencode.jsonc", + "codev.jsonc", ) const config = yield* Config.use.get() @@ -1433,7 +1433,7 @@ it.instance("MCP config deep merges preserving base config properties", () => }, }, }, - "opencode.jsonc", + "codev.jsonc", ) const config = yield* Config.use.get() @@ -1474,7 +1474,7 @@ it.instance("local .opencode config can override MCP from project config", () => }, }, }, - "opencode.json", + "codev.json", ) const config = yield* Config.use.get() @@ -1566,7 +1566,7 @@ test("remote well-known config can use FetchHttpClient layer", async () => { const templatedHeaderWellKnown = wellKnown({ remoteConfig: { - url: "https://config.example.com/opencode.json", + url: "https://config.example.com/codev.json", headers: { Authorization: "Bearer {env:TEST_TOKEN}" }, }, remote: { @@ -1578,7 +1578,7 @@ templatedHeaderWellKnown.it.instance("wellknown remote_config supports templated Effect.gen(function* () { const config = yield* Config.use.get() expect(templatedHeaderWellKnown.seen.wellKnown).toBe("https://example.com/.well-known/opencode") - expect(templatedHeaderWellKnown.seen.remote).toBe("https://config.example.com/opencode.json") + expect(templatedHeaderWellKnown.seen.remote).toBe("https://config.example.com/codev.json") expect(templatedHeaderWellKnown.seen.authorization).toBe("Bearer test-token") expect(config.mcp?.confluence?.enabled).toBe(true) }), @@ -1588,7 +1588,7 @@ const remotePrecedenceWellKnown = wellKnown({ config: { mcp: { confluence: { type: "remote", url: "https://confluence.example.com/mcp", enabled: false } }, }, - remoteConfig: { url: "https://config.example.com/{env:TEST_TOKEN}/opencode.json" }, + remoteConfig: { url: "https://config.example.com/{env:TEST_TOKEN}/codev.json" }, remote: { config: { mcp: { confluence: { type: "remote", url: "https://confluence.example.com/mcp", enabled: true } } }, }, @@ -1599,14 +1599,14 @@ remotePrecedenceWellKnown.it.instance( () => Effect.gen(function* () { const config = yield* Config.use.get() - expect(remotePrecedenceWellKnown.seen.remote).toBe("https://config.example.com/test-token/opencode.json") + expect(remotePrecedenceWellKnown.seen.remote).toBe("https://config.example.com/test-token/codev.json") expect(config.mcp?.confluence?.enabled).toBe(true) }), ) const envIsolationWellKnown = wellKnown({ remoteConfig: { - url: "https://config.example.com/opencode.json", + url: "https://config.example.com/codev.json", headers: { Authorization: "Bearer {env:TEST_TOKEN}" }, }, remote: { @@ -1630,7 +1630,7 @@ envIsolationWellKnown.it.instance( const nullConfigWellKnown = wellKnown({ wellKnown: { config: null, - remote_config: { url: "https://config.example.com/opencode.json" }, + remote_config: { url: "https://config.example.com/codev.json" }, }, remote: { mcp: { confluence: { type: "remote", url: "https://confluence.example.com/mcp", enabled: true } }, @@ -1640,26 +1640,26 @@ const nullConfigWellKnown = wellKnown({ nullConfigWellKnown.it.instance("wellknown config null is treated as absent", () => Effect.gen(function* () { const config = yield* Config.use.get() - expect(nullConfigWellKnown.seen.remote).toBe("https://config.example.com/opencode.json") + expect(nullConfigWellKnown.seen.remote).toBe("https://config.example.com/codev.json") expect(config.mcp?.confluence?.enabled).toBe(true) }), ) const invalidRemoteWellKnown = wellKnown({ - remoteConfig: { url: "https://config.example.com/opencode.json" }, + remoteConfig: { url: "https://config.example.com/codev.json" }, remote: "not an object", }) invalidRemoteWellKnown.it.instance("wellknown remote_config rejects non-object config responses", () => Effect.gen(function* () { const exit = yield* Config.use.get().pipe(Effect.exit) - expect(invalidRemoteWellKnown.seen.remote).toBe("https://config.example.com/opencode.json") + expect(invalidRemoteWellKnown.seen.remote).toBe("https://config.example.com/codev.json") expect(Exit.isFailure(exit)).toBe(true) }), ) const loginPageWellKnown = wellKnown({ - remoteConfig: { url: "https://config.example.com/opencode.json" }, + remoteConfig: { url: "https://config.example.com/codev.json" }, remoteHtml: "<!DOCTYPE html><html><head><title>Sign inLogin required", }) @@ -1668,7 +1668,7 @@ loginPageWellKnown.it.instance( () => Effect.gen(function* () { const exit = yield* Config.use.get().pipe(Effect.exit) - expect(loginPageWellKnown.seen.remote).toBe("https://config.example.com/opencode.json") + expect(loginPageWellKnown.seen.remote).toBe("https://config.example.com/codev.json") expect(Exit.isFailure(exit)).toBe(true) const error = Exit.isFailure(exit) ? Cause.squash(exit.cause) : undefined expect(NamedError.hasName(error, "ConfigRemoteAuthError")).toBe(true) @@ -1679,7 +1679,7 @@ loginPageWellKnown.it.instance( describe("resolvePluginSpec", () => { test("keeps package specs unchanged", async () => { await using tmp = await tmpdir() - const file = path.join(tmp.path, "opencode.json") + const file = path.join(tmp.path, "codev.json") expect(await ConfigPlugin.resolvePluginSpec("oh-my-opencode@2.4.3", file)).toBe("oh-my-opencode@2.4.3") expect(await ConfigPlugin.resolvePluginSpec("@scope/pkg", file)).toBe("@scope/pkg") }) @@ -1695,7 +1695,7 @@ describe("resolvePluginSpec", () => { }, }) - const file = path.join(tmp.path, "opencode.json") + const file = path.join(tmp.path, "codev.json") const hit = await ConfigPlugin.resolvePluginSpec(".\\plugin", file) expect(ConfigPlugin.pluginSpecifier(hit)).toBe(pathToFileURL(path.join(tmp.path, "plugin", "index.ts")).href) }) @@ -1707,7 +1707,7 @@ describe("resolvePluginSpec", () => { }, }) - const file = path.join(tmp.path, "opencode.json") + const file = path.join(tmp.path, "codev.json") const hit = await ConfigPlugin.resolvePluginSpec("./plugin.ts", file) expect(ConfigPlugin.pluginSpecifier(hit)).toBe(pathToFileURL(path.join(tmp.path, "plugin.ts")).href) }) @@ -1726,7 +1726,7 @@ describe("resolvePluginSpec", () => { }, }) - const file = path.join(tmp.path, "opencode.json") + const file = path.join(tmp.path, "codev.json") const hit = await ConfigPlugin.resolvePluginSpec("./plugin", file) expect(ConfigPlugin.pluginSpecifier(hit)).toBe(pathToFileURL(path.join(tmp.path, "plugin")).href) }) @@ -1740,7 +1740,7 @@ describe("resolvePluginSpec", () => { }, }) - const file = path.join(tmp.path, "opencode.json") + const file = path.join(tmp.path, "codev.json") const hit = await ConfigPlugin.resolvePluginSpec("./plugin", file) expect(ConfigPlugin.pluginSpecifier(hit)).toBe(pathToFileURL(path.join(tmp.path, "plugin", "index.ts")).href) }) diff --git a/packages/opencode/test/config/tui.test.ts b/packages/opencode/test/config/tui.test.ts index cc43cf4e55..21352422e6 100644 --- a/packages/opencode/test/config/tui.test.ts +++ b/packages/opencode/test/config/tui.test.ts @@ -16,7 +16,7 @@ import { testEffect } from "../lib/effect" const it = testEffect(LayerNode.compile(LayerNode.group([Config.node, FSUtil.node]))) const winIt = process.platform === "win32" ? it.instance : it.instance.skip -const globalConfigFiles = ["opencode.json", "opencode.jsonc", "tui.json", "tui.jsonc"].map((file) => +const globalConfigFiles = ["codev.json", "codev.jsonc", "tui.json", "tui.jsonc"].map((file) => path.join(Global.Path.config, file), ) @@ -91,13 +91,13 @@ it.instance("keeps server and tui plugin merge semantics aligned", () => const local = path.join(test.directory, ".opencode") yield* fs.makeDirectory(local, { recursive: true }) - yield* fs.writeJson(path.join(Global.Path.config, "opencode.json"), { + yield* fs.writeJson(path.join(Global.Path.config, "codev.json"), { plugin: [["shared-plugin@1.0.0", { source: "global" }], "global-only@1.0.0"], }) yield* fs.writeJson(path.join(Global.Path.config, "tui.json"), { plugin: [["shared-plugin@1.0.0", { source: "global" }], "global-only@1.0.0"], }) - yield* fs.writeJson(path.join(local, "opencode.json"), { + yield* fs.writeJson(path.join(local, "codev.json"), { plugin: [["shared-plugin@2.0.0", { source: "local" }], "local-only@1.0.0"], }) yield* fs.writeJson(path.join(local, "tui.json"), { @@ -189,12 +189,12 @@ it.instance("resolves attention config defaults and overrides", () => ), ) -it.instance("migrates tui-specific keys from opencode.json when tui.json does not exist", () => +it.instance("migrates tui-specific keys from codev.json when tui.json does not exist", () => withCleanState( Effect.gen(function* () { const fs = yield* FSUtil.Service const test = yield* TestInstance - const source = path.join(test.directory, "opencode.json") + const source = path.join(test.directory, "codev.json") yield* fs.writeJson(source, { theme: "migrated-theme", tui: { scroll_speed: 5 }, @@ -213,7 +213,7 @@ it.instance("migrates tui-specific keys from opencode.json when tui.json does no expect(server.theme).toBeUndefined() expect(server.keybinds).toBeUndefined() expect(server.tui).toBeUndefined() - expect(yield* fs.existsSafe(path.join(test.directory, "opencode.json.tui-migration.bak"))).toBe(true) + expect(yield* fs.existsSafe(path.join(test.directory, "codev.json.tui-migration.bak"))).toBe(true) expect(yield* fs.existsSafe(path.join(test.directory, "tui.json"))).toBe(true) }), ), @@ -225,7 +225,7 @@ it.instance("migrates project legacy tui keys even when global tui.json already const fs = yield* FSUtil.Service const test = yield* TestInstance yield* fs.writeJson(path.join(Global.Path.config, "tui.json"), { theme: "global" }) - yield* fs.writeJson(path.join(test.directory, "opencode.json"), { + yield* fs.writeJson(path.join(test.directory, "codev.json"), { theme: "project-migrated", tui: { scroll_speed: 2 }, }) @@ -235,7 +235,7 @@ it.instance("migrates project legacy tui keys even when global tui.json already expect(config.scroll_speed).toBe(2) expect(yield* fs.existsSafe(path.join(test.directory, "tui.json"))).toBe(true) - const server = JSON.parse(yield* fs.readFileString(path.join(test.directory, "opencode.json"))) + const server = JSON.parse(yield* fs.readFileString(path.join(test.directory, "codev.json"))) expect(server.theme).toBeUndefined() expect(server.tui).toBeUndefined() }), @@ -247,7 +247,7 @@ it.instance("drops unknown legacy tui keys during migration", () => Effect.gen(function* () { const fs = yield* FSUtil.Service const test = yield* TestInstance - yield* fs.writeJson(path.join(test.directory, "opencode.json"), { + yield* fs.writeJson(path.join(test.directory, "codev.json"), { theme: "migrated-theme", tui: { scroll_speed: 2, foo: 1 }, }) @@ -263,13 +263,13 @@ it.instance("drops unknown legacy tui keys during migration", () => ), ) -it.instance("skips migration when opencode.jsonc is syntactically invalid", () => +it.instance("skips migration when codev.jsonc is syntactically invalid", () => withCleanState( Effect.gen(function* () { const fs = yield* FSUtil.Service const test = yield* TestInstance yield* fs.writeFileString( - path.join(test.directory, "opencode.jsonc"), + path.join(test.directory, "codev.jsonc"), `{ "theme": "broken-theme", "tui": { "scroll_speed": 2 } @@ -281,8 +281,8 @@ it.instance("skips migration when opencode.jsonc is syntactically invalid", () = expect(config.theme).toBeUndefined() expect(config.scroll_speed).toBeUndefined() expect(yield* fs.existsSafe(path.join(test.directory, "tui.json"))).toBe(false) - expect(yield* fs.existsSafe(path.join(test.directory, "opencode.jsonc.tui-migration.bak"))).toBe(false) - const source = yield* fs.readFileString(path.join(test.directory, "opencode.jsonc")) + expect(yield* fs.existsSafe(path.join(test.directory, "codev.jsonc.tui-migration.bak"))).toBe(false) + const source = yield* fs.readFileString(path.join(test.directory, "codev.jsonc")) expect(source).toContain('"theme": "broken-theme"') expect(source).toContain('"tui": { "scroll_speed": 2 }') }), @@ -294,16 +294,16 @@ it.instance("skips migration when tui.json already exists", () => Effect.gen(function* () { const fs = yield* FSUtil.Service const test = yield* TestInstance - yield* fs.writeJson(path.join(test.directory, "opencode.json"), { theme: "legacy" }) + yield* fs.writeJson(path.join(test.directory, "codev.json"), { theme: "legacy" }) yield* fs.writeJson(path.join(test.directory, "tui.json"), { diff_style: "stacked" }) const config = yield* getTuiConfig(test.directory) expect(config.diff_style).toBe("stacked") expect(config.theme).toBeUndefined() - const server = JSON.parse(yield* fs.readFileString(path.join(test.directory, "opencode.json"))) + const server = JSON.parse(yield* fs.readFileString(path.join(test.directory, "codev.json"))) expect(server.theme).toBe("legacy") - expect(yield* fs.existsSafe(path.join(test.directory, "opencode.json.tui-migration.bak"))).toBe(false) + expect(yield* fs.existsSafe(path.join(test.directory, "codev.json.tui-migration.bak"))).toBe(false) }), ), ) @@ -313,7 +313,7 @@ it.instance("continues loading tui config when legacy source cannot be stripped" Effect.gen(function* () { const fs = yield* FSUtil.Service const test = yield* TestInstance - const source = path.join(test.directory, "opencode.json") + const source = path.join(test.directory, "codev.json") yield* fs.writeJson(source, { theme: "readonly-theme" }) yield* Effect.acquireUseRelease( @@ -339,7 +339,7 @@ it.instance("migration backup preserves JSONC comments", () => const fs = yield* FSUtil.Service const test = yield* TestInstance yield* fs.writeFileString( - path.join(test.directory, "opencode.jsonc"), + path.join(test.directory, "codev.jsonc"), `{ // top-level comment "theme": "jsonc-theme", @@ -351,7 +351,7 @@ it.instance("migration backup preserves JSONC comments", () => ) yield* getTuiConfig(test.directory) - const backup = yield* fs.readFileString(path.join(test.directory, "opencode.jsonc.tui-migration.bak")) + const backup = yield* fs.readFileString(path.join(test.directory, "codev.jsonc.tui-migration.bak")) expect(backup).toContain("// top-level comment") expect(backup).toContain("// nested comment") expect(backup).toContain('"theme": "jsonc-theme"') @@ -360,15 +360,15 @@ it.instance("migration backup preserves JSONC comments", () => ), ) -it.instance("migrates legacy tui keys across multiple opencode.json levels", () => +it.instance("migrates legacy tui keys across multiple codev.json levels", () => withCleanState( Effect.gen(function* () { const fs = yield* FSUtil.Service const test = yield* TestInstance const nested = path.join(test.directory, "apps", "client") yield* fs.makeDirectory(nested, { recursive: true }) - yield* fs.writeJson(path.join(test.directory, "opencode.json"), { theme: "root-theme" }) - yield* fs.writeJson(path.join(nested, "opencode.json"), { theme: "nested-theme" }) + yield* fs.writeJson(path.join(test.directory, "codev.json"), { theme: "root-theme" }) + yield* fs.writeJson(path.join(nested, "codev.json"), { theme: "nested-theme" }) const config = yield* getTuiConfig(nested) expect(config.theme).toBe("nested-theme") @@ -666,12 +666,12 @@ it.instance("does not derive tui path from OPENCODE_CONFIG", () => const test = yield* TestInstance const customDir = path.join(test.directory, "custom") yield* fs.makeDirectory(customDir, { recursive: true }) - yield* fs.writeJson(path.join(customDir, "opencode.json"), { model: "test/model" }) + yield* fs.writeJson(path.join(customDir, "codev.json"), { model: "test/model" }) yield* fs.writeJson(path.join(customDir, "tui.json"), { theme: "should-not-load" }) yield* withEnv( "OPENCODE_CONFIG", - path.join(customDir, "opencode.json"), + path.join(customDir, "codev.json"), Effect.gen(function* () { const config = yield* getTuiConfig(test.directory) expect(config.theme).toBeUndefined() diff --git a/packages/opencode/test/fixture/fixture.ts b/packages/opencode/test/fixture/fixture.ts index 53e3142cdf..93b998e1b4 100644 --- a/packages/opencode/test/fixture/fixture.ts +++ b/packages/opencode/test/fixture/fixture.ts @@ -94,7 +94,7 @@ export async function tmpdir(options?: TmpDirOptions) { } if (options?.config) { await Bun.write( - path.join(dirpath, "opencode.json"), + path.join(dirpath, "codev.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json", ...options.config, @@ -153,7 +153,7 @@ export function tmpdirScoped(options?: { const resolved = typeof options.config === "function" ? options.config() : options.config yield* Effect.promise(() => fs.writeFile( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json", ...resolved }), ), ) diff --git a/packages/opencode/test/lib/cli-process.ts b/packages/opencode/test/lib/cli-process.ts index c4625cfac9..5f9fb7b03e 100644 --- a/packages/opencode/test/lib/cli-process.ts +++ b/packages/opencode/test/lib/cli-process.ts @@ -8,7 +8,7 @@ // Configuration flows through codev's built-in test affordances: // - OPENCODE_CONFIG_CONTENT : provider config inline, no files to find // - OPENCODE_TEST_HOME : pins os.homedir() → tmpdir -// - OPENCODE_DISABLE_PROJECT_CONFIG : skip walking up for opencode.json +// - OPENCODE_DISABLE_PROJECT_CONFIG : skip walking up for codev.json // - OPENCODE_PURE : skip external plugin discovery + install // - OPENCODE_DISABLE_AUTOUPDATE / AUTOCOMPACT / MODELS_FETCH : no background work // Plus HOME / XDG_* pointing at the tmpdir for belt-and-suspenders isolation. diff --git a/packages/opencode/test/permission-task.test.ts b/packages/opencode/test/permission-task.test.ts index 09a71465d5..367325e56a 100644 --- a/packages/opencode/test/permission-task.test.ts +++ b/packages/opencode/test/permission-task.test.ts @@ -146,7 +146,7 @@ describe("Permission.disabled for task tool", () => { // Integration tests that load permissions from real config files describe("permission.task with real config files", () => { it.instance( - "loads task permissions from opencode.json config", + "loads task permissions from codev.json config", () => Effect.gen(function* () { const config = yield* load diff --git a/packages/opencode/test/plugin/auth-override.test.ts b/packages/opencode/test/plugin/auth-override.test.ts index ca8a2ff69a..b49b02c51b 100644 --- a/packages/opencode/test/plugin/auth-override.test.ts +++ b/packages/opencode/test/plugin/auth-override.test.ts @@ -26,7 +26,7 @@ function providerAuthLayer(directory: string, plugins: string[]) { plugin: plugins, plugin_origins: plugins.map((plugin) => ({ spec: plugin, - source: path.join(directory, "opencode.json"), + source: path.join(directory, "codev.json"), scope: "local" as const, })), }), diff --git a/packages/opencode/test/plugin/install-concurrency.test.ts b/packages/opencode/test/plugin/install-concurrency.test.ts index 6160bd6e25..402137954a 100644 --- a/packages/opencode/test/plugin/install-concurrency.test.ts +++ b/packages/opencode/test/plugin/install-concurrency.test.ts @@ -82,7 +82,7 @@ describe("plugin.install.concurrent", () => { expect(out.map((x) => x.code)).toEqual(Array.from({ length: all.length }, () => 0)) expect(out.map((x) => x.stderr.toString()).filter(Boolean)).toEqual([]) - const cfg = await read(path.join(tmp.path, ".opencode", "opencode.jsonc")) + const cfg = await read(path.join(tmp.path, ".opencode", "codev.jsonc")) expectPlugins(cfg.plugin, all) }, 25_000) @@ -105,7 +105,7 @@ describe("plugin.install.concurrent", () => { expect(out.map((x) => x.code)).toEqual(Array.from({ length: all.length }, () => 0)) expect(out.map((x) => x.stderr.toString()).filter(Boolean)).toEqual([]) - const server = await read(path.join(tmp.path, ".opencode", "opencode.jsonc")) + const server = await read(path.join(tmp.path, ".opencode", "codev.jsonc")) const tui = await read(path.join(tmp.path, ".opencode", "tui.jsonc")) expectPlugins(server.plugin, all) expectPlugins(tui.plugin, all) @@ -114,7 +114,7 @@ describe("plugin.install.concurrent", () => { test("preserves updates when existing config uses .json", async () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server"]) - const cfg = path.join(tmp.path, ".opencode", "opencode.json") + const cfg = path.join(tmp.path, ".opencode", "codev.json") await fs.mkdir(path.dirname(cfg), { recursive: true }) await Bun.write(cfg, JSON.stringify({ plugin: ["seed@1.0.0"] }, null, 2)) @@ -135,6 +135,6 @@ describe("plugin.install.concurrent", () => { const json = await read(cfg) expectPlugins(json.plugin, ["seed@1.0.0", ...next]) - expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "opencode.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "codev.jsonc"))).toBe(false) }, 25_000) }) diff --git a/packages/opencode/test/plugin/install.test.ts b/packages/opencode/test/plugin/install.test.ts index 6dc9175be4..8f94dd39d6 100644 --- a/packages/opencode/test/plugin/install.test.ts +++ b/packages/opencode/test/plugin/install.test.ts @@ -122,7 +122,7 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(true) - const server = await read(path.join(tmp.path, ".opencode", "opencode.jsonc")) + const server = await read(path.join(tmp.path, ".opencode", "codev.jsonc")) const tui = await read(path.join(tmp.path, ".opencode", "tui.jsonc")) expect(server.plugin).toEqual(["acme@1.2.3"]) expect(tui.plugin).toEqual(["acme@1.2.3"]) @@ -144,7 +144,7 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(true) - const server = await read(path.join(tmp.path, ".opencode", "opencode.jsonc")) + const server = await read(path.join(tmp.path, ".opencode", "codev.jsonc")) const tui = await read(path.join(tmp.path, ".opencode", "tui.jsonc")) expect(server.plugin).toEqual([["acme@1.2.3", { custom: true, other: false }]]) expect(tui.plugin).toEqual([["acme@1.2.3", { compact: true }]]) @@ -154,7 +154,7 @@ describe("plugin.install.task", () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server", "tui"]) const cfg = path.join(tmp.path, ".opencode") - const server = path.join(cfg, "opencode.jsonc") + const server = path.join(cfg, "codev.jsonc") const tui = path.join(cfg, "tui.jsonc") await fs.mkdir(cfg, { recursive: true }) await Bun.write( @@ -212,7 +212,7 @@ describe("plugin.install.task", () => { test("preserves JSONC comments when force replacing plugin version", async () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server"]) - const cfg = path.join(tmp.path, ".opencode", "opencode.jsonc") + const cfg = path.join(tmp.path, ".opencode", "codev.jsonc") await fs.mkdir(path.dirname(cfg), { recursive: true }) await Bun.write( cfg, @@ -257,14 +257,14 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(true) - const server = await read(path.join(tmp.path, ".opencode", "opencode.jsonc")) + const server = await read(path.join(tmp.path, ".opencode", "codev.jsonc")) expect(server.plugin).toEqual(["acme@1.2.3"]) }) test("does not change configured package version without force", async () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server"]) - const cfg = path.join(tmp.path, ".opencode", "opencode.json") + const cfg = path.join(tmp.path, ".opencode", "codev.json") await fs.mkdir(path.dirname(cfg), { recursive: true }) await Bun.write(cfg, JSON.stringify({ plugin: ["acme@1.0.0"] }, null, 2)) @@ -284,7 +284,7 @@ describe("plugin.install.task", () => { test("does not change scoped package version without force", async () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server"]) - const cfg = path.join(tmp.path, ".opencode", "opencode.json") + const cfg = path.join(tmp.path, ".opencode", "codev.json") await fs.mkdir(path.dirname(cfg), { recursive: true }) await Bun.write(cfg, JSON.stringify({ plugin: ["@scope/acme@1.0.0"] }, null, 2)) @@ -304,7 +304,7 @@ describe("plugin.install.task", () => { test("keeps file plugin entries and still adds npm plugin", async () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server"]) - const cfg = path.join(tmp.path, ".opencode", "opencode.json") + const cfg = path.join(tmp.path, ".opencode", "codev.json") await fs.mkdir(path.dirname(cfg), { recursive: true }) await Bun.write(cfg, JSON.stringify({ plugin: ["file:///tmp/acme.ts"] }, null, 2)) @@ -324,7 +324,7 @@ describe("plugin.install.task", () => { test("force replaces configured package version and keeps tuple options", async () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server"]) - const cfg = path.join(tmp.path, ".opencode", "opencode.json") + const cfg = path.join(tmp.path, ".opencode", "codev.json") await fs.mkdir(path.dirname(cfg), { recursive: true }) await Bun.write( cfg, @@ -366,8 +366,8 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(true) - expect(await Filesystem.exists(path.join(global, "opencode.jsonc"))).toBe(true) - expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "opencode.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(global, "codev.jsonc"))).toBe(true) + expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "codev.jsonc"))).toBe(false) }) test("writes local scope under directory when vcs is not git", async () => { @@ -386,8 +386,8 @@ describe("plugin.install.task", () => { const ok = await run(ctxDir(directory, worktree)) expect(ok).toBe(true) - expect(await Filesystem.exists(path.join(directory, ".opencode", "opencode.jsonc"))).toBe(true) - expect(await Filesystem.exists(path.join(worktree, ".opencode", "opencode.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(directory, ".opencode", "codev.jsonc"))).toBe(true) + expect(await Filesystem.exists(path.join(worktree, ".opencode", "codev.jsonc"))).toBe(false) }) test("writes local scope under directory when worktree is root slash", async () => { @@ -404,7 +404,7 @@ describe("plugin.install.task", () => { const ok = await run(ctxRoot(directory)) expect(ok).toBe(true) - expect(await Filesystem.exists(path.join(directory, ".opencode", "opencode.jsonc"))).toBe(true) + expect(await Filesystem.exists(path.join(directory, ".opencode", "codev.jsonc"))).toBe(true) }) test("writes tui local scope under directory when worktree is root slash", async () => { @@ -437,7 +437,7 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(true) expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "tui.jsonc"))).toBe(true) - expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "opencode.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "codev.jsonc"))).toBe(false) }) test("writes tui config for oc-themes-only packages", async () => { @@ -455,7 +455,7 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(true) expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "tui.jsonc"))).toBe(true) - expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "opencode.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "codev.jsonc"))).toBe(false) const tui = await read(path.join(tmp.path, ".opencode", "tui.jsonc")) expect(tui.plugin).toEqual(["acme@1.2.3"]) @@ -474,13 +474,13 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(false) expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "tui.jsonc"))).toBe(false) - expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "opencode.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "codev.jsonc"))).toBe(false) }) test("force replaces version in both server and tui configs", async () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server", "tui"]) - const server = path.join(tmp.path, ".opencode", "opencode.json") + const server = path.join(tmp.path, ".opencode", "codev.json") const tui = path.join(tmp.path, ".opencode", "tui.json") await fs.mkdir(path.dirname(server), { recursive: true }) await Bun.write(server, JSON.stringify({ plugin: ["acme@1.0.0", "other@1.0.0"] }, null, 2)) @@ -505,7 +505,7 @@ describe("plugin.install.task", () => { test("returns false and keeps config unchanged for invalid JSONC", async () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server"]) - const cfg = path.join(tmp.path, ".opencode", "opencode.jsonc") + const cfg = path.join(tmp.path, ".opencode", "codev.jsonc") await fs.mkdir(path.dirname(cfg), { recursive: true }) const bad = '{"plugin": ["acme@1.0.0",}' await Bun.write(cfg, bad) @@ -534,7 +534,7 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(false) - expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "opencode.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "codev.jsonc"))).toBe(false) expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "tui.jsonc"))).toBe(false) }) @@ -551,7 +551,7 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(false) - expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "opencode.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "codev.jsonc"))).toBe(false) }) test("returns false when install fails", async () => { @@ -565,6 +565,6 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(false) - expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "opencode.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "codev.jsonc"))).toBe(false) }) }) diff --git a/packages/opencode/test/plugin/loader-shared.test.ts b/packages/opencode/test/plugin/loader-shared.test.ts index 005a6e78cb..a130f6b0fe 100644 --- a/packages/opencode/test/plugin/loader-shared.test.ts +++ b/packages/opencode/test/plugin/loader-shared.test.ts @@ -37,7 +37,7 @@ function withTmp( } function load(dir: string, flags?: Parameters[0]) { - const source = path.join(dir, "opencode.json") + const source = path.join(dir, "codev.json") return Effect.gen(function* () { const config = yield* Effect.promise( () => Bun.file(source).json() as Promise<{ plugin?: Array]> }>, @@ -86,7 +86,7 @@ describe("plugin.loader.shared", () => { ) await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: [pathToFileURL(file).href] }, null, 2), ) @@ -121,7 +121,7 @@ describe("plugin.loader.shared", () => { ) await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: [pathToFileURL(file).href] }, null, 2), ) @@ -159,7 +159,7 @@ describe("plugin.loader.shared", () => { ) await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: [pathToFileURL(file).href] }, null, 2), ) @@ -192,7 +192,7 @@ describe("plugin.loader.shared", () => { ) await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: [pathToFileURL(file).href] }, null, 2), ) @@ -234,7 +234,7 @@ describe("plugin.loader.shared", () => { ) await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: [pathToFileURL(file).href] }, null, 2), ) @@ -274,7 +274,7 @@ describe("plugin.loader.shared", () => { await Bun.write(path.join(scope, "index.js"), "export default { server: async () => ({}) }\n") await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: ["acme-plugin", "scope-plugin@2.3.4"] }, null, 2), ) @@ -338,7 +338,7 @@ describe("plugin.loader.shared", () => { ) await Bun.write(path.join(mod, "tui.js"), "export default {}\n") - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: ["acme-plugin@1.0.0"] }, null, 2)) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: ["acme-plugin@1.0.0"] }, null, 2)) return { mod, @@ -397,7 +397,7 @@ describe("plugin.loader.shared", () => { ].join("\n"), ) - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: ["acme-plugin@1.0.0"] }, null, 2)) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: ["acme-plugin@1.0.0"] }, null, 2)) return { mod, @@ -451,7 +451,7 @@ describe("plugin.loader.shared", () => { ].join("\n"), ) - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: ["acme-plugin@1.0.0"] }, null, 2)) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: ["acme-plugin@1.0.0"] }, null, 2)) return { mod, @@ -501,7 +501,7 @@ describe("plugin.loader.shared", () => { ].join("\n"), ) - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: ["acme-plugin@1.0.0"] }, null, 2)) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: ["acme-plugin@1.0.0"] }, null, 2)) return { mod, mark } }, @@ -565,7 +565,7 @@ describe("plugin.loader.shared", () => { ) await fs.symlink(outside, path.join(mod, "escape"), process.platform === "win32" ? "junction" : "dir") - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: ["acme-plugin"] }, null, 2)) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: ["acme-plugin"] }, null, 2)) return { mod, @@ -596,7 +596,7 @@ describe("plugin.loader.shared", () => { withTmp( async (dir) => { await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify( { plugin: ["opencode-openai-codex-auth@1.0.0", "opencode-copilot-auth@1.0.0", "regular-plugin@1.0.0"], @@ -643,7 +643,7 @@ describe("plugin.loader.shared", () => { ].join("\n"), ) await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: ["broken-plugin@9.9.9", pathToFileURL(ok).href] }, null, 2), ) return { mark } @@ -695,7 +695,7 @@ describe("plugin.loader.shared", () => { ].join("\n"), ) - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: [file, ok] }, null, 2)) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: [file, ok] }, null, 2)) return { mark } }, @@ -731,7 +731,7 @@ describe("plugin.loader.shared", () => { ].join("\n"), ) - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: [file, ok] }, null, 2)) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: [file, ok] }, null, 2)) return { mark } }, @@ -762,7 +762,7 @@ describe("plugin.loader.shared", () => { "", ].join("\n"), ) - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: [missing, ok] }, null, 2)) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: [missing, ok] }, null, 2)) return { mark } }, @@ -795,7 +795,7 @@ describe("plugin.loader.shared", () => { ) await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: [pathToFileURL(file).href] }, null, 2), ) @@ -830,7 +830,7 @@ describe("plugin.loader.shared", () => { ) await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: [[pathToFileURL(file).href, { source: "tuple", enabled: true }]] }, null, 2), ) @@ -887,7 +887,7 @@ export default { `, ) - await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ plugin: [aSpec, bSpec] }, null, 2)) + await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ plugin: [aSpec, bSpec] }, null, 2)) return { marker } }, @@ -920,7 +920,7 @@ export default { ) await Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: [pathToFileURL(file).href] }, null, 2), ) diff --git a/packages/opencode/test/plugin/trigger.test.ts b/packages/opencode/test/plugin/trigger.test.ts index 07fd8e2f21..1b07ae4374 100644 --- a/packages/opencode/test/plugin/trigger.test.ts +++ b/packages/opencode/test/plugin/trigger.test.ts @@ -38,7 +38,7 @@ function withProject(source: string, self: Effect.Effect) { Effect.promise(() => Bun.write(file, source)), Effect.promise(() => Bun.write( - path.join(test.directory, "opencode.json"), + path.join(test.directory, "codev.json"), JSON.stringify( { $schema: "https://opencode.ai/config.json", diff --git a/packages/opencode/test/plugin/workspace-adapter.test.ts b/packages/opencode/test/plugin/workspace-adapter.test.ts index a8dd172521..329ac3386d 100644 --- a/packages/opencode/test/plugin/workspace-adapter.test.ts +++ b/packages/opencode/test/plugin/workspace-adapter.test.ts @@ -71,7 +71,7 @@ describe("plugin.workspace", () => { yield* Effect.promise(() => Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify( { $schema: "https://opencode.ai/config.json", diff --git a/packages/opencode/test/project/instance-bootstrap.test.ts b/packages/opencode/test/project/instance-bootstrap.test.ts index f855024e5d..abc02e2204 100644 --- a/packages/opencode/test/project/instance-bootstrap.test.ts +++ b/packages/opencode/test/project/instance-bootstrap.test.ts @@ -50,7 +50,7 @@ const bootstrapFixture = Effect.gen(function* () { ) yield* Effect.promise(() => Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json", plugin: [pathToFileURL(pluginFile).href], diff --git a/packages/opencode/test/provider/gitlab-duo.test.ts b/packages/opencode/test/provider/gitlab-duo.test.ts index 563fa02555..8932e329dc 100644 --- a/packages/opencode/test/provider/gitlab-duo.test.ts +++ b/packages/opencode/test/provider/gitlab-duo.test.ts @@ -17,7 +17,7 @@ export {} // await using tmp = await tmpdir({ // init: async (dir) => { // await Bun.write( -// path.join(dir, "opencode.json"), +// path.join(dir, "codev.json"), // JSON.stringify({ // $schema: "https://opencode.ai/config.json", // }), @@ -41,7 +41,7 @@ export {} // await using tmp = await tmpdir({ // init: async (dir) => { // await Bun.write( -// path.join(dir, "opencode.json"), +// path.join(dir, "codev.json"), // JSON.stringify({ // $schema: "https://opencode.ai/config.json", // provider: { @@ -73,7 +73,7 @@ export {} // await using tmp = await tmpdir({ // init: async (dir) => { // await Bun.write( -// path.join(dir, "opencode.json"), +// path.join(dir, "codev.json"), // JSON.stringify({ // $schema: "https://opencode.ai/config.json", // }), @@ -110,7 +110,7 @@ export {} // await using tmp = await tmpdir({ // init: async (dir) => { // await Bun.write( -// path.join(dir, "opencode.json"), +// path.join(dir, "codev.json"), // JSON.stringify({ // $schema: "https://opencode.ai/config.json", // }), @@ -146,7 +146,7 @@ export {} // await using tmp = await tmpdir({ // init: async (dir) => { // await Bun.write( -// path.join(dir, "opencode.json"), +// path.join(dir, "codev.json"), // JSON.stringify({ // $schema: "https://opencode.ai/config.json", // provider: { @@ -178,7 +178,7 @@ export {} // await using tmp = await tmpdir({ // init: async (dir) => { // await Bun.write( -// path.join(dir, "opencode.json"), +// path.join(dir, "codev.json"), // JSON.stringify({ // $schema: "https://opencode.ai/config.json", // provider: { @@ -208,7 +208,7 @@ export {} // await using tmp = await tmpdir({ // init: async (dir) => { // await Bun.write( -// path.join(dir, "opencode.json"), +// path.join(dir, "codev.json"), // JSON.stringify({ // $schema: "https://opencode.ai/config.json", // }), @@ -234,7 +234,7 @@ export {} // await using tmp = await tmpdir({ // init: async (dir) => { // await Bun.write( -// path.join(dir, "opencode.json"), +// path.join(dir, "codev.json"), // JSON.stringify({ // $schema: "https://opencode.ai/config.json", // provider: { @@ -269,7 +269,7 @@ export {} // await using tmp = await tmpdir({ // init: async (dir) => { // await Bun.write( -// path.join(dir, "opencode.json"), +// path.join(dir, "codev.json"), // JSON.stringify({ // $schema: "https://opencode.ai/config.json", // }), @@ -297,7 +297,7 @@ export {} // test("duo-workflow-* model routes through workflowChat", async () => { // await using tmp = await tmpdir({ // init: async (dir) => { -// await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json" })) +// await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json" })) // }, // }) // await withTestInstance({ @@ -345,7 +345,7 @@ export {} // test("duo-chat-* model routes through agenticChat (not workflow)", async () => { // await using tmp = await tmpdir({ // init: async (dir) => { -// await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json" })) +// await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json" })) // }, // }) // await withTestInstance({ @@ -368,7 +368,7 @@ export {} // test("model.options merged with provider.options in getLanguage", async () => { // await using tmp = await tmpdir({ // init: async (dir) => { -// await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json" })) +// await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json" })) // }, // }) // await withTestInstance({ @@ -392,7 +392,7 @@ export {} // test("static duo-chat models always present regardless of discovery", async () => { // await using tmp = await tmpdir({ // init: async (dir) => { -// await Bun.write(path.join(dir, "opencode.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json" })) +// await Bun.write(path.join(dir, "codev.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json" })) // }, // }) // await withTestInstance({ diff --git a/packages/opencode/test/server/httpapi-error-middleware.test.ts b/packages/opencode/test/server/httpapi-error-middleware.test.ts index 7bfc6da032..0b9f7f2842 100644 --- a/packages/opencode/test/server/httpapi-error-middleware.test.ts +++ b/packages/opencode/test/server/httpapi-error-middleware.test.ts @@ -56,7 +56,7 @@ describe("HttpApi error middleware", () => { it.live("returns invalid config defects as structured client errors", () => Effect.gen(function* () { const configError = new ConfigErrorV1.InvalidError({ - path: "/tmp/opencode.json", + path: "/tmp/codev.json", issues: [{ message: "Expected object", path: ["provider", "anthropic", "options"] }], }) @@ -74,11 +74,11 @@ describe("HttpApi error middleware", () => { expect(body).toMatchObject({ name: "ConfigInvalidError", data: { - path: "/tmp/opencode.json", + path: "/tmp/codev.json", issues: [{ message: "Expected object", path: ["provider", "anthropic", "options"] }], }, }) - expect(serialized).toContain("/tmp/opencode.json") + expect(serialized).toContain("/tmp/codev.json") expect(serialized).toContain("anthropic") }), ) diff --git a/packages/opencode/test/server/httpapi-exercise/environment.ts b/packages/opencode/test/server/httpapi-exercise/environment.ts index 6c074554da..5279f4a4e2 100644 --- a/packages/opencode/test/server/httpapi-exercise/environment.ts +++ b/packages/opencode/test/server/httpapi-exercise/environment.ts @@ -16,11 +16,12 @@ export const exerciseConfigDirectory = path.join(exerciseGlobalRoot, "config", " export const exerciseDataDirectory = path.join(exerciseGlobalRoot, "data", "codev-code") // Fork: sharing defaults to disabled, which would 500 the share/unshare -// scenarios. Opt back in via config.json (merged before opencode.jsonc, so the -// global.config.update scenario cannot clobber it); actual share network calls -// stay stubbed by OPENCODE_DISABLE_SHARE above. +// scenarios. Opt back in via codev.json (global config.json support was +// removed with the codev.json rename; updateGlobal patch-merges keys, so the +// global.config.update scenario cannot clobber this); actual share network +// calls stay stubbed by OPENCODE_DISABLE_SHARE above. fs.mkdirSync(exerciseConfigDirectory, { recursive: true }) -fs.writeFileSync(path.join(exerciseConfigDirectory, "config.json"), JSON.stringify({ share: "manual" }, null, 2)) +fs.writeFileSync(path.join(exerciseConfigDirectory, "codev.json"), JSON.stringify({ share: "manual" }, null, 2)) const preserveExerciseDatabase = !!process.env.OPENCODE_HTTPAPI_EXERCISE_DB export const exerciseDatabasePath = diff --git a/packages/opencode/test/server/httpapi-exercise/index.ts b/packages/opencode/test/server/httpapi-exercise/index.ts index c8e11ea845..6b19549543 100644 --- a/packages/opencode/test/server/httpapi-exercise/index.ts +++ b/packages/opencode/test/server/httpapi-exercise/index.ts @@ -85,7 +85,7 @@ const scenarios: Scenario[] = [ .seeded(() => Effect.promise(() => Bun.write( - path.join(exerciseConfigDirectory, "opencode.jsonc"), + path.join(exerciseConfigDirectory, "codev.jsonc"), JSON.stringify({ username: "httpapi-global" }, null, 2), ), ), @@ -98,7 +98,7 @@ const scenarios: Scenario[] = [ object(body) check(body.username === "httpapi-global", "global config update should return patched config") const text = yield* Effect.promise(() => - Bun.file(path.join(exerciseConfigDirectory, "opencode.jsonc")).text(), + Bun.file(path.join(exerciseConfigDirectory, "codev.jsonc")).text(), ) check(text.includes('"username": "httpapi-global"'), "global config update should write isolated config file") }), diff --git a/packages/opencode/test/server/httpapi-listen.test.ts b/packages/opencode/test/server/httpapi-listen.test.ts index 585c59cb43..46b76b7b03 100644 --- a/packages/opencode/test/server/httpapi-listen.test.ts +++ b/packages/opencode/test/server/httpapi-listen.test.ts @@ -323,7 +323,7 @@ describe("HttpApi Server.listen", () => { ].join("\n"), ) await Bun.write( - path.join(directory, "opencode.json"), + path.join(directory, "codev.json"), JSON.stringify({ formatter: false, lsp: false, plugin: [pathToFileURL(plugin).href] }), ) return { initialized, completed } diff --git a/packages/opencode/test/server/httpapi-v2-pty.test.ts b/packages/opencode/test/server/httpapi-v2-pty.test.ts index ef05dfe1ea..63daa5cc3c 100644 --- a/packages/opencode/test/server/httpapi-v2-pty.test.ts +++ b/packages/opencode/test/server/httpapi-v2-pty.test.ts @@ -200,7 +200,7 @@ describe("v2 pty HttpApi", () => { ) yield* Effect.promise(() => Bun.write( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ plugin: [pathToFileURL(plugin).href], formatter: false, lsp: false }), ), ) diff --git a/packages/opencode/test/session/llm-native-recorded.test.ts b/packages/opencode/test/session/llm-native-recorded.test.ts index 7ca09910bf..3a54abdfec 100644 --- a/packages/opencode/test/session/llm-native-recorded.test.ts +++ b/packages/opencode/test/session/llm-native-recorded.test.ts @@ -290,7 +290,7 @@ function recordedNativeLLMLayer(scenario: RecordedScenario) { const writeConfig = (directory: string, scenario: RecordedScenario, model: ModelsDev.Provider["models"][string]) => Effect.promise(() => Bun.write( - path.join(directory, "opencode.json"), + path.join(directory, "codev.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json", ...scenario.config(model) }), ), ) diff --git a/packages/opencode/test/session/prompt.test.ts b/packages/opencode/test/session/prompt.test.ts index 491ad06aaf..ba282be099 100644 --- a/packages/opencode/test/session/prompt.test.ts +++ b/packages/opencode/test/session/prompt.test.ts @@ -310,7 +310,7 @@ const writeText = Effect.fn("test.writeText")(function* (file: string, text: str const writeConfig = Effect.fn("test.writeConfig")(function* (dir: string, config: Partial) { yield* writeText( - path.join(dir, "opencode.json"), + path.join(dir, "codev.json"), JSON.stringify({ $schema: "https://opencode.ai/config.json", ...config }), ) }) diff --git a/packages/opencode/test/util/filesystem.test.ts b/packages/opencode/test/util/filesystem.test.ts index 9b8e3f7977..3cb3b9f5bd 100644 --- a/packages/opencode/test/util/filesystem.test.ts +++ b/packages/opencode/test/util/filesystem.test.ts @@ -154,20 +154,20 @@ describe("filesystem", () => { const nested = path.join(project, "nested") await fs.mkdir(nested, { recursive: true }) - await fs.writeFile(path.join(tmp.path, "opencode.json"), "{}", "utf-8") - await fs.writeFile(path.join(tmp.path, "opencode.jsonc"), "{}", "utf-8") - await fs.writeFile(path.join(project, "opencode.json"), "{}", "utf-8") - await fs.writeFile(path.join(project, "opencode.jsonc"), "{}", "utf-8") + await fs.writeFile(path.join(tmp.path, "codev.json"), "{}", "utf-8") + await fs.writeFile(path.join(tmp.path, "codev.jsonc"), "{}", "utf-8") + await fs.writeFile(path.join(project, "codev.json"), "{}", "utf-8") + await fs.writeFile(path.join(project, "codev.jsonc"), "{}", "utf-8") - const result = await Filesystem.findUp(["opencode.json", "opencode.jsonc"], nested, tmp.path, { + const result = await Filesystem.findUp(["codev.json", "codev.jsonc"], nested, tmp.path, { rootFirst: true, }) expect(result).toEqual([ - path.join(tmp.path, "opencode.json"), - path.join(tmp.path, "opencode.jsonc"), - path.join(project, "opencode.json"), - path.join(project, "opencode.jsonc"), + path.join(tmp.path, "codev.json"), + path.join(tmp.path, "codev.jsonc"), + path.join(project, "codev.json"), + path.join(project, "codev.jsonc"), ]) }) }) diff --git a/packages/tui/src/component/dialog-configure.tsx b/packages/tui/src/component/dialog-configure.tsx index 985f28c751..74bb9fe719 100644 --- a/packages/tui/src/component/dialog-configure.tsx +++ b/packages/tui/src/component/dialog-configure.tsx @@ -26,7 +26,7 @@ import { useToast } from "../ui/toast" // Fork-only: the standalone configure flow for the CoDev AI gateway — the // in-agent equivalent of `codevhub config`. Login with SSO (gateway key minted // via the CoDev backend) or paste an existing key, pick a default model, then -// write the same opencode.json provider block the hub writes. The SSO session +// write the same codev.json provider block the hub writes. The SSO session // and key land in the hub-shared ~/.codev/auth.json. Upstream's /connect // dialog remains the escape hatch for non-gateway providers. // diff --git a/packages/tui/src/component/dialog-provider.tsx b/packages/tui/src/component/dialog-provider.tsx index 791fd873d4..79ec58d0c0 100644 --- a/packages/tui/src/component/dialog-provider.tsx +++ b/packages/tui/src/component/dialog-provider.tsx @@ -98,7 +98,7 @@ export function createDialogProviderOptions() { placeholder: "Provider id", description: () => ( - This only stores a credential. Configure the provider in opencode.json to use it. + This only stores a credential. Configure the provider in codev.json to use it. ), }) @@ -409,7 +409,7 @@ function ApiMethod(props: ApiMethodProps) { if (props.custom && !sync.data.provider_next.all.some((provider) => provider.id === props.providerID)) { toast.show({ variant: "info", - message: `Saved credential for ${props.providerID}. Configure it in opencode.json to use it.`, + message: `Saved credential for ${props.providerID}. Configure it in codev.json to use it.`, }) dialog.clear() return diff --git a/packages/tui/src/feature-plugins/home/tips-view.tsx b/packages/tui/src/feature-plugins/home/tips-view.tsx index 2276deece6..e87863f7a1 100644 --- a/packages/tui/src/feature-plugins/home/tips-view.tsx +++ b/packages/tui/src/feature-plugins/home/tips-view.tsx @@ -211,7 +211,7 @@ const TIPS: Tip[] = [ if (!items.length) return undefined return `Use ${items.map(shortcutText).join(" / ")} for parent/child sessions` }, - "Create {highlight}opencode.json{/highlight} for server settings, and {highlight}tui.json{/highlight} for TUI", + "Create {highlight}codev.json{/highlight} for server settings, and {highlight}tui.json{/highlight} for TUI", "Place TUI settings in {highlight}~/.config/codev-code/tui.json{/highlight} for global config", "Add {highlight}$schema{/highlight} to your config for autocomplete in your editor", "Configure {highlight}model{/highlight} in config to set your default model", diff --git a/packages/tui/src/util/error.ts b/packages/tui/src/util/error.ts index 99821ac43d..b804fe64db 100644 --- a/packages/tui/src/util/error.ts +++ b/packages/tui/src/util/error.ts @@ -25,7 +25,7 @@ export function cliErrorMessage(input: unknown): string | undefined { `Model not found: ${field(model, "providerID")}/${field(model, "modelID")}`, ...(suggestions.length ? ["Did you mean: " + suggestions.join(", ")] : []), "Try: `codev models` to list available models", - "Or check your config (opencode.json) provider/model names", + "Or check your config (codev.json) provider/model names", ].join("\n") } diff --git a/packages/web/src/content/docs/agents.mdx b/packages/web/src/content/docs/agents.mdx index 53048b7927..1e92278353 100644 --- a/packages/web/src/content/docs/agents.mdx +++ b/packages/web/src/content/docs/agents.mdx @@ -147,9 +147,9 @@ You can customize the built-in agents or create your own through configuration. ### JSON -Configure agents in your `opencode.json` config file: +Configure agents in your `codev.json` config file: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "agent": { @@ -227,7 +227,7 @@ Let's look at these configuration options in detail. Use the `description` option to provide a brief description of what the agent does and when to use it. -```json title="opencode.json" +```json title="codev.json" { "agent": { "review": { @@ -247,7 +247,7 @@ Control the randomness and creativity of the LLM's responses with the `temperatu Lower values make responses more focused and deterministic, while higher values increase creativity and variability. -```json title="opencode.json" +```json title="codev.json" { "agent": { "plan": { @@ -266,7 +266,7 @@ Temperature values typically range from 0.0 to 1.0: - **0.3-0.5**: Balanced responses with some creativity, good for general development tasks - **0.6-1.0**: More creative and varied responses, useful for brainstorming and exploration -```json title="opencode.json" +```json title="codev.json" { "agent": { "analyze": { @@ -294,7 +294,7 @@ Control the maximum number of agentic iterations an agent can perform before bei If this is not set, the agent will continue to iterate until the model chooses to stop or the user interrupts the session. -```json title="opencode.json" +```json title="codev.json" { "agent": { "quick-thinker": { @@ -318,7 +318,7 @@ The legacy `maxSteps` field is deprecated. Use `steps` instead. Set to `true` to disable the agent. -```json title="opencode.json" +```json title="codev.json" { "agent": { "review": { @@ -334,7 +334,7 @@ Set to `true` to disable the agent. Specify a custom system prompt file for this agent with the `prompt` config. The prompt file should contain instructions specific to the agent's purpose. -```json title="opencode.json" +```json title="codev.json" { "agent": { "review": { @@ -356,7 +356,7 @@ Use the `model` config to override the model for this agent. Useful for using di If you don’t specify a model, primary agents use the [model globally configured](/docs/config#models) while subagents will use the model of the primary agent that invoked the subagent. ::: -```json title="opencode.json" +```json title="codev.json" { "agent": { "plan": { @@ -376,7 +376,7 @@ The model ID in your OpenCode config uses the format `provider/model-id`. For ex Allows you to control which tools are available in this agent. You can enable or disable specific tools by setting them to `true` or `false`. In an agent's `tools` config, `true` is equivalent to `{"*": "allow"}` permission and `false` is equivalent to `{"*": "deny"}` permission. -```json title="opencode.json" {3-6,9-12} +```json title="codev.json" {3-6,9-12} { "$schema": "https://opencode.ai/config.json", "tools": { @@ -400,7 +400,7 @@ The agent-specific config overrides the global config. You can also use wildcards in legacy `tools` entries to control multiple tools at once. For example, to disable all tools from an MCP server: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "agent": { @@ -453,7 +453,7 @@ The available permission keys are: Permission keys are matched as wildcard patterns against the underlying tool name, so the same syntax works for built-ins, custom tools, and MCP tools — for example `"mymcp_*": "deny"` denies every tool from an MCP server, and `"mymcp_search": "ask"` targets a single one. ::: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -464,7 +464,7 @@ Permission keys are matched as wildcard patterns against the underlying tool nam You can override these permissions per agent. -```json title="opencode.json" {3-5,8-10} +```json title="codev.json" {3-5,8-10} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -501,7 +501,7 @@ Only analyze code and suggest changes. You can set permissions for specific bash commands. -```json title="opencode.json" {7} +```json title="codev.json" {7} { "$schema": "https://opencode.ai/config.json", "agent": { @@ -519,7 +519,7 @@ You can set permissions for specific bash commands. This can take a glob pattern. -```json title="opencode.json" {7} +```json title="codev.json" {7} { "$schema": "https://opencode.ai/config.json", "agent": { @@ -537,7 +537,7 @@ This can take a glob pattern. And you can also use the `*` wildcard to manage permissions for all commands. Since the last matching rule takes precedence, put the `*` wildcard first and specific rules after. -```json title="opencode.json" {8} +```json title="codev.json" {8} { "$schema": "https://opencode.ai/config.json", "agent": { @@ -561,7 +561,7 @@ Since the last matching rule takes precedence, put the `*` wildcard first and sp Control the agent's mode with the `mode` config. The `mode` option is used to determine how the agent can be used. -```json title="opencode.json" +```json title="codev.json" { "agent": { "review": { @@ -579,7 +579,7 @@ The `mode` option can be set to `primary`, `subagent`, or `all`. If no `mode` is Hide a subagent from the `@` autocomplete menu with `hidden: true`. Useful for internal subagents that should only be invoked programmatically by other agents via the Task tool. -```json title="opencode.json" +```json title="codev.json" { "agent": { "internal-helper": { @@ -602,7 +602,7 @@ Only applies to `mode: subagent` agents. Control which subagents an agent can invoke via the Task tool with `permission.task`. Uses glob patterns for flexible matching. -```json title="opencode.json" +```json title="codev.json" { "agent": { "orchestrator": { @@ -637,7 +637,7 @@ Customize the agent's visual appearance in the UI with the `color` option. This Use a valid hex color (e.g., `#FF5733`) or theme color: `primary`, `secondary`, `accent`, `success`, `warning`, `error`, `info`. -```json title="opencode.json" +```json title="codev.json" { "agent": { "creative": { @@ -656,7 +656,7 @@ Use a valid hex color (e.g., `#FF5733`) or theme color: `primary`, `secondary`, Control response diversity with the `top_p` option. Alternative to temperature for controlling randomness. -```json title="opencode.json" +```json title="codev.json" { "agent": { "brainstorm": { @@ -676,7 +676,7 @@ Any other options you specify in your agent configuration will be **passed throu For example, with OpenAI's reasoning models, you can control the reasoning effort: -```json title="opencode.json" {6,7} +```json title="codev.json" {6,7} { "agent": { "deep-thinker": { diff --git a/packages/web/src/content/docs/commands.mdx b/packages/web/src/content/docs/commands.mdx index 1d7e4f1c21..dd67dbee43 100644 --- a/packages/web/src/content/docs/commands.mdx +++ b/packages/web/src/content/docs/commands.mdx @@ -50,7 +50,7 @@ You can add custom commands through the OpenCode config or by creating markdown Use the `command` option in your OpenCode [config](/docs/config): -```json title="opencode.jsonc" {4-12} +```json title="codev.jsonc" {4-12} { "$schema": "https://opencode.ai/config.json", "command": { @@ -222,7 +222,7 @@ Let's look at the configuration options in detail. The `template` option defines the prompt that will be sent to the LLM when the command is executed. -```json title="opencode.json" +```json title="codev.json" { "command": { "test": { @@ -240,7 +240,7 @@ This is a **required** config option. Use the `description` option to provide a brief description of what the command does. -```json title="opencode.json" +```json title="codev.json" { "command": { "test": { @@ -260,7 +260,7 @@ Use the `agent` config to optionally specify which [agent](/docs/agents) should If this is a [subagent](/docs/agents/#subagents) the command will trigger a subagent invocation by default. To disable this behavior, set `subtask` to `false`. -```json title="opencode.json" +```json title="codev.json" { "command": { "review": { @@ -280,7 +280,7 @@ Use the `subtask` boolean to force the command to trigger a [subagent](/docs/age This is useful if you want the command to not pollute your primary context and will **force** the agent to act as a subagent, even if `mode` is set to `primary` on the [agent](/docs/agents) configuration. -```json title="opencode.json" +```json title="codev.json" { "command": { "analyze": { @@ -298,7 +298,7 @@ This is an **optional** config option. Use the `model` config to override the default model for this command. -```json title="opencode.json" +```json title="codev.json" { "command": { "analyze": { diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx index c1a69f5a86..a9fc0031d6 100644 --- a/packages/web/src/content/docs/config.mdx +++ b/packages/web/src/content/docs/config.mdx @@ -11,7 +11,7 @@ You can configure OpenCode using a JSON config file. OpenCode supports both **JSON** and **JSONC** (JSON with Comments) formats. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "$schema": "https://opencode.ai/config.json", "model": "anthropic/claude-sonnet-4-5", @@ -44,9 +44,9 @@ For example, if your global config sets `autoupdate: true` and your project conf Config sources are loaded in this order (later sources override earlier ones): 1. **Remote config** (from `.well-known/opencode`) - organizational defaults -2. **Global config** (`~/.config/opencode/opencode.json`) - user preferences +2. **Global config** (`~/.config/opencode/codev.json`) - user preferences 3. **Custom config** (`OPENCODE_CONFIG` env var) - custom overrides -4. **Project config** (`opencode.json` in project) - project-specific settings +4. **Project config** (`codev.json` in project) - project-specific settings 5. **`.opencode` directories** - agents, commands, plugins 6. **Inline config** (`OPENCODE_CONFIG_CONTENT` env var) - runtime overrides 7. **Managed config files** (`/Library/Application Support/opencode/` on macOS) - admin-controlled @@ -82,7 +82,7 @@ For example, if your organization provides MCP servers that are disabled by defa You can enable specific servers in your local config: -```json title="opencode.json" +```json title="codev.json" { "mcp": { "jira": { @@ -98,7 +98,7 @@ You can enable specific servers in your local config: ### Global -Place your global OpenCode config in `~/.config/opencode/opencode.json`. Use global config for user-wide server/runtime preferences like providers, models, and permissions. +Place your global OpenCode config in `~/.config/opencode/codev.json`. Use global config for user-wide server/runtime preferences like providers, models, and permissions. For TUI-specific settings, use `~/.config/opencode/tui.json`. @@ -108,7 +108,7 @@ Global config overrides remote organizational defaults. ### Per project -Add `opencode.json` in your project root. Project config has the highest precedence among standard config files - it overrides both global and remote configs. +Add `codev.json` in your project root. Project config has the highest precedence among standard config files - it overrides both global and remote configs. For project-specific TUI settings, add `tui.json` alongside it. @@ -157,7 +157,7 @@ Organizations can enforce configuration that users cannot override. Managed sett #### File-based -Drop an `opencode.json` or `opencode.jsonc` file in the system managed config directory: +Drop an `codev.json` or `codev.jsonc` file in the system managed config directory: | Platform | Path | | -------- | ---------------------------------------- | @@ -176,7 +176,7 @@ OpenCode checks these paths: 1. `/Library/Managed Preferences//ai.opencode.managed.plist` 2. `/Library/Managed Preferences/ai.opencode.managed.plist` -The plist keys map directly to `opencode.json` fields. MDM metadata keys (`PayloadUUID`, `PayloadType`, etc.) are stripped automatically. +The plist keys map directly to `codev.json` fields. MDM metadata keys (`PayloadUUID`, `PayloadType`, etc.) are stripped automatically. **Creating a `.mobileconfig`** @@ -287,7 +287,7 @@ Use `OPENCODE_TUI_CONFIG` to point to a custom TUI config file. Set `attention.enabled` to turn on TUI desktop notifications and sounds. See [TUI attention](/docs/tui#attention). -Legacy `theme`, `keybinds`, and `tui` keys in `opencode.json` are deprecated and automatically migrated when possible. +Legacy `theme`, `keybinds`, and `tui` keys in `codev.json` are deprecated and automatically migrated when possible. --- @@ -295,7 +295,7 @@ Legacy `theme`, `keybinds`, and `tui` keys in `opencode.json` are deprecated and You can configure server settings for the `opencode serve` and `opencode web` commands through the `server` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "server": { @@ -324,7 +324,7 @@ Available options: You can configure the shell used for the interactive terminal using the `shell` option. Compatible shells are also used for agent tool calls. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "shell": "pwsh" @@ -339,7 +339,7 @@ If not specified, OpenCode will automatically discover and use a sensible defaul You can manage the tools an LLM can use through the `tools` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "tools": { @@ -357,7 +357,7 @@ You can manage the tools an LLM can use through the `tools` option. You can configure the providers and models you want to use in your OpenCode config through the `provider`, `model` and `small_model` options. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": {}, @@ -370,7 +370,7 @@ The `small_model` option configures a separate model for lightweight tasks like Provider options can include `timeout`, `chunkTimeout`, and `setCacheKey`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -397,7 +397,7 @@ You can also configure [local models](/docs/models#local). [Learn more](/docs/mo Use the `experimental.policies` option to allow or deny OpenCode actions on configured resources. Currently, policies can control which providers OpenCode may use. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "experimental": { @@ -422,7 +422,7 @@ OpenCode normalizes image attachments before sending them to the model. By defau Configure image attachment limits with the `attachment.image` option: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "attachment": { @@ -453,7 +453,7 @@ Some providers support additional configuration options beyond the generic `time Amazon Bedrock supports AWS-specific configuration: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -499,7 +499,7 @@ Set your UI theme in `tui.json`. You can configure specialized agents for specific tasks through the `agent` option. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "$schema": "https://opencode.ai/config.json", "agent": { @@ -525,7 +525,7 @@ You can also define agents using markdown files in `~/.config/opencode/agents/` You can set the default agent using the `default_agent` option. This determines which agent is used when none is explicitly specified. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "default_agent": "plan" @@ -542,7 +542,7 @@ This setting applies across all interfaces: TUI, CLI (`opencode run`), desktop a You can configure the [share](/docs/share) feature through the `share` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "manual" @@ -563,7 +563,7 @@ By default, sharing is set to manual mode where you need to explicitly share con You can configure custom commands for repetitive tasks through the `command` option. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "$schema": "https://opencode.ai/config.json", "command": { @@ -610,7 +610,7 @@ OpenCode uses snapshots to track file changes during agent operations, enabling For large repositories or projects with many submodules, the snapshot system can cause slow indexing and significant disk usage as it tracks all changes using an internal git repository. You can disable snapshots using the `snapshot` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "snapshot": false @@ -625,7 +625,7 @@ Note that disabling snapshots means changes made by the agent cannot be rolled b OpenCode will automatically download any new updates when it starts up. You can disable this with the `autoupdate` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "autoupdate": false @@ -641,7 +641,7 @@ Notice that this only works if it was not installed using a package manager such You can enable and configure code formatters through the `formatter` option. Omit it to keep formatters disabled. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "formatter": true @@ -650,7 +650,7 @@ You can enable and configure code formatters through the `formatter` option. Omi Use an object to keep built-ins enabled while configuring overrides or custom formatters. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "formatter": { @@ -676,7 +676,7 @@ Use an object to keep built-ins enabled while configuring overrides or custom fo You can enable and configure LSP servers through the `lsp` option. Omit it to keep LSP disabled. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "lsp": true @@ -685,7 +685,7 @@ You can enable and configure LSP servers through the `lsp` option. Omit it to ke Use an object to keep built-ins enabled while configuring overrides or custom LSP servers. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "lsp": { @@ -706,7 +706,7 @@ By default, opencode **allows all operations** without requiring explicit approv For example, to ensure that the `edit` and `bash` tools require user approval: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -724,7 +724,7 @@ For example, to ensure that the `edit` and `bash` tools require user approval: You can control context compaction behavior through the `compaction` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "compaction": { @@ -745,7 +745,7 @@ You can control context compaction behavior through the `compaction` option. You can configure file watcher ignore patterns through the `watcher` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "watcher": { @@ -762,7 +762,7 @@ Patterns follow glob syntax. Use this to exclude noisy directories from file wat You can configure MCP servers you want to use through the `mcp` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "mcp": {} @@ -779,7 +779,7 @@ You can configure MCP servers you want to use through the `mcp` option. Place plugin files in `.opencode/plugins/` or `~/.config/opencode/plugins/`. You can also load plugins from npm through the `plugin` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-helicone-session", "@my-org/custom-plugin"] @@ -794,7 +794,7 @@ Place plugin files in `.opencode/plugins/` or `~/.config/opencode/plugins/`. You You can configure the instructions for the model you're using through the `instructions` option. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["CONTRIBUTING.md", "docs/guidelines.md", ".cursor/rules/*.md"] @@ -810,7 +810,7 @@ about rules here](/docs/rules). You can disable providers that are loaded automatically through the `disabled_providers` option. This is useful when you want to prevent certain providers from being loaded even if their credentials are available. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "disabled_providers": ["openai", "gemini"] @@ -833,7 +833,7 @@ The `disabled_providers` option accepts an array of provider IDs. When a provide You can specify an allowlist of providers through the `enabled_providers` option. When set, only the specified providers will be enabled and all others will be ignored. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "enabled_providers": ["anthropic", "openai"] @@ -854,7 +854,7 @@ If a provider appears in both `enabled_providers` and `disabled_providers`, the The `experimental` key contains options that are under active development. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "experimental": {} @@ -877,7 +877,7 @@ You can use variable substitution in your config files to reference environment Use `{env:VARIABLE_NAME}` to substitute environment variables: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "model": "{env:OPENCODE_MODEL}", @@ -900,7 +900,7 @@ If the environment variable is not set, it will be replaced with an empty string Use `{file:path/to/file}` to substitute the contents of a file: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["./custom-instructions.md"], diff --git a/packages/web/src/content/docs/enterprise.mdx b/packages/web/src/content/docs/enterprise.mdx index a93134de62..7a47350ab8 100644 --- a/packages/web/src/content/docs/enterprise.mdx +++ b/packages/web/src/content/docs/enterprise.mdx @@ -43,7 +43,7 @@ The data is currently served through our CDN's edge network, and is cached on th We recommend you disable this for your trial. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "disabled" diff --git a/packages/web/src/content/docs/es/agents.mdx b/packages/web/src/content/docs/es/agents.mdx index c98a4eb99e..fad1078e15 100644 --- a/packages/web/src/content/docs/es/agents.mdx +++ b/packages/web/src/content/docs/es/agents.mdx @@ -144,9 +144,9 @@ Puede personalizar los agentes integrados o crear los suyos propios mediante la ### JSON -Configure agentes en su archivo de configuración `opencode.json`: +Configure agentes en su archivo de configuración `codev.json`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "agent": { @@ -228,7 +228,7 @@ Veamos estas opciones de configuración en detalle. Utilice la opción `description` para proporcionar una breve descripción de lo que hace el agente y cuándo usarlo. -```json title="opencode.json" +```json title="codev.json" { "agent": { "review": { @@ -248,7 +248,7 @@ Controle la aleatoriedad y la creatividad de las respuestas de LLM con la config Los valores más bajos hacen que las respuestas sean más centradas y deterministas, mientras que los valores más altos aumentan la creatividad y la variabilidad. -```json title="opencode.json" +```json title="codev.json" { "agent": { "plan": { @@ -267,7 +267,7 @@ Los valores de temperatura suelen oscilar entre 0,0 y 1,0: - **0,3-0,5**: respuestas equilibradas con algo de creatividad, buenas para tareas de desarrollo general. - **0.6-1.0**: respuestas más creativas y variadas, útiles para la lluvia de ideas y la exploración. -```json title="opencode.json" +```json title="codev.json" { "agent": { "analyze": { @@ -295,7 +295,7 @@ Controle la cantidad máxima de iteraciones agentes que un agente puede realizar Si no se establece esto, el agente continuará iterando hasta que el modelo decida detenerse o el usuario interrumpa la sesión. -```json title="opencode.json" +```json title="codev.json" { "agent": { "quick-thinker": { @@ -319,7 +319,7 @@ El campo heredado `maxSteps` está en desuso. Utilice `steps` en su lugar. Establezca en `true` para deshabilitar el agente. -```json title="opencode.json" +```json title="codev.json" { "agent": { "review": { @@ -335,7 +335,7 @@ Establezca en `true` para deshabilitar el agente. Especifique un archivo de aviso del sistema personalizado para este agente con la configuración `prompt`. El archivo de aviso debe contener instrucciones específicas para el propósito del agente. -```json title="opencode.json" +```json title="codev.json" { "agent": { "review": { @@ -357,7 +357,7 @@ Utilice la configuración `model` para anular el modelo de este agente. Útil pa Si no especifica un modelo, los agentes primarios usarán el [modelo configurado globalmente](/docs/config#models), mientras que los subagentes usarán el modelo del agente primario que invocó al subagente. ::: -```json title="opencode.json" +```json title="codev.json" { "agent": { "plan": { @@ -375,7 +375,7 @@ El ID del modelo en su configuración OpenCode usa el formato `provider/model-id Controle qué herramientas están disponibles en este agente con la configuración `tools`. Puede habilitar o deshabilitar herramientas específicas configurándolas en `true` o `false`. -```json title="opencode.json" {3-6,9-12} +```json title="codev.json" {3-6,9-12} { "$schema": "https://opencode.ai/config.json", "tools": { @@ -399,7 +399,7 @@ La configuración específica del agente anula la configuración global. También puedes utilizar comodines para controlar varias herramientas a la vez. Por ejemplo, para desactivar todas las herramientas de un servidor MCP: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "agent": { @@ -426,7 +426,7 @@ Puede configurar permisos para administrar qué acciones puede realizar un agent - `"allow"` — Permitir todas las operaciones sin aprobación - `"deny"` — Desactiva la herramienta -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -437,7 +437,7 @@ Puede configurar permisos para administrar qué acciones puede realizar un agent Puede anular estos permisos por agente. -```json title="opencode.json" {3-5,8-10} +```json title="codev.json" {3-5,8-10} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -474,7 +474,7 @@ Only analyze code and suggest changes. Puede establecer permisos para comandos bash específicos. -```json title="opencode.json" {7} +```json title="codev.json" {7} { "$schema": "https://opencode.ai/config.json", "agent": { @@ -492,7 +492,7 @@ Puede establecer permisos para comandos bash específicos. Esto puede tomar un patrón global. -```json title="opencode.json" {7} +```json title="codev.json" {7} { "$schema": "https://opencode.ai/config.json", "agent": { @@ -510,7 +510,7 @@ Esto puede tomar un patrón global. Y también puedes usar el comodín `*` para administrar los permisos de todos los comandos. Dado que la última regla de coincidencia tiene prioridad, coloque el comodín `*` primero y las reglas específicas después. -```json title="opencode.json" {8} +```json title="codev.json" {8} { "$schema": "https://opencode.ai/config.json", "agent": { @@ -534,7 +534,7 @@ Dado que la última regla de coincidencia tiene prioridad, coloque el comodín ` Controle el modo del agente con la configuración `mode`. La opción `mode` se utiliza para determinar cómo se puede utilizar el agente. -```json title="opencode.json" +```json title="codev.json" { "agent": { "review": { @@ -552,7 +552,7 @@ La opción `mode` se puede configurar en `primary`, `subagent` o `all`. Si no se Oculte un subagente del menú de autocompletar `@` con `hidden: true`. Útil para subagentes internos que solo deben ser invocados mediante programación por otros agentes a través de la herramienta Tarea. -```json title="opencode.json" +```json title="codev.json" { "agent": { "internal-helper": { @@ -575,7 +575,7 @@ Sólo aplica para agentes `mode: subagent`. Controle qué subagentes puede invocar un agente a través de la herramienta Tarea con `permission.task`. Utiliza patrones globales para una combinación flexible. -```json title="opencode.json" +```json title="codev.json" { "agent": { "orchestrator": { @@ -610,7 +610,7 @@ Personalice la apariencia visual del agente en la interfaz de usuario con la opc Utilice un color hexadecimal válido (por ejemplo, `#FF5733`) o un color de tema: `primary`, `secondary`, `accent`, `success`, `warning`, `error`, `info`. -```json title="opencode.json" +```json title="codev.json" { "agent": { "creative": { @@ -629,7 +629,7 @@ Utilice un color hexadecimal válido (por ejemplo, `#FF5733`) o un color de tema Controle la diversidad de respuestas con la opción `top_p`. Alternativa a la temperatura para controlar la aleatoriedad. -```json title="opencode.json" +```json title="codev.json" { "agent": { "brainstorm": { @@ -649,7 +649,7 @@ Cualquier otra opción que especifique en la configuración de su agente se **pa Por ejemplo, con los modelos de razonamiento de OpenAI, puedes controlar el esfuerzo de razonamiento: -```json title="opencode.json" {6,7} +```json title="codev.json" {6,7} { "agent": { "deep-thinker": { diff --git a/packages/web/src/content/docs/es/commands.mdx b/packages/web/src/content/docs/es/commands.mdx index 68b9da1cfa..8b5eabf30a 100644 --- a/packages/web/src/content/docs/es/commands.mdx +++ b/packages/web/src/content/docs/es/commands.mdx @@ -50,7 +50,7 @@ Puede agregar comandos personalizados a través de la configuración OpenCode o Utilice la opción `command` en su OpenCode [config](/docs/config): -```json title="opencode.jsonc" {4-12} +```json title="codev.jsonc" {4-12} { "$schema": "https://opencode.ai/config.json", "command": { @@ -222,7 +222,7 @@ Veamos las opciones de configuración en detalle. La opción `template` define el mensaje que se enviará al LLM cuando se ejecute el comando. -```json title="opencode.json" +```json title="codev.json" { "command": { "test": { @@ -240,7 +240,7 @@ Esta es una opción de configuración **obligatoria**. Utilice la opción `description` para proporcionar una breve descripción de lo que hace el comando. -```json title="opencode.json" +```json title="codev.json" { "command": { "test": { @@ -260,7 +260,7 @@ Utilice la configuración `agent` para especificar opcionalmente qué [agente](/ Si se trata de un [subagente](/docs/agents/#subagents), el comando activará una invocación de subagente de forma predeterminada. Para desactivar este comportamiento, establezca `subtask` en `false`. -```json title="opencode.json" +```json title="codev.json" { "command": { "review": { @@ -280,7 +280,7 @@ Utilice el booleano `subtask` para forzar que el comando active una invocación Esto es útil si desea que el comando no contamine su contexto principal y **obligue** al agente a actuar como subagente. incluso si `mode` está configurado en `primary` en la configuración de [agente](/docs/agents). -```json title="opencode.json" +```json title="codev.json" { "command": { "analyze": { @@ -298,7 +298,7 @@ Esta es una opción de configuración **opcional**. Utilice la configuración `model` para anular el modelo predeterminado para este comando. -```json title="opencode.json" +```json title="codev.json" { "command": { "analyze": { diff --git a/packages/web/src/content/docs/es/config.mdx b/packages/web/src/content/docs/es/config.mdx index 4b0ad5d54f..b20aac85b5 100644 --- a/packages/web/src/content/docs/es/config.mdx +++ b/packages/web/src/content/docs/es/config.mdx @@ -11,7 +11,7 @@ Puede configurar OpenCode usando un archivo de configuración JSON. OpenCode admite los formatos **JSON** y **JSONC** (JSON con comentarios). -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "$schema": "https://opencode.ai/config.json", // Theme configuration @@ -43,9 +43,9 @@ Por ejemplo, si su configuración global establece `theme: "opencode"` y `autoup Las fuentes de configuración se cargan en este orden (las fuentes posteriores anulan las anteriores): 1. **Configuración remota** (de `.well-known/opencode`): valores predeterminados de la organización -2. **Configuración global** (`~/.config/opencode/opencode.json`) - preferencias del usuario +2. **Configuración global** (`~/.config/opencode/codev.json`) - preferencias del usuario 3. **Configuración personalizada** (`OPENCODE_CONFIG` env var): anulaciones personalizadas -4. **Configuración del proyecto** (`opencode.json` en el proyecto): configuración específica del proyecto +4. **Configuración del proyecto** (`codev.json` en el proyecto): configuración específica del proyecto 5. Directorios **`.opencode`** - agentes, comandos, complementos 6. **Configuración en línea** (`OPENCODE_CONFIG_CONTENT` env var): anulaciones del tiempo de ejecución @@ -79,7 +79,7 @@ Por ejemplo, si su organización proporciona servidores MCP que están deshabili Puede habilitar servidores específicos en su configuración local: -```json title="opencode.json" +```json title="codev.json" { "mcp": { "jira": { @@ -95,7 +95,7 @@ Puede habilitar servidores específicos en su configuración local: ### Global -Coloque su configuración global OpenCode en `~/.config/opencode/opencode.json`. Utilice la configuración global para las preferencias de todo el usuario, como temas, proveedores o combinaciones de teclas. +Coloque su configuración global OpenCode en `~/.config/opencode/codev.json`. Utilice la configuración global para las preferencias de todo el usuario, como temas, proveedores o combinaciones de teclas. La configuración global anula los valores predeterminados de la organización remota. @@ -103,7 +103,7 @@ La configuración global anula los valores predeterminados de la organización r ### Por proyecto -Agregue `opencode.json` en la raíz de su proyecto. La configuración del proyecto tiene la mayor prioridad entre los archivos de configuración estándar: anula las configuraciones globales y remotas. +Agregue `codev.json` en la raíz de su proyecto. La configuración del proyecto tiene la mayor prioridad entre los archivos de configuración estándar: anula las configuraciones globales y remotas. :::tip Coloque la configuración específica del proyecto en la raíz de su proyecto. @@ -156,7 +156,7 @@ Su editor debería poder validar y autocompletar según el esquema. Puede configurar ajustes específicos de TUI a través de la opción `tui`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "tui": { @@ -183,7 +183,7 @@ Opciones disponibles: Puede configurar los ajustes del servidor para los comandos `opencode serve` y `opencode web` a través de la opción `server`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "server": { @@ -212,7 +212,7 @@ Opciones disponibles: Puede administrar las herramientas que un LLM puede usar a través de la opción `tools`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "tools": { @@ -230,7 +230,7 @@ Puede administrar las herramientas que un LLM puede usar a través de la opción Puede configurar los proveedores y modelos que desea utilizar en su configuración OpenCode a través de las opciones `provider`, `model` y `small_model`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": {}, @@ -243,7 +243,7 @@ La opción `small_model` configura un modelo separado para tareas livianas como Las opciones de proveedores pueden incluir `timeout` y `setCacheKey`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -272,7 +272,7 @@ Algunos proveedores admiten opciones de configuración adicionales más allá de Amazon Bedrock admite la configuración específica de AWS: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -303,7 +303,7 @@ Los tokens de portador (`AWS_BEARER_TOKEN_BEDROCK` o `/connect`) tienen priorida Puede configurar el tema que desea usar en su configuración OpenCode a través de la opción `theme`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "theme": "" @@ -318,7 +318,7 @@ Puede configurar el tema que desea usar en su configuración OpenCode a través Puedes configurar agentes especializados para tareas específicas a través de la opción `agent`. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "$schema": "https://opencode.ai/config.json", "agent": { @@ -344,7 +344,7 @@ También puede definir agentes utilizando archivos de Markdown en `~/.config/ope Puede configurar el agente predeterminado usando la opción `default_agent`. Esto determina qué agente se utiliza cuando no se especifica ninguno explícitamente. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "default_agent": "plan" @@ -361,7 +361,7 @@ Esta configuración se aplica en todas las interfaces: TUI, CLI (`opencode run`) Puede configurar la función [compartir](/docs/share) a través de la opción `share`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "manual" @@ -382,7 +382,7 @@ De forma predeterminada, el uso compartido está configurado en modo manual, don Puede configurar comandos personalizados para tareas repetitivas a través de la opción `command`. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "$schema": "https://opencode.ai/config.json", "command": { @@ -408,7 +408,7 @@ También puede definir comandos utilizando archivos de Markdown en `~/.config/op Puede personalizar sus combinaciones de teclas a través de la opción `keybinds`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "keybinds": {} @@ -423,7 +423,7 @@ Puede personalizar sus combinaciones de teclas a través de la opción `keybinds OpenCode descargará automáticamente cualquier actualización nueva cuando se inicie. Puede desactivar esto con la opción `autoupdate`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "autoupdate": false @@ -439,7 +439,7 @@ Tenga en cuenta que esto sólo funciona si no se instaló mediante un administra Puede configurar formateadores de código a través de la opción `formatter`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "formatter": { @@ -467,7 +467,7 @@ De forma predeterminada, opencode **permite todas las operaciones** sin requerir Por ejemplo, para garantizar que las herramientas `edit` y `bash` requieran la aprobación del usuario: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -485,7 +485,7 @@ Por ejemplo, para garantizar que las herramientas `edit` y `bash` requieran la a Puede controlar el comportamiento de compactación del contexto a través de la opción `compaction`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "compaction": { @@ -504,7 +504,7 @@ Puede controlar el comportamiento de compactación del contexto a través de la Puede configurar patrones de ignorancia del observador de archivos a través de la opción `watcher`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "watcher": { @@ -521,7 +521,7 @@ Los patrones siguen la sintaxis global. Utilice esto para excluir directorios ru Puede configurar los servidores MCP que desee utilizar a través de la opción `mcp`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "mcp": {} @@ -538,7 +538,7 @@ Los [complementos](/docs/plugins) amplían OpenCode con herramientas, enlaces e Coloque los archivos de complemento en `.opencode/plugins/` o `~/.config/opencode/plugins/`. También puedes cargar complementos desde npm a través de la opción `plugin`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-helicone-session", "@my-org/custom-plugin"] @@ -553,7 +553,7 @@ Coloque los archivos de complemento en `.opencode/plugins/` o `~/.config/opencod Puedes configurar las instrucciones para el modelo que estás usando a través de la opción `instructions`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["CONTRIBUTING.md", "docs/guidelines.md", ".cursor/rules/*.md"] @@ -569,7 +569,7 @@ sobre las reglas aquí](/docs/rules). Puede deshabilitar proveedores que se cargan automáticamente a través de la opción `disabled_providers`. Esto es útil cuando desea evitar que se carguen ciertos proveedores incluso si sus credenciales están disponibles. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "disabled_providers": ["openai", "gemini"] @@ -592,7 +592,7 @@ La opción `disabled_providers` acepta una variedad de ID de proveedores. Cuando Puede especificar una lista de proveedores permitidos a través de la opción `enabled_providers`. Cuando se establece, solo se habilitarán los proveedores especificados y se ignorarán todos los demás. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "enabled_providers": ["anthropic", "openai"] @@ -613,7 +613,7 @@ Si un proveedor aparece tanto en `enabled_providers` como en `disabled_providers La clave `experimental` contiene opciones que se encuentran en desarrollo activo. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "experimental": {} @@ -636,7 +636,7 @@ Puede utilizar la sustitución de variables en sus archivos de configuración pa Utilice `{env:VARIABLE_NAME}` para sustituir variables de entorno: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "model": "{env:OPENCODE_MODEL}", @@ -659,7 +659,7 @@ Si la variable de entorno no está configurada, se reemplazará con una cadena v Utilice `{file:path/to/file}` para sustituir el contenido de un archivo: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["./custom-instructions.md"], diff --git a/packages/web/src/content/docs/es/enterprise.mdx b/packages/web/src/content/docs/es/enterprise.mdx index 787ff095a1..0c1cd0a32e 100644 --- a/packages/web/src/content/docs/es/enterprise.mdx +++ b/packages/web/src/content/docs/es/enterprise.mdx @@ -44,7 +44,7 @@ Actualmente, los datos se entregan a través de la red perimetral de nuestra CDN Le recomendamos que desactive esto para su prueba. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "disabled" diff --git a/packages/web/src/content/docs/es/formatters.mdx b/packages/web/src/content/docs/es/formatters.mdx index c17baf6e16..0cec4eea1a 100644 --- a/packages/web/src/content/docs/es/formatters.mdx +++ b/packages/web/src/content/docs/es/formatters.mdx @@ -59,7 +59,7 @@ Este proceso ocurre en segundo plano, lo que garantiza que los estilos de su có Puede personalizar los formateadores a través de la sección `formatter` en su configuración OpenCode. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "formatter": {} @@ -83,7 +83,7 @@ Veamos algunos ejemplos. Para deshabilitar **todos** los formateadores globalmente, configure `formatter` en `false`: -```json title="opencode.json" {3} +```json title="codev.json" {3} { "$schema": "https://opencode.ai/config.json", "formatter": false @@ -92,7 +92,7 @@ Para deshabilitar **todos** los formateadores globalmente, configure `formatter` Para deshabilitar un formateador **específico**, establezca `disabled` en `true`: -```json title="opencode.json" {5} +```json title="codev.json" {5} { "$schema": "https://opencode.ai/config.json", "formatter": { @@ -109,7 +109,7 @@ Para deshabilitar un formateador **específico**, establezca `disabled` en `true Puede anular los formateadores integrados o agregar otros nuevos especificando el comando, las variables de entorno y las extensiones de archivo: -```json title="opencode.json" {4-14} +```json title="codev.json" {4-14} { "$schema": "https://opencode.ai/config.json", "formatter": { diff --git a/packages/web/src/content/docs/es/keybinds.mdx b/packages/web/src/content/docs/es/keybinds.mdx index 2fc57fa69f..4529b97a42 100644 --- a/packages/web/src/content/docs/es/keybinds.mdx +++ b/packages/web/src/content/docs/es/keybinds.mdx @@ -134,7 +134,7 @@ Puede deshabilitar una combinación de teclas agregando la clave a `tui.json` co ## Atajos de mensajes de escritorio -La entrada de solicitud de la aplicación de escritorio OpenCode admite atajos comunes de estilo Readline/Emacs para editar texto. Estos están integrados y actualmente no se pueden configurar a través de `opencode.json`. +La entrada de solicitud de la aplicación de escritorio OpenCode admite atajos comunes de estilo Readline/Emacs para editar texto. Estos están integrados y actualmente no se pueden configurar a través de `codev.json`. | Atajo | Acción | | -------- | -------------------------------------------------------------- | diff --git a/packages/web/src/content/docs/es/lsp.mdx b/packages/web/src/content/docs/es/lsp.mdx index 726d720581..fd408cfef5 100644 --- a/packages/web/src/content/docs/es/lsp.mdx +++ b/packages/web/src/content/docs/es/lsp.mdx @@ -78,7 +78,7 @@ Puede habilitar y personalizar los servidores LSP a través de la sección `lsp` Para habilitar todos los servidores LSP integrados, configure `lsp` como `true`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "lsp": true @@ -87,7 +87,7 @@ Para habilitar todos los servidores LSP integrados, configure `lsp` como `true`. Use un objeto para mantener habilitados los servidores integrados mientras configura anulaciones o servidores personalizados. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "lsp": {} @@ -112,7 +112,7 @@ Veamos algunos ejemplos. Utilice la propiedad `env` para establecer variables de entorno al iniciar el servidor LSP: -```json title="opencode.json" {5-7} +```json title="codev.json" {5-7} { "$schema": "https://opencode.ai/config.json", "lsp": { @@ -131,7 +131,7 @@ Utilice la propiedad `env` para establecer variables de entorno al iniciar el se Utilice la propiedad `initialization` para pasar opciones de inicialización al servidor LSP. Estas son configuraciones específicas del servidor enviadas durante la solicitud LSP `initialize`: -```json title="opencode.json" {5-9} +```json title="codev.json" {5-9} { "$schema": "https://opencode.ai/config.json", "lsp": { @@ -156,7 +156,7 @@ Las opciones de inicialización varían según el servidor LSP. Consulte la docu Si se omite `lsp`, todos los servidores LSP están deshabilitados. Para deshabilitar todos los servidores LSP después de que otra configuración los haya habilitado, configure `lsp` en `false`: -```json title="opencode.json" {3} +```json title="codev.json" {3} { "$schema": "https://opencode.ai/config.json", "lsp": false @@ -165,7 +165,7 @@ Si se omite `lsp`, todos los servidores LSP están deshabilitados. Para deshabil Para deshabilitar un servidor LSP **específico**, configure `disabled` en `true`: -```json title="opencode.json" {5} +```json title="codev.json" {5} { "$schema": "https://opencode.ai/config.json", "lsp": { @@ -182,7 +182,7 @@ Para deshabilitar un servidor LSP **específico**, configure `disabled` en `true Puede agregar servidores LSP personalizados especificando el comando y las extensiones de archivo: -```json title="opencode.json" {4-7} +```json title="codev.json" {4-7} { "$schema": "https://opencode.ai/config.json", "lsp": { diff --git a/packages/web/src/content/docs/es/mcp-servers.mdx b/packages/web/src/content/docs/es/mcp-servers.mdx index 3b1cabac39..ea1afcba47 100644 --- a/packages/web/src/content/docs/es/mcp-servers.mdx +++ b/packages/web/src/content/docs/es/mcp-servers.mdx @@ -25,7 +25,7 @@ Ciertos servidores MCP, como el servidor GitHub MCP, tienden a agregar muchos to Puede definir servidores MCP en su [OpenCode Config](https://opencode.ai/docs/config/) en `mcp`. Agregue cada MCP con un nombre único. Puede referirse a ese MCP por su nombre cuando solicite el LLM. -```jsonc title="opencode.jsonc" {6} +```jsonc title="codev.jsonc" {6} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -50,7 +50,7 @@ Las organizaciones pueden proporcionar servidores MCP predeterminados a través Para habilitar un servidor específico desde la configuración remota de su organización, agréguelo a su configuración local con `enabled: true`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -71,7 +71,7 @@ Los valores de configuración local anulan los valores predeterminados remotos. Agregue servidores MCP locales usando `type` a `"local"` dentro del objeto MCP. -```jsonc title="opencode.jsonc" {15} +```jsonc title="codev.jsonc" {15} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -92,7 +92,7 @@ El comando es cómo se inicia el servidor MCP local. También puede pasar una li Por ejemplo, así es como puede agregar el servidor de prueba [`@modelcontextprotocol/server-everything`](https://www.npmjs.com/package/@modelcontextprotocol/server-everything) MCP. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -130,7 +130,7 @@ Aquí están todas las opciones para configurar un servidor MCP local. Agregue servidores MCP remotos configurando `type` en `"remote"`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -177,7 +177,7 @@ OpenCode maneja automáticamente la autenticación OAuth para servidores MCP rem Para la mayoría de los servidores MCP habilitados para OAuth, no se necesita ninguna configuración especial. Simplemente configure el servidor remoto: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -197,7 +197,7 @@ Si el servidor requiere autenticación, OpenCode le pedirá que se autentique cu Si tiene credenciales de cliente del proveedor del servidor MCP, puede configurarlas: -```json title="opencode.json" {7-11} +```json title="codev.json" {7-11} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -246,7 +246,7 @@ El comando `mcp auth` abrirá su navegador para obtener autorización. Después Si desea deshabilitar el OAuth automático para un servidor (por ejemplo, para servidores que usan claves API), configure `oauth` en `false`: -```json title="opencode.json" {7} +```json title="codev.json" {7} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -299,7 +299,7 @@ Sus MCP están disponibles como herramientas en OpenCode, junto con herramientas Esto significa que puede habilitarlos o deshabilitarlos globalmente. -```json title="opencode.json" {14} +```json title="codev.json" {14} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -320,7 +320,7 @@ Esto significa que puede habilitarlos o deshabilitarlos globalmente. También podemos usar un patrón global para deshabilitar todos los MCP coincidentes. -```json title="opencode.json" {14} +```json title="codev.json" {14} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -350,7 +350,7 @@ Si tiene una gran cantidad de servidores MCP, es posible que desee habilitarlos 1. Desactívelo como herramienta a nivel global. 2. En su [configuración del agente](/docs/agents#tools), habilite el servidor MCP como herramienta. -```json title="opencode.json" {11, 14-18} +```json title="codev.json" {11, 14-18} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -404,7 +404,7 @@ A continuación se muestran ejemplos de algunos servidores MCP comunes. Puede en Agregue el [servidor Sentry MCP](https://mcp.sentry.dev) para interactuar con sus proyectos y problemas Sentry. -```json title="opencode.json" {4-8} +```json title="codev.json" {4-8} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -437,7 +437,7 @@ Show me the latest unresolved issues in my project. use sentry Agregue el [servidor Context7 MCP](https://github.com/upstash/context7) para buscar en los documentos. -```json title="opencode.json" {4-7} +```json title="codev.json" {4-7} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -451,7 +451,7 @@ Agregue el [servidor Context7 MCP](https://github.com/upstash/context7) para bus Si se ha registrado para obtener una cuenta gratuita, puede usar su clave API y obtener límites de tarifas más altos. -```json title="opencode.json" {7-9} +```json title="codev.json" {7-9} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -486,7 +486,7 @@ When you need to search docs, use `context7` tools. Agregue el servidor [Grep by Vercel](https://grep.app) MCP para buscar fragmentos de código en GitHub. -```json title="opencode.json" {4-7} +```json title="codev.json" {4-7} { "$schema": "https://opencode.ai/config.json", "mcp": { diff --git a/packages/web/src/content/docs/es/models.mdx b/packages/web/src/content/docs/es/models.mdx index a722fa0a87..8539ff678d 100644 --- a/packages/web/src/content/docs/es/models.mdx +++ b/packages/web/src/content/docs/es/models.mdx @@ -51,7 +51,7 @@ Aqui tienes varios modelos que funcionan bien con OpenCode, sin orden particular Para configurar uno de estos como modelo predeterminado, puedes definir la clave `model` en tu configuracion de OpenCode. -```json title="opencode.json" {3} +```json title="codev.json" {3} { "$schema": "https://opencode.ai/config.json", "model": "lmstudio/google/gemma-3n-e4b" @@ -68,7 +68,7 @@ Si ha configurado un [proveedor personalizado](/docs/providers#custom), `provide Puede configurar globalmente las opciones de un modelo a través de la configuración. -```jsonc title="opencode.jsonc" {7-12,19-24} +```jsonc title="codev.jsonc" {7-12,19-24} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -107,7 +107,7 @@ También puede configurar estas opciones para cualquier agente que esté utiliza También puede definir variantes personalizadas que amplíen las integradas. Las variantes le permiten configurar diferentes ajustes para el mismo modelo sin crear entradas duplicadas: -```jsonc title="opencode.jsonc" {6-21} +```jsonc title="codev.jsonc" {6-21} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -172,7 +172,7 @@ Esta lista no es exhaustiva. Muchos otros proveedores también tienen valores pr Puede anular las variantes existentes o agregar las suyas propias: -```jsonc title="opencode.jsonc" {7-18} +```jsonc title="codev.jsonc" {7-18} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -209,7 +209,7 @@ Cuando se inicia OpenCode, busca modelos en el siguiente orden de prioridad: 2. La lista de modelos en la configuración OpenCode. - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "model": "anthropic/claude-sonnet-4-20250514" diff --git a/packages/web/src/content/docs/es/permissions.mdx b/packages/web/src/content/docs/es/permissions.mdx index af6e5f3e44..28d1ef85b2 100644 --- a/packages/web/src/content/docs/es/permissions.mdx +++ b/packages/web/src/content/docs/es/permissions.mdx @@ -23,7 +23,7 @@ Cada regla de permiso se resuelve en una de: Puede establecer permisos globalmente (con `*`) y anular herramientas específicas. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -36,7 +36,7 @@ Puede establecer permisos globalmente (con `*`) y anular herramientas específic También puedes configurar todos los permisos a la vez: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": "allow" @@ -49,7 +49,7 @@ También puedes configurar todos los permisos a la vez: Para la mayoría de los permisos, puede utilizar un objeto para aplicar diferentes acciones según la entrada de la herramienta. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -94,7 +94,7 @@ La expansión del hogar (como `~/...`) solo afecta la forma en que se escribe un Por ejemplo, esto permite el acceso a todo lo que se encuentra en `~/projects/personal/`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -107,7 +107,7 @@ Por ejemplo, esto permite el acceso a todo lo que se encuentra en `~/projects/pe Cualquier directorio permitido aquí hereda los mismos valores predeterminados que el espacio de trabajo actual. Dado que [`read` tiene por defecto `allow`](#defaults), también se permiten lecturas para entradas bajo `external_directory` a menos que se anulen. Agregue reglas explícitas cuando una herramienta deba restringirse en estas rutas, como bloquear ediciones mientras se mantienen las lecturas: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -152,7 +152,7 @@ Si no especifica nada, OpenCode comienza desde valores predeterminados permisivo - `doom_loop` y `external_directory` por defecto son `"ask"`. - `read` es `"allow"`, pero los archivos `.env` están denegados de forma predeterminada: -```json title="opencode.json" +```json title="codev.json" { "permission": { "read": { @@ -187,7 +187,7 @@ Puede anular los permisos por agente. Los permisos del agente se combinan con la Consulte la sección [Reglas granulares (sintaxis de objeto)](#granular-rules-object-syntax) anterior para obtener ejemplos de coincidencia de patrones más detallados. ::: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { diff --git a/packages/web/src/content/docs/es/plugins.mdx b/packages/web/src/content/docs/es/plugins.mdx index dc44180725..46d8769f3a 100644 --- a/packages/web/src/content/docs/es/plugins.mdx +++ b/packages/web/src/content/docs/es/plugins.mdx @@ -30,7 +30,7 @@ Los archivos en estos directorios se cargan automáticamente al inicio. Especifique paquetes npm en su archivo de configuración. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-helicone-session", "opencode-wakatime", "@my-org/custom-plugin"] @@ -55,8 +55,8 @@ Los **complementos npm** se instalan automáticamente usando Bun al inicio. Los Los complementos se cargan desde todas las fuentes y todos los enlaces se ejecutan en secuencia. El orden de carga es: -1. Configuración global (`~/.config/opencode/opencode.json`) -2. Configuración del proyecto (`opencode.json`) +1. Configuración global (`~/.config/opencode/codev.json`) +2. Configuración del proyecto (`codev.json`) 3. Directorio global de complementos (`~/.config/opencode/plugins/`) 4. Directorio de complementos del proyecto (`.opencode/plugins/`) diff --git a/packages/web/src/content/docs/es/providers.mdx b/packages/web/src/content/docs/es/providers.mdx index 11489609bc..fcdd384fac 100644 --- a/packages/web/src/content/docs/es/providers.mdx +++ b/packages/web/src/content/docs/es/providers.mdx @@ -33,7 +33,7 @@ configuración. Puede personalizar la URL base para cualquier proveedor configurando la opción `baseURL`. Esto resulta útil cuando se utilizan servicios proxy o puntos finales personalizados. -```json title="opencode.json" {6} +```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -191,9 +191,9 @@ Para usar Amazon Bedrock con OpenCode: #### Archivo de configuración (recomendado) - Para una configuración persistente o específica del proyecto, utilice `opencode.json`: + Para una configuración persistente o específica del proyecto, utilice `codev.json`: - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -220,7 +220,7 @@ Para usar Amazon Bedrock con OpenCode: Si utiliza puntos de enlace de VPC para Bedrock: - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -264,7 +264,7 @@ Para usar Amazon Bedrock con OpenCode: :::note Para perfiles de inferencia personalizados, utilice el modelo y el nombre del proveedor en la clave y establezca la propiedad `id` en arn. Esto garantiza un almacenamiento en caché correcto: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -326,7 +326,7 @@ O si ya tienes una clave API, puedes seleccionar **Ingresar manualmente la clave Puedes configurar opencode para usar modelos locales mediante [Atomic Chat](https://atomic.chat), una aplicación de escritorio que ejecuta LLMs locales detrás de un servidor API compatible con OpenAI (endpoint por defecto `http://127.0.0.1:1337/v1`). -```json title="opencode.json" "atomic-chat" {5, 6, 8, 10-14} +```json title="codev.json" "atomic-chat" {5, 6, 8, 10-14} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -554,7 +554,7 @@ Cloudflare AI Gateway le permite acceder a modelos de OpenAI, Anthropic, Workers También puede agregar modelos a través de su configuración opencode. - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -759,7 +759,7 @@ para almacenar el token en el almacenamiento de autenticación opencode. OpenCode utiliza un modelo pequeño para algunas tareas de IA, como generar el título de la sesión. Está configurado para usar gpt-5-nano de forma predeterminada, alojado por Zen. Para bloquear OpenCode Para usar solo su propia instancia alojada en GitLab, agregue lo siguiente a su -Archivo `opencode.json`. También se recomienda desactivar el uso compartido de sesiones. +Archivo `codev.json`. También se recomienda desactivar el uso compartido de sesiones. ```json { @@ -821,9 +821,9 @@ Más documentación en la página de inicio de [opencode-gitlab-auth](https://ww ##### Configuración -Personalizar a través de `opencode.json`: +Personalizar a través de `codev.json`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -840,7 +840,7 @@ Personalizar a través de `opencode.json`: Para acceder a herramientas GitLab (solicitudes de fusión, problemas, canalizaciones, CI/CD, etc.): -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-gitlab-plugin"] @@ -1022,7 +1022,7 @@ En caso de que vea una característica o modelo de Helicone que no esté configu Aquí está el [Directorio de modelos de Helicone](https://helicone.ai/models), lo necesitará para obtener las ID de los modelos que desea agregar. -```jsonc title="~/.config/opencode/opencode.jsonc" +```jsonc title="~/.config/opencode/codev.jsonc" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1050,7 +1050,7 @@ Aquí está el [Directorio de modelos de Helicone](https://helicone.ai/models), Helicone admite encabezados personalizados para funciones como almacenamiento en caché, seguimiento de usuarios y gestión de sesiones. Agréguelos a la configuración de su proveedor usando `options.headers`: -```jsonc title="~/.config/opencode/opencode.jsonc" +```jsonc title="~/.config/opencode/codev.jsonc" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1079,7 +1079,7 @@ npm install -g opencode-helicone-session Agréguelo a su configuración. -```json title="opencode.json" +```json title="codev.json" { "plugin": ["opencode-helicone-session"] } @@ -1104,7 +1104,7 @@ Consulte el [Directorio de encabezados de Helicone](https://docs.helicone.ai/hel Puede configurar opencode para usar modelos locales a través de la utilidad llama-server de [llama.cpp](https://github.com/ggml-org/llama.cpp) -```json title="opencode.json" "llama.cpp" {5, 6, 8, 10-15} +```json title="codev.json" "llama.cpp" {5, 6, 8, 10-15} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1171,7 +1171,7 @@ IO.NET ofrece 17 modelos optimizados para varios casos de uso: Puede configurar opencode para usar modelos locales a través de LM Studio. -```json title="opencode.json" "lmstudio" {5, 6, 8, 10-14} +```json title="codev.json" "lmstudio" {5, 6, 8, 10-14} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1292,7 +1292,7 @@ Puedes configurar opencode para usar modelos locales a través de Ollama. Ollama puede configurarse automáticamente para OpenCode. Consulte los [documentos de integración de Ollama](https://docs.ollama.com/integrations/opencode) para obtener más detalles. ::: -```json title="opencode.json" "ollama" {5, 6, 8, 10-14} +```json title="codev.json" "ollama" {5, 6, 8, 10-14} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1455,7 +1455,7 @@ OpenCode Zen es una lista de modelos probados y verificados proporcionada por el También puede agregar modelos adicionales a través de su configuración opencode. - ```json title="opencode.json" {6} + ```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1470,7 +1470,7 @@ OpenCode Zen es una lista de modelos probados y verificados proporcionada por el 5. También puedes personalizarlos a través de tu configuración opencode. A continuación se muestra un ejemplo de cómo especificar un proveedor. - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1719,7 +1719,7 @@ Vercel AI Gateway le permite acceder a modelos de OpenAI, Anthropic, Google, xAI También puede personalizar modelos a través de su configuración opencode. A continuación se muestra un ejemplo de cómo especificar el orden de enrutamiento del proveedor. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1829,7 +1829,7 @@ Algunas opciones de enrutamiento útiles: También puede agregar modelos adicionales a través de su configuración opencode. - ```json title="opencode.json" {6} + ```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1888,16 +1888,16 @@ Puede utilizar cualquier proveedor compatible con OpenAI con opencode. La mayor ┌ Add credential │ - ▲ This only stores a credential for myprovider - you will need to configure it in opencode.json, check the docs for examples. + ▲ This only stores a credential for myprovider - you will need to configure it in codev.json, check the docs for examples. │ ◇ Enter your API key │ sk-... └ ``` -4. Cree o actualice su archivo `opencode.json` en el directorio de su proyecto: +4. Cree o actualice su archivo `codev.json` en el directorio de su proyecto: - ```json title="opencode.json" ""myprovider"" {5-15} + ```json title="codev.json" ""myprovider"" {5-15} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1935,7 +1935,7 @@ Puede utilizar cualquier proveedor compatible con OpenAI con opencode. La mayor A continuación se muestra un ejemplo de configuración de las opciones `apiKey`, `headers` y modelo `limit`. -```json title="opencode.json" {9,11,17-20} +```json title="codev.json" {9,11,17-20} { "$schema": "https://opencode.ai/config.json", "provider": { diff --git a/packages/web/src/content/docs/es/rules.mdx b/packages/web/src/content/docs/es/rules.mdx index 6f429a8037..37703d30fe 100644 --- a/packages/web/src/content/docs/es/rules.mdx +++ b/packages/web/src/content/docs/es/rules.mdx @@ -98,11 +98,11 @@ El primer archivo coincidente gana en cada categoría. Por ejemplo, si tiene `AG ## Instrucciones personalizadas -Puede especificar archivos de instrucciones personalizados en su `opencode.json` o el `~/.config/opencode/opencode.json` global. Esto le permite a usted y a su equipo reutilizar las reglas existentes en lugar de tener que duplicarlas en AGENTS.md. +Puede especificar archivos de instrucciones personalizados en su `codev.json` o el `~/.config/opencode/codev.json` global. Esto le permite a usted y a su equipo reutilizar las reglas existentes en lugar de tener que duplicarlas en AGENTS.md. Ejemplo: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["CONTRIBUTING.md", "docs/guidelines.md", ".cursor/rules/*.md"] @@ -111,7 +111,7 @@ Ejemplo: También puede utilizar URL remotas para cargar instrucciones desde la web. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["https://raw.githubusercontent.com/my-org/shared-rules/main/style.md"] @@ -128,11 +128,11 @@ Todos los archivos de instrucciones se combinan con sus archivos `AGENTS.md`. Si bien opencode no analiza automáticamente las referencias de archivos en `AGENTS.md`, puedes lograr una funcionalidad similar de dos maneras: -### Usar opencode.json +### Usar codev.json -El enfoque recomendado es utilizar el campo `instructions` en `opencode.json`: +El enfoque recomendado es utilizar el campo `instructions` en `codev.json`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["docs/development-standards.md", "test/testing-guidelines.md", "packages/*/AGENTS.md"] @@ -176,5 +176,5 @@ Este enfoque le permite: - Asegúrese de que opencode cargue archivos solo cuando sea necesario para la tarea específica :::tip -Para monorepos o proyectos con estándares compartidos, usar `opencode.json` con patrones globales (como `packages/*/AGENTS.md`) es más fácil de mantener que las instrucciones manuales. +Para monorepos o proyectos con estándares compartidos, usar `codev.json` con patrones globales (como `packages/*/AGENTS.md`) es más fácil de mantener que las instrucciones manuales. ::: diff --git a/packages/web/src/content/docs/es/sdk.mdx b/packages/web/src/content/docs/es/sdk.mdx index d75149cde8..faaf25900b 100644 --- a/packages/web/src/content/docs/es/sdk.mdx +++ b/packages/web/src/content/docs/es/sdk.mdx @@ -49,7 +49,7 @@ Esto inicia tanto un servidor como un cliente. ## Configuración -Puede pasar un objeto de configuración para personalizar el comportamiento. La instancia aún recoge su `opencode.json`, pero puede anular o agregar configuración en línea: +Puede pasar un objeto de configuración para personalizar el comportamiento. La instancia aún recoge su `codev.json`, pero puede anular o agregar configuración en línea: ```javascript import { createOpencode } from "@opencode-ai/sdk" diff --git a/packages/web/src/content/docs/es/share.mdx b/packages/web/src/content/docs/es/share.mdx index 3bb376f386..ea70c0b9a1 100644 --- a/packages/web/src/content/docs/es/share.mdx +++ b/packages/web/src/content/docs/es/share.mdx @@ -39,7 +39,7 @@ Esto generará una URL única que se copiará en su portapapeles. Para configurar explícitamente el modo manual en su [archivo de configuración](/docs/config): -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "manual" @@ -52,7 +52,7 @@ Para configurar explícitamente el modo manual en su [archivo de configuración] Puede habilitar el uso compartido automático para todas las conversaciones nuevas configurando la opción `share` en `"auto"` en su [archivo de configuración](/docs/config): -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "auto" @@ -67,14 +67,14 @@ Con el uso compartido automático habilitado, cada nueva conversación se compar Puede desactivar el uso compartido por completo configurando la opción `share` en `"disabled"` en su [archivo de configuración](/docs/config): -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "disabled" } ``` -Para aplicar esto en todo su equipo para un proyecto determinado, agréguelo al `opencode.json` en su proyecto y regístrelo en Git. +Para aplicar esto en todo su equipo para un proyecto determinado, agréguelo al `codev.json` en su proyecto y regístrelo en Git. --- diff --git a/packages/web/src/content/docs/es/skills.mdx b/packages/web/src/content/docs/es/skills.mdx index 46f7bc24f5..ba8b6745c2 100644 --- a/packages/web/src/content/docs/es/skills.mdx +++ b/packages/web/src/content/docs/es/skills.mdx @@ -124,7 +124,7 @@ skill({ name: "git-release" }) ## Configurar permisos -Controle a qué agentes de habilidades pueden acceder utilizando permisos basados ​​en patrones en `opencode.json`: +Controle a qué agentes de habilidades pueden acceder utilizando permisos basados ​​en patrones en `codev.json`: ```json { @@ -163,7 +163,7 @@ permission: --- ``` -**Para agentes integrados** (en `opencode.json`): +**Para agentes integrados** (en `codev.json`): ```json { diff --git a/packages/web/src/content/docs/es/tools.mdx b/packages/web/src/content/docs/es/tools.mdx index 5a0cca969b..0b66b7a9d6 100644 --- a/packages/web/src/content/docs/es/tools.mdx +++ b/packages/web/src/content/docs/es/tools.mdx @@ -13,7 +13,7 @@ De forma predeterminada, todas las herramientas están **habilitadas** y no nece Utilice el campo `permission` para controlar el comportamiento de la herramienta. Puede permitir, denegar o exigir aprobación para cada herramienta. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -26,7 +26,7 @@ Utilice el campo `permission` para controlar el comportamiento de la herramienta También puedes utilizar comodines para controlar varias herramientas a la vez. Por ejemplo, para solicitar aprobación para todas las herramientas de un servidor MCP: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -49,7 +49,7 @@ Aquí están todas las herramientas integradas disponibles en OpenCode. Ejecute comandos de shell en el entorno de su proyecto. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -66,7 +66,7 @@ Esta herramienta permite que LLM ejecute comandos de terminal como `npm install` Modifique archivos existentes utilizando reemplazos de cadenas exactas. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -83,7 +83,7 @@ Esta herramienta realiza ediciones precisas de archivos reemplazando coincidenci Cree nuevos archivos o sobrescriba los existentes. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -104,7 +104,7 @@ La herramienta `write` está controlada por el permiso `edit`, que cubre todas l Lea el contenido del archivo desde su base de código. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -121,7 +121,7 @@ Esta herramienta lee archivos y devuelve su contenido. Admite la lectura de rang Busque contenidos de archivos utilizando expresiones regulares. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -138,7 +138,7 @@ Búsqueda rápida de contenido en su base de código. Admite sintaxis de expresi Encuentre archivos por coincidencia de patrones. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -159,7 +159,7 @@ Interactúe con sus servidores LSP configurados para obtener funciones de inteli Esta herramienta solo está disponible cuando `OPENCODE_EXPERIMENTAL_LSP_TOOL=true` (o `OPENCODE_EXPERIMENTAL=true`). ::: -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -178,7 +178,7 @@ Para configurar qué servidores LSP están disponibles para su proyecto, consult Aplicar parches a los archivos. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -199,7 +199,7 @@ La herramienta `patch` está controlada por el permiso `edit`, que cubre todas l Cargue una [habilidad](/docs/skills) (un archivo `SKILL.md`) y devuelva su contenido en la conversación. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -214,7 +214,7 @@ Cargue una [habilidad](/docs/skills) (un archivo `SKILL.md`) y devuelva su conte Administre listas de tareas pendientes durante las sesiones de codificación. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -235,7 +235,7 @@ Esta herramienta está deshabilitada para los subagentes de forma predeterminada Obtener contenido web. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -263,7 +263,7 @@ OPENCODE_ENABLE_EXA=1 opencode ::: -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -286,7 +286,7 @@ Utilice `websearch` cuando necesite encontrar información (descubrimiento) y `w Haga preguntas al usuario durante la ejecución. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { diff --git a/packages/web/src/content/docs/es/troubleshooting.mdx b/packages/web/src/content/docs/es/troubleshooting.mdx index 19f41bd687..eab6f1c8bd 100644 --- a/packages/web/src/content/docs/es/troubleshooting.mdx +++ b/packages/web/src/content/docs/es/troubleshooting.mdx @@ -57,9 +57,9 @@ Si la aplicación de escritorio falla al iniciarse, se bloquea o se comporta de Abra su archivo de configuración global y busque una clave `plugin`. -- **macOS/Linux**: `~/.config/opencode/opencode.jsonc` (o `~/.config/opencode/opencode.json`) -- **macOS/Linux** (instalaciones anteriores): `~/.local/share/opencode/opencode.jsonc` -- **Windows**: Presione `WIN+R` y pegue `%USERPROFILE%\.config\opencode\opencode.jsonc` +- **macOS/Linux**: `~/.config/opencode/codev.jsonc` (o `~/.config/opencode/codev.json`) +- **macOS/Linux** (instalaciones anteriores): `~/.local/share/opencode/codev.jsonc` +- **Windows**: Presione `WIN+R` y pegue `%USERPROFILE%\.config\opencode\codev.jsonc` Si tiene complementos configurados, desactívelos temporalmente eliminando la clave o configurándola en una matriz vacía: @@ -111,7 +111,7 @@ Desde la pantalla de inicio, haga clic en el nombre del servidor (con el punto d #### Elimina `server.port` / `server.hostname` de tu configuración -Si su `opencode.json(c)` contiene una sección `server`, elimínela temporalmente y reinicie la aplicación de escritorio. +Si su `codev.json(c)` contiene una sección `server`, elimínela temporalmente y reinicie la aplicación de escritorio. #### Verificar variables de entorno diff --git a/packages/web/src/content/docs/es/tui.mdx b/packages/web/src/content/docs/es/tui.mdx index 0062649091..d6e71e68ea 100644 --- a/packages/web/src/content/docs/es/tui.mdx +++ b/packages/web/src/content/docs/es/tui.mdx @@ -385,7 +385,7 @@ Puede personalizar el comportamiento de TUI a través de `tui.json` (o `tui.json } ``` -Esto es independiente de `opencode.json`, que configura el comportamiento del servidor/tiempo de ejecución. +Esto es independiente de `codev.json`, que configura el comportamiento del servidor/tiempo de ejecución. `keybinds` se combina con los valores predeterminados integrados, así que solo necesitas configurar los atajos que quieras cambiar. diff --git a/packages/web/src/content/docs/es/web.mdx b/packages/web/src/content/docs/es/web.mdx index b5a2ad8fae..e51e7050bd 100644 --- a/packages/web/src/content/docs/es/web.mdx +++ b/packages/web/src/content/docs/es/web.mdx @@ -126,7 +126,7 @@ Esto le permite utilizar la interfaz web y el terminal simultáneamente, compart ## Archivo de configuración -También puede configurar los ajustes del servidor en su archivo de configuración `opencode.json`: +También puede configurar los ajustes del servidor en su archivo de configuración `codev.json`: ```json { diff --git a/packages/web/src/content/docs/formatters.mdx b/packages/web/src/content/docs/formatters.mdx index 58b63fa348..ec0be59dba 100644 --- a/packages/web/src/content/docs/formatters.mdx +++ b/packages/web/src/content/docs/formatters.mdx @@ -62,7 +62,7 @@ You can enable and customize formatters through the `formatter` section in your To enable all built-in formatters, set `formatter` to `true`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "formatter": true @@ -71,7 +71,7 @@ To enable all built-in formatters, set `formatter` to `true`. Use an object to keep built-ins enabled while configuring overrides or custom formatters. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "formatter": {} @@ -95,7 +95,7 @@ Let's look at some examples. If `formatter` is omitted, all formatters are disabled. To disable all formatters after another config enabled them, set `formatter` to `false`: -```json title="opencode.json" {3} +```json title="codev.json" {3} { "$schema": "https://opencode.ai/config.json", "formatter": false @@ -104,7 +104,7 @@ If `formatter` is omitted, all formatters are disabled. To disable all formatter To disable a **specific** formatter, set `disabled` to `true`: -```json title="opencode.json" {5} +```json title="codev.json" {5} { "$schema": "https://opencode.ai/config.json", "formatter": { @@ -121,7 +121,7 @@ To disable a **specific** formatter, set `disabled` to `true`: You can configure built-in formatters with options like `environment` or `extensions`. To add a custom formatter, specify a `command` and `extensions`: -```json title="opencode.json" {4-14} +```json title="codev.json" {4-14} { "$schema": "https://opencode.ai/config.json", "formatter": { diff --git a/packages/web/src/content/docs/keybinds.mdx b/packages/web/src/content/docs/keybinds.mdx index 86f67dfd73..23849edd02 100644 --- a/packages/web/src/content/docs/keybinds.mdx +++ b/packages/web/src/content/docs/keybinds.mdx @@ -239,7 +239,7 @@ You can disable a keybind by adding the key to `tui.json` with a value of `"none ## Desktop Prompt Shortcuts -The OpenCode desktop app prompt input supports common Readline/Emacs-style shortcuts for editing text. These are built-in and currently not configurable via `opencode.json`. +The OpenCode desktop app prompt input supports common Readline/Emacs-style shortcuts for editing text. These are built-in and currently not configurable via `codev.json`. | Shortcut | Action | | -------- | ---------------------------------------- | diff --git a/packages/web/src/content/docs/lsp.mdx b/packages/web/src/content/docs/lsp.mdx index b9428e5b2d..8e6ec252c6 100644 --- a/packages/web/src/content/docs/lsp.mdx +++ b/packages/web/src/content/docs/lsp.mdx @@ -79,7 +79,7 @@ You can enable and customize LSP servers through the `lsp` section in your openc To enable all built-in LSP servers, set `lsp` to `true`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "lsp": true @@ -88,7 +88,7 @@ To enable all built-in LSP servers, set `lsp` to `true`. Use an object to keep built-ins enabled while configuring overrides or custom servers. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "lsp": {} @@ -115,7 +115,7 @@ Let's look at some examples. Use the `env` property to set environment variables when starting the LSP server: -```json title="opencode.json" {5-8} +```json title="codev.json" {5-8} { "$schema": "https://opencode.ai/config.json", "lsp": { @@ -135,7 +135,7 @@ Use the `env` property to set environment variables when starting the LSP server Use the `initialization` property to pass initialization options to the LSP server. These are server-specific settings sent during the LSP `initialize` request: -```json title="opencode.json" {5-13} +```json title="codev.json" {5-13} { "$schema": "https://opencode.ai/config.json", "lsp": { @@ -162,7 +162,7 @@ Initialization options vary by LSP server. Check your LSP server's documentation If `lsp` is omitted, all LSP servers are disabled. To disable all LSP servers after another config enabled them, set `lsp` to `false`: -```json title="opencode.json" {3} +```json title="codev.json" {3} { "$schema": "https://opencode.ai/config.json", "lsp": false @@ -171,7 +171,7 @@ If `lsp` is omitted, all LSP servers are disabled. To disable all LSP servers af To disable a **specific** LSP server, set `disabled` to `true`: -```json title="opencode.json" {5} +```json title="codev.json" {5} { "$schema": "https://opencode.ai/config.json", "lsp": { @@ -188,7 +188,7 @@ To disable a **specific** LSP server, set `disabled` to `true`: You can add custom LSP servers by specifying the command and file extensions: -```json title="opencode.json" {4-7} +```json title="codev.json" {4-7} { "$schema": "https://opencode.ai/config.json", "lsp": { diff --git a/packages/web/src/content/docs/mcp-servers.mdx b/packages/web/src/content/docs/mcp-servers.mdx index 215938ec3b..596eb5ee26 100644 --- a/packages/web/src/content/docs/mcp-servers.mdx +++ b/packages/web/src/content/docs/mcp-servers.mdx @@ -25,7 +25,7 @@ Certain MCP servers, like the GitHub MCP server, tend to add a lot of tokens and You can define MCP servers in your [OpenCode Config](https://opencode.ai/docs/config/) under `mcp`. Add each MCP with a unique name. You can refer to that MCP by name when prompting the LLM. -```jsonc title="opencode.jsonc" {6} +```jsonc title="codev.jsonc" {6} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -50,7 +50,7 @@ Organizations can provide default MCP servers via their `.well-known/opencode` e To enable a specific server from your organization's remote config, add it to your local config with `enabled: true`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -71,7 +71,7 @@ Your local config values override the remote defaults. See [config precedence](/ Add local MCP servers using `type` to `"local"` within the MCP object. -```jsonc title="opencode.jsonc" {15} +```jsonc title="codev.jsonc" {15} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -92,7 +92,7 @@ The command is how the local MCP server is started. You can also pass in a list For example, here's how you can add the test [`@modelcontextprotocol/server-everything`](https://www.npmjs.com/package/@modelcontextprotocol/server-everything) MCP server. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -131,7 +131,7 @@ Here are all the options for configuring a local MCP server. Add remote MCP servers by setting `type` to `"remote"`. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -178,7 +178,7 @@ OpenCode automatically handles OAuth authentication for remote MCP servers. When For most OAuth-enabled MCP servers, no special configuration is needed. Just configure the remote server: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -198,7 +198,7 @@ If the server requires authentication, OpenCode will prompt you to authenticate If you have client credentials from the MCP server provider, you can configure them: -```json title="opencode.json" {7-11} +```json title="codev.json" {7-11} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -247,7 +247,7 @@ The `mcp auth` command will open your browser for authorization. After you autho If you want to disable automatic OAuth for a server (e.g., for servers that use API keys instead), set `oauth` to `false`: -```json title="opencode.json" {7} +```json title="codev.json" {7} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -300,7 +300,7 @@ Your MCPs are available as tools in OpenCode, alongside built-in tools. So you c This means that you can enable or disable them globally. -```json title="opencode.json" {14} +```json title="codev.json" {14} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -321,7 +321,7 @@ This means that you can enable or disable them globally. We can also use a glob pattern to disable all matching MCPs. -```json title="opencode.json" {14} +```json title="codev.json" {14} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -351,7 +351,7 @@ If you have a large number of MCP servers you may want to only enable them per a 1. Disable it as a tool globally. 2. In your [agent config](/docs/agents#tools), enable the MCP server as a tool. -```json title="opencode.json" {11, 14-18} +```json title="codev.json" {11, 14-18} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -405,7 +405,7 @@ Below are examples of some common MCP servers. You can submit a PR if you want t Add the [Sentry MCP server](https://mcp.sentry.dev) to interact with your Sentry projects and issues. -```json title="opencode.json" {4-8} +```json title="codev.json" {4-8} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -438,7 +438,7 @@ Show me the latest unresolved issues in my project. use sentry Add the [Context7 MCP server](https://github.com/upstash/context7) to search through docs. -```json title="opencode.json" {4-7} +```json title="codev.json" {4-7} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -452,7 +452,7 @@ Add the [Context7 MCP server](https://github.com/upstash/context7) to search thr If you have signed up for a free account, you can use your API key and get higher rate-limits. -```json title="opencode.json" {7-9} +```json title="codev.json" {7-9} { "$schema": "https://opencode.ai/config.json", "mcp": { @@ -487,7 +487,7 @@ When you need to search docs, use `context7` tools. Add the [Grep by Vercel](https://grep.app) MCP server to search through code snippets on GitHub. -```json title="opencode.json" {4-7} +```json title="codev.json" {4-7} { "$schema": "https://opencode.ai/config.json", "mcp": { diff --git a/packages/web/src/content/docs/models.mdx b/packages/web/src/content/docs/models.mdx index b135e7554d..3e13c9d162 100644 --- a/packages/web/src/content/docs/models.mdx +++ b/packages/web/src/content/docs/models.mdx @@ -51,7 +51,7 @@ Here are several models that work well with OpenCode, in no particular order. (T To set one of these as the default model, you can set the `model` key in your OpenCode config. -```json title="opencode.json" {3} +```json title="codev.json" {3} { "$schema": "https://opencode.ai/config.json", "model": "lmstudio/google/gemma-3n-e4b" @@ -68,7 +68,7 @@ If you've configured a [custom provider](/docs/providers#custom), the `provider_ You can globally configure a model's options through the config. -```jsonc title="opencode.jsonc" {7-12,19-24} +```jsonc title="codev.jsonc" {7-12,19-24} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -107,7 +107,7 @@ You can also configure these options for any agents that you are using. The agen You can also define custom variants that extend built-in ones. Variants let you configure different settings for the same model without creating duplicate entries: -```jsonc title="opencode.jsonc" {6-21} +```jsonc title="codev.jsonc" {6-21} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -172,7 +172,7 @@ This list is not comprehensive. Many other providers have built-in defaults too. You can override existing variants or add your own: -```jsonc title="opencode.jsonc" {7-18} +```jsonc title="codev.jsonc" {7-18} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -209,7 +209,7 @@ When OpenCode starts up, it checks for models in the following priority order: 2. The model list in the OpenCode config. - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "model": "anthropic/claude-sonnet-4-20250514" diff --git a/packages/web/src/content/docs/permissions.mdx b/packages/web/src/content/docs/permissions.mdx index ccc4034dc6..3bb497664b 100644 --- a/packages/web/src/content/docs/permissions.mdx +++ b/packages/web/src/content/docs/permissions.mdx @@ -43,7 +43,7 @@ In the TUI, open the command palette and select **Enable auto-approve permission You can set permissions globally (with `*`), and override specific tools. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -56,7 +56,7 @@ You can set permissions globally (with `*`), and override specific tools. You can also set all permissions at once: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": "allow" @@ -69,7 +69,7 @@ You can also set all permissions at once: For most permissions, you can use an object to apply different actions based on the tool input. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -114,7 +114,7 @@ Home expansion (like `~/...`) only affects how a pattern is written. It does not For example, this allows access to everything under `~/projects/personal/`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -127,7 +127,7 @@ For example, this allows access to everything under `~/projects/personal/`: Any directory allowed here inherits the same defaults as the current workspace. Since [`read` defaults to `allow`](#defaults), reads are also allowed for entries under `external_directory` unless overridden. Add explicit rules when a tool should be restricted in these paths, such as blocking edits while keeping reads: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -173,7 +173,7 @@ If you don’t specify anything, OpenCode starts from permissive defaults: - `doom_loop` and `external_directory` default to `"ask"`. - `read` is `"allow"`, but `.env` files are denied by default: -```json title="opencode.json" +```json title="codev.json" { "permission": { "read": { @@ -208,7 +208,7 @@ You can override permissions per agent. Agent permissions are merged with the gl Refer to the [Granular Rules (Object Syntax)](#granular-rules-object-syntax) section above for more detailed pattern matching examples. ::: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { diff --git a/packages/web/src/content/docs/plugins.mdx b/packages/web/src/content/docs/plugins.mdx index a8be798217..889f43cf41 100644 --- a/packages/web/src/content/docs/plugins.mdx +++ b/packages/web/src/content/docs/plugins.mdx @@ -30,7 +30,7 @@ Files in these directories are automatically loaded at startup. Specify npm packages in your config file. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-helicone-session", "opencode-wakatime", "@my-org/custom-plugin"] @@ -55,8 +55,8 @@ Browse available plugins in the [ecosystem](/docs/ecosystem#plugins). Plugins are loaded from all sources and all hooks run in sequence. The load order is: -1. Global config (`~/.config/opencode/opencode.json`) -2. Project config (`opencode.json`) +1. Global config (`~/.config/opencode/codev.json`) +2. Project config (`codev.json`) 3. Global plugin directory (`~/.config/opencode/plugins/`) 4. Project plugin directory (`.opencode/plugins/`) diff --git a/packages/web/src/content/docs/policies.mdx b/packages/web/src/content/docs/policies.mdx index c2ada5d14b..217086e21c 100644 --- a/packages/web/src/content/docs/policies.mdx +++ b/packages/web/src/content/docs/policies.mdx @@ -3,7 +3,7 @@ title: Policies description: Control which configured resources OpenCode may use. --- -Policies control whether OpenCode may perform an action on a named resource. This feature is experimental and is configured with the `experimental.policies` array in `opencode.json`. +Policies control whether OpenCode may perform an action on a named resource. This feature is experimental and is configured with the `experimental.policies` array in `codev.json`. Policies are separate from [permissions](/docs/permissions). Permissions control what tools can do during a session, while policies control whether OpenCode may use a resource such as an LLM provider. @@ -19,7 +19,7 @@ Each policy statement has three fields: For example, deny use of the `openai` provider: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "experimental": { @@ -54,7 +54,7 @@ More policy actions may be added in the future. The `resource` field supports wildcard matching. Use `*` to match zero or more characters and `?` to match one character. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "experimental": { @@ -79,7 +79,7 @@ When multiple statements match, the last matching statement wins. Put broad rule For example, allow only Anthropic: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "experimental": { @@ -111,7 +111,7 @@ Use policies instead of the older `disabled_providers` and `enabled_providers` s To replace `disabled_providers`: -```json title="opencode.json" +```json title="codev.json" { "experimental": { "policies": [ @@ -124,7 +124,7 @@ To replace `disabled_providers`: To replace `enabled_providers`, deny all providers first and allow the selected providers after it: -```json title="opencode.json" +```json title="codev.json" { "experimental": { "policies": [ diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index d3c541311f..09eb7464d4 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -33,7 +33,7 @@ config. You can customize the base URL for any provider by setting the `baseURL` option. This is useful when using proxy services or custom endpoints. -```json title="opencode.json" {6} +```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -52,7 +52,7 @@ You can customize the base URL for any provider by setting the `baseURL` option. You can hide specific models from the `/models` picker for a provider using the `blacklist` option. This is useful when a provider exposes models you don't want to use or select. -```json title="opencode.json" {6} +```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -65,7 +65,7 @@ You can hide specific models from the `/models` picker for a provider using the The inverse `whitelist` option hides every model except the ones listed. -```json title="opencode.json" {6} +```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -231,9 +231,9 @@ To use Amazon Bedrock with OpenCode: #### Configuration File (Recommended) - For project-specific or persistent configuration, use `opencode.json`: + For project-specific or persistent configuration, use `codev.json`: - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -262,7 +262,7 @@ To use Amazon Bedrock with OpenCode: If you're using VPC endpoints for Bedrock: - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -311,7 +311,7 @@ To use Amazon Bedrock with OpenCode: For custom inference profiles, use the model and provider name in the key and set the `id` property to the arn. This ensures correct caching. ::: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -374,7 +374,7 @@ the following subscriptions in OpenCode with zero setup: You can configure opencode to use local models through [Atomic Chat](https://atomic.chat), a desktop application that runs local LLMs behind an OpenAI-compatible API server (default endpoint `http://127.0.0.1:1337/v1`). -```json title="opencode.json" "atomic-chat" {5, 6, 8, 10-14} +```json title="codev.json" "atomic-chat" {5, 6, 8, 10-14} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -607,7 +607,7 @@ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, You can also add models through your opencode config. - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -963,7 +963,7 @@ to store token in opencode auth storage. OpenCode uses a small model for some AI tasks like generating the session title. It is configured to use gpt-5-nano by default, hosted by Zen. To lock OpenCode to only use your own GitLab-hosted instance, add the following to your -`opencode.json` file. It is also recommended to disable session sharing. +`codev.json` file. It is also recommended to disable session sharing. ```json { @@ -1027,9 +1027,9 @@ More documentation on [opencode-gitlab-auth](https://www.npmjs.com/package/openc ##### Configuration -Customize through `opencode.json`: +Customize through `codev.json`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1060,7 +1060,7 @@ are dynamically discovered from your GitLab instance. To access GitLab tools (merge requests, issues, pipelines, CI/CD, etc.): -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-gitlab-plugin"] @@ -1270,7 +1270,7 @@ In the event you see a feature or model from Helicone that isn't configured auto Here's [Helicone's Model Directory](https://helicone.ai/models), you'll need this to grab the IDs of the models you want to add. -```jsonc title="~/.config/opencode/opencode.jsonc" +```jsonc title="~/.config/opencode/codev.jsonc" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1298,7 +1298,7 @@ Here's [Helicone's Model Directory](https://helicone.ai/models), you'll need thi Helicone supports custom headers for features like caching, user tracking, and session management. Add them to your provider config using `options.headers`: -```jsonc title="~/.config/opencode/opencode.jsonc" +```jsonc title="~/.config/opencode/codev.jsonc" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1327,7 +1327,7 @@ npm install -g opencode-helicone-session Add it to your config. -```json title="opencode.json" +```json title="codev.json" { "plugin": ["opencode-helicone-session"] } @@ -1352,7 +1352,7 @@ See the [Helicone Header Directory](https://docs.helicone.ai/helicone-headers/he You can configure opencode to use local models through [llama.cpp's](https://github.com/ggml-org/llama.cpp) llama-server utility -```json title="opencode.json" "llama.cpp" {5, 6, 8, 10-15} +```json title="codev.json" "llama.cpp" {5, 6, 8, 10-15} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1419,7 +1419,7 @@ IO.NET offers 17 models optimized for various use cases: You can configure opencode to use local models through LM Studio. -```json title="opencode.json" "lmstudio" {5, 6, 8, 10-14} +```json title="codev.json" "lmstudio" {5, 6, 8, 10-14} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1536,7 +1536,7 @@ NVIDIA provides access to Nemotron models and many other open models through [bu You can also use NVIDIA models locally via [NVIDIA NIM](https://docs.nvidia.com/nim/) by setting a custom base URL. -```json title="opencode.json" {6} +```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1594,7 +1594,7 @@ You can configure opencode to use local models through Ollama. Ollama can automatically configure itself for OpenCode. See the [Ollama integration docs](https://docs.ollama.com/integrations/opencode) for details. ::: -```json title="opencode.json" "ollama" {5, 6, 8, 10-14} +```json title="codev.json" "ollama" {5, 6, 8, 10-14} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1756,7 +1756,7 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te You can also add additional models through your opencode config. - ```json title="opencode.json" {6} + ```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1771,7 +1771,7 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te 5. You can also customize them through your opencode config. Here's an example of specifying a provider - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1820,7 +1820,7 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te You can also add additional models through your opencode config. - ```json title="opencode.json" {6} + ```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -1835,7 +1835,7 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te 5. You can also customize them through your opencode config. Here's an example of specifying a provider - ```json title="opencode.json" + ```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -2096,9 +2096,9 @@ export SNOWFLAKE_CORTEX_TOKEN=your-pat-or-jwt `SNOWFLAKE_CORTEX_TOKEN` accepts a PAT or JWT only — the browser OAuth flow is available via `/connect` only and cannot be configured through an environment variable. `SNOWFLAKE_CORTEX_PAT` is still supported for backward compatibility. ::: -The model catalog is provided automatically. A minimal `opencode.json` is all that's needed: +The model catalog is provided automatically. A minimal `codev.json` is all that's needed: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "model": "snowflake-cortex/claude-sonnet-4-6", @@ -2191,7 +2191,7 @@ Vercel AI Gateway lets you access models from OpenAI, Anthropic, Google, xAI, an You can also customize models through your opencode config. Here's an example of specifying provider routing order. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "provider": { @@ -2341,7 +2341,7 @@ Use this when OpenCode is running somewhere a browser can't reach the loopback r You can also add additional models through your opencode config. - ```json title="opencode.json" {6} + ```json title="codev.json" {6} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -2400,16 +2400,16 @@ You can use any OpenAI-compatible provider with opencode. Most modern AI provide ┌ Add credential │ - ▲ This only stores a credential for myprovider - you will need to configure it in opencode.json, check the docs for examples. + ▲ This only stores a credential for myprovider - you will need to configure it in codev.json, check the docs for examples. │ ◇ Enter your API key │ sk-... └ ``` -4. Create or update your `opencode.json` file in your project directory: +4. Create or update your `codev.json` file in your project directory: - ```json title="opencode.json" ""myprovider"" {5-15} + ```json title="codev.json" ""myprovider"" {5-15} { "$schema": "https://opencode.ai/config.json", "provider": { @@ -2447,7 +2447,7 @@ You can use any OpenAI-compatible provider with opencode. Most modern AI provide Here's an example setting the `apiKey`, `headers`, and model `limit` options. -```json title="opencode.json" {9,11,17-20} +```json title="codev.json" {9,11,17-20} { "$schema": "https://opencode.ai/config.json", "provider": { diff --git a/packages/web/src/content/docs/references.mdx b/packages/web/src/content/docs/references.mdx index 2df002c331..01ee2c0716 100644 --- a/packages/web/src/content/docs/references.mdx +++ b/packages/web/src/content/docs/references.mdx @@ -5,9 +5,9 @@ description: Add local directories and Git repositories as project references. References give OpenCode access to directories outside the current project. Use them to make documentation, shared libraries, examples, or another repository available while you work. -References are configured by alias in `opencode.json` or `opencode.jsonc`. +References are configured by alias in `codev.json` or `codev.jsonc`. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "$schema": "https://opencode.ai/config.json", "references": { @@ -30,7 +30,7 @@ References are configured by alias in `opencode.json` or `opencode.jsonc`. Use `path` to reference a local directory. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "references": { "docs": { @@ -48,7 +48,7 @@ Paths can be: You can also use a string shorthand: -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "references": { "docs": "../docs", @@ -62,7 +62,7 @@ You can also use a string shorthand: Use `repository` to reference a Git repository. OpenCode materializes the repository in its local repository cache and makes the checked-out source available as a reference directory. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "references": { "effect": { @@ -77,7 +77,7 @@ Use `repository` to reference a Git repository. OpenCode materializes the reposi You can use string shorthand when you do not need a branch, description, or other options: -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "references": { "effect": "Effect-TS/effect", @@ -95,7 +95,7 @@ Git references are refreshed asynchronously. A newly configured repository may t Add `description` to explain when an agent should use a reference. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "references": { "design-system": { @@ -114,7 +114,7 @@ OpenCode includes references with descriptions in agent context. Descriptions sh Set `hidden` to `true` to omit a reference from `@` autocomplete in the TUI. -```jsonc title="opencode.jsonc" +```jsonc title="codev.jsonc" { "references": { "internal": { diff --git a/packages/web/src/content/docs/rules.mdx b/packages/web/src/content/docs/rules.mdx index 6db5d45b1d..bf91d7bf3b 100644 --- a/packages/web/src/content/docs/rules.mdx +++ b/packages/web/src/content/docs/rules.mdx @@ -106,11 +106,11 @@ The first matching file wins in each category. For example, if you have both `AG ## Custom Instructions -You can specify custom instruction files in your `opencode.json` or the global `~/.config/opencode/opencode.json`. This allows you and your team to reuse existing rules rather than having to duplicate them to AGENTS.md. +You can specify custom instruction files in your `codev.json` or the global `~/.config/opencode/codev.json`. This allows you and your team to reuse existing rules rather than having to duplicate them to AGENTS.md. Example: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["CONTRIBUTING.md", "docs/guidelines.md", ".cursor/rules/*.md"] @@ -119,7 +119,7 @@ Example: You can also use remote URLs to load instructions from the web. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["https://raw.githubusercontent.com/my-org/shared-rules/main/style.md"] @@ -136,11 +136,11 @@ All instruction files are combined with your `AGENTS.md` files. While opencode doesn't automatically parse file references in `AGENTS.md`, you can achieve similar functionality in two ways: -### Using opencode.json +### Using codev.json -The recommended approach is to use the `instructions` field in `opencode.json`: +The recommended approach is to use the `instructions` field in `codev.json`: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "instructions": ["docs/development-standards.md", "test/testing-guidelines.md", "packages/*/AGENTS.md"] @@ -184,5 +184,5 @@ This approach allows you to: - Ensure opencode loads files only when needed for the specific task :::tip -For monorepos or projects with shared standards, using `opencode.json` with glob patterns (like `packages/*/AGENTS.md`) is more maintainable than manual instructions. +For monorepos or projects with shared standards, using `codev.json` with glob patterns (like `packages/*/AGENTS.md`) is more maintainable than manual instructions. ::: diff --git a/packages/web/src/content/docs/sdk.mdx b/packages/web/src/content/docs/sdk.mdx index 24546213be..b596b5d892 100644 --- a/packages/web/src/content/docs/sdk.mdx +++ b/packages/web/src/content/docs/sdk.mdx @@ -49,7 +49,7 @@ This starts both a server and a client ## Config -You can pass a configuration object to customize behavior. The instance still picks up your `opencode.json`, but you can override or add configuration inline: +You can pass a configuration object to customize behavior. The instance still picks up your `codev.json`, but you can override or add configuration inline: ```javascript import { createOpencode } from "@opencode-ai/sdk" diff --git a/packages/web/src/content/docs/share.mdx b/packages/web/src/content/docs/share.mdx index b2c7933409..4da08276f8 100644 --- a/packages/web/src/content/docs/share.mdx +++ b/packages/web/src/content/docs/share.mdx @@ -39,7 +39,7 @@ This will generate a unique URL that'll be copied to your clipboard. To explicitly set manual mode in your [config file](/docs/config): -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "manual" @@ -52,7 +52,7 @@ To explicitly set manual mode in your [config file](/docs/config): You can enable automatic sharing for all new conversations by setting the `share` option to `"auto"` in your [config file](/docs/config): -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "auto" @@ -67,14 +67,14 @@ With auto-share enabled, every new conversation will automatically be shared and You can disable sharing entirely by setting the `share` option to `"disabled"` in your [config file](/docs/config): -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "share": "disabled" } ``` -To enforce this across your team for a given project, add it to the `opencode.json` in your project and check into Git. +To enforce this across your team for a given project, add it to the `codev.json` in your project and check into Git. --- diff --git a/packages/web/src/content/docs/skills.mdx b/packages/web/src/content/docs/skills.mdx index 2ce88ea568..cce499b4e9 100644 --- a/packages/web/src/content/docs/skills.mdx +++ b/packages/web/src/content/docs/skills.mdx @@ -124,7 +124,7 @@ skill({ name: "git-release" }) ## Configure permissions -Control which skills agents can access using pattern-based permissions in `opencode.json`: +Control which skills agents can access using pattern-based permissions in `codev.json`: ```json { @@ -163,7 +163,7 @@ permission: --- ``` -**For built-in agents** (in `opencode.json`): +**For built-in agents** (in `codev.json`): ```json { diff --git a/packages/web/src/content/docs/tools.mdx b/packages/web/src/content/docs/tools.mdx index e8d5e0963a..13c356fc0d 100644 --- a/packages/web/src/content/docs/tools.mdx +++ b/packages/web/src/content/docs/tools.mdx @@ -13,7 +13,7 @@ By default, all tools are **enabled** and don't need permission to run. You can Use the `permission` field to control tool behavior. You can allow, deny, or require approval for each tool. -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -26,7 +26,7 @@ Use the `permission` field to control tool behavior. You can allow, deny, or req You can also use wildcards to control multiple tools at once. For example, to require approval for all tools from an MCP server: -```json title="opencode.json" +```json title="codev.json" { "$schema": "https://opencode.ai/config.json", "permission": { @@ -49,7 +49,7 @@ Here are all the built-in tools available in OpenCode. Execute shell commands in your project environment. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -66,7 +66,7 @@ This tool allows the LLM to run terminal commands like `npm install`, `git statu Modify existing files using exact string replacements. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -83,7 +83,7 @@ This tool performs precise edits to files by replacing exact text matches. It's Create new files or overwrite existing ones. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -104,7 +104,7 @@ The `write` tool is controlled by the `edit` permission, which covers all file m Read file contents from your codebase. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -121,7 +121,7 @@ This tool reads files and returns their contents. It supports reading specific l Search file contents using regular expressions. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -138,7 +138,7 @@ Fast content search across your codebase. Supports full regex syntax and file pa Find files by pattern matching. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -159,7 +159,7 @@ Interact with your configured LSP servers to get code intelligence features like This tool is only available when `OPENCODE_EXPERIMENTAL_LSP_TOOL=true` (or `OPENCODE_EXPERIMENTAL=true`). ::: -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -178,7 +178,7 @@ To configure which LSP servers are available for your project, see [LSP Servers] Apply patches to files. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -203,7 +203,7 @@ The `apply_patch` tool is controlled by the `edit` permission, which covers all Load a [skill](/docs/skills) (a `SKILL.md` file) and return its content in the conversation. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -218,7 +218,7 @@ Load a [skill](/docs/skills) (a `SKILL.md` file) and return its content in the c Manage todo lists during coding sessions. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -239,7 +239,7 @@ This tool is disabled for subagents by default, but you can enable it manually. Fetch web content. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -267,7 +267,7 @@ OPENCODE_ENABLE_EXA=1 opencode ::: -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { @@ -290,7 +290,7 @@ Use `websearch` when you need to find information (discovery), and `webfetch` wh Ask the user questions during execution. -```json title="opencode.json" {4} +```json title="codev.json" {4} { "$schema": "https://opencode.ai/config.json", "permission": { diff --git a/packages/web/src/content/docs/troubleshooting.mdx b/packages/web/src/content/docs/troubleshooting.mdx index c4d504bd85..a8eafb4d2d 100644 --- a/packages/web/src/content/docs/troubleshooting.mdx +++ b/packages/web/src/content/docs/troubleshooting.mdx @@ -71,9 +71,9 @@ If the desktop app is crashing on launch, hanging, or behaving strangely, start Open your global config file and look for a `plugin` key. -- **macOS/Linux**: `~/.config/opencode/opencode.jsonc` (or `~/.config/opencode/opencode.json`) -- **macOS/Linux** (older installs): `~/.local/share/opencode/opencode.jsonc` -- **Windows**: Press `WIN+R` and paste `%USERPROFILE%\.config\opencode\opencode.jsonc` +- **macOS/Linux**: `~/.config/opencode/codev.jsonc` (or `~/.config/opencode/codev.json`) +- **macOS/Linux** (older installs): `~/.local/share/opencode/codev.jsonc` +- **Windows**: Press `WIN+R` and paste `%USERPROFILE%\.config\opencode\codev.jsonc` If you have plugins configured, temporarily disable them by removing the key or setting it to an empty array: @@ -125,7 +125,7 @@ From the Home screen, click the server name (with the status dot) to open the Se #### Remove `server.port` / `server.hostname` from your config -If your `opencode.json(c)` contains a `server` section, temporarily remove it and restart the desktop app. +If your `codev.json(c)` contains a `server` section, temporarily remove it and restart the desktop app. #### Check environment variables diff --git a/packages/web/src/content/docs/tui.mdx b/packages/web/src/content/docs/tui.mdx index a03797b302..2491900ffe 100644 --- a/packages/web/src/content/docs/tui.mdx +++ b/packages/web/src/content/docs/tui.mdx @@ -383,7 +383,7 @@ You can customize TUI behavior through `tui.json` (or `tui.jsonc`). } ``` -This is separate from `opencode.json`, which configures server/runtime behavior. +This is separate from `codev.json`, which configures server/runtime behavior. `keybinds` is merged with built-in defaults, so you only need to configure the shortcuts you want to change. diff --git a/packages/web/src/content/docs/web.mdx b/packages/web/src/content/docs/web.mdx index 52b97460c4..5ad2285aed 100644 --- a/packages/web/src/content/docs/web.mdx +++ b/packages/web/src/content/docs/web.mdx @@ -126,7 +126,7 @@ This allows you to use both the web interface and terminal simultaneously, shari ## Config File -You can also configure server settings in your `opencode.json` config file: +You can also configure server settings in your `codev.json` config file: ```json {