diff --git a/.opencode/.gitignore b/.codev/.gitignore similarity index 100% rename from .opencode/.gitignore rename to .codev/.gitignore diff --git a/.opencode/agent/duplicate-pr.md b/.codev/agent/duplicate-pr.md similarity index 100% rename from .opencode/agent/duplicate-pr.md rename to .codev/agent/duplicate-pr.md diff --git a/.opencode/agent/triage.md b/.codev/agent/triage.md similarity index 100% rename from .opencode/agent/triage.md rename to .codev/agent/triage.md diff --git a/.opencode/opencode.jsonc b/.codev/codev.jsonc similarity index 75% rename from .opencode/opencode.jsonc rename to .codev/codev.jsonc index b0f7d59447..6101df2f74 100644 --- a/.opencode/opencode.jsonc +++ b/.codev/codev.jsonc @@ -7,9 +7,9 @@ "repository": "github.com/Effect-TS/effect-smol", "description": "Use for Effect v4 and effect-smol implementation details", }, - "opencode-local": { - "path": "~/.local/share/opencode", - "description": "Contains opencode logs and data", + "codev-local": { + "path": "~/.local/share/codev", + "description": "Contains codev logs and data", }, }, "mcp": {}, diff --git a/.opencode/command/ai-deps.md b/.codev/command/ai-deps.md similarity index 100% rename from .opencode/command/ai-deps.md rename to .codev/command/ai-deps.md diff --git a/.opencode/command/changelog.md b/.codev/command/changelog.md similarity index 100% rename from .opencode/command/changelog.md rename to .codev/command/changelog.md diff --git a/.opencode/command/commit.md b/.codev/command/commit.md similarity index 100% rename from .opencode/command/commit.md rename to .codev/command/commit.md diff --git a/.opencode/command/issues.md b/.codev/command/issues.md similarity index 100% rename from .opencode/command/issues.md rename to .codev/command/issues.md diff --git a/.opencode/command/learn.md b/.codev/command/learn.md similarity index 100% rename from .opencode/command/learn.md rename to .codev/command/learn.md diff --git a/.opencode/command/rmslop.md b/.codev/command/rmslop.md similarity index 100% rename from .opencode/command/rmslop.md rename to .codev/command/rmslop.md diff --git a/.opencode/command/spellcheck.md b/.codev/command/spellcheck.md similarity index 100% rename from .opencode/command/spellcheck.md rename to .codev/command/spellcheck.md diff --git a/.opencode/command/translate.md b/.codev/command/translate.md similarity index 85% rename from .opencode/command/translate.md rename to .codev/command/translate.md index 8d493f4a81..6f65cace7c 100644 --- a/.opencode/command/translate.md +++ b/.codev/command/translate.md @@ -10,5 +10,5 @@ Requirements: - Preserve meaning, intent, tone, and formatting (including Markdown/MDX structure). - Preserve all technical terms and artifacts exactly: product/company names, API names, identifiers, code, commands/flags, file paths, URLs, versions, error messages, config keys/values, and anything inside inline code or code blocks. - Also preserve every term listed in the Do-Not-Translate glossary below. -- Also apply locale-specific guidance from `.opencode/glossary/.md` when available (for example, `zh-cn.md`). +- Also apply locale-specific guidance from `.codev/glossary/.md` when available (for example, `zh-cn.md`). - Do not modify fenced code blocks. diff --git a/.opencode/env.d.ts b/.codev/env.d.ts similarity index 100% rename from .opencode/env.d.ts rename to .codev/env.d.ts diff --git a/.opencode/glossary/README.md b/.codev/glossary/README.md similarity index 97% rename from .opencode/glossary/README.md rename to .codev/glossary/README.md index 983900381c..ba839beb60 100644 --- a/.opencode/glossary/README.md +++ b/.codev/glossary/README.md @@ -1,6 +1,6 @@ # Locale Glossaries -Use this folder for locale-specific translation guidance that supplements `.opencode/agent/translator.md`. +Use this folder for locale-specific translation guidance that supplements `.codev/agent/translator.md`. The global glossary in `translator.md` remains the source of truth for shared do-not-translate terms (commands, code, paths, product names, etc.). These locale files capture community learnings about phrasing and terminology preferences. diff --git a/.opencode/glossary/ar.md b/.codev/glossary/ar.md similarity index 100% rename from .opencode/glossary/ar.md rename to .codev/glossary/ar.md diff --git a/.opencode/glossary/br.md b/.codev/glossary/br.md similarity index 100% rename from .opencode/glossary/br.md rename to .codev/glossary/br.md diff --git a/.opencode/glossary/bs.md b/.codev/glossary/bs.md similarity index 100% rename from .opencode/glossary/bs.md rename to .codev/glossary/bs.md diff --git a/.opencode/glossary/da.md b/.codev/glossary/da.md similarity index 100% rename from .opencode/glossary/da.md rename to .codev/glossary/da.md diff --git a/.opencode/glossary/de.md b/.codev/glossary/de.md similarity index 100% rename from .opencode/glossary/de.md rename to .codev/glossary/de.md diff --git a/.opencode/glossary/es.md b/.codev/glossary/es.md similarity index 100% rename from .opencode/glossary/es.md rename to .codev/glossary/es.md diff --git a/.opencode/glossary/fr.md b/.codev/glossary/fr.md similarity index 100% rename from .opencode/glossary/fr.md rename to .codev/glossary/fr.md diff --git a/.opencode/glossary/ja.md b/.codev/glossary/ja.md similarity index 100% rename from .opencode/glossary/ja.md rename to .codev/glossary/ja.md diff --git a/.opencode/glossary/ko.md b/.codev/glossary/ko.md similarity index 100% rename from .opencode/glossary/ko.md rename to .codev/glossary/ko.md diff --git a/.opencode/glossary/no.md b/.codev/glossary/no.md similarity index 100% rename from .opencode/glossary/no.md rename to .codev/glossary/no.md diff --git a/.opencode/glossary/pl.md b/.codev/glossary/pl.md similarity index 100% rename from .opencode/glossary/pl.md rename to .codev/glossary/pl.md diff --git a/.opencode/glossary/ru.md b/.codev/glossary/ru.md similarity index 100% rename from .opencode/glossary/ru.md rename to .codev/glossary/ru.md diff --git a/.opencode/glossary/th.md b/.codev/glossary/th.md similarity index 100% rename from .opencode/glossary/th.md rename to .codev/glossary/th.md diff --git a/.opencode/glossary/tr.md b/.codev/glossary/tr.md similarity index 100% rename from .opencode/glossary/tr.md rename to .codev/glossary/tr.md diff --git a/.opencode/glossary/zh-cn.md b/.codev/glossary/zh-cn.md similarity index 100% rename from .opencode/glossary/zh-cn.md rename to .codev/glossary/zh-cn.md diff --git a/.opencode/glossary/zh-tw.md b/.codev/glossary/zh-tw.md similarity index 100% rename from .opencode/glossary/zh-tw.md rename to .codev/glossary/zh-tw.md diff --git a/.opencode/plugins/smoke-theme.json b/.codev/plugins/smoke-theme.json similarity index 100% rename from .opencode/plugins/smoke-theme.json rename to .codev/plugins/smoke-theme.json diff --git a/.opencode/plugins/tui-smoke.tsx b/.codev/plugins/tui-smoke.tsx similarity index 100% rename from .opencode/plugins/tui-smoke.tsx rename to .codev/plugins/tui-smoke.tsx diff --git a/.opencode/skills/effect/SKILL.md b/.codev/skills/effect/SKILL.md similarity index 85% rename from .opencode/skills/effect/SKILL.md rename to .codev/skills/effect/SKILL.md index 3a44fa88dc..9ff7b8fd0f 100644 --- a/.opencode/skills/effect/SKILL.md +++ b/.codev/skills/effect/SKILL.md @@ -11,8 +11,8 @@ This codebase uses Effect for typed, composable TypeScript services, schemas, an Use the current Effect v4 / effect-smol source, not memory or older Effect v2/v3 examples. -1. If `.opencode/references/effect-smol` is missing, clone `https://github.com/Effect-TS/effect-smol` there. Do this in the project, not in the skill folder. -2. Search `.opencode/references/effect-smol` for exact APIs, examples, tests, and naming patterns before answering or implementing Effect-specific code. +1. If `.codev/references/effect-smol` is missing, clone `https://github.com/Effect-TS/effect-smol` there. Do this in the project, not in the skill folder. +2. Search `.codev/references/effect-smol` for exact APIs, examples, tests, and naming patterns before answering or implementing Effect-specific code. 3. Also inspect existing repo code for local house style before introducing new patterns. 4. Prefer answers and implementations backed by specific source files or nearby repo examples. @@ -27,7 +27,7 @@ Use the current Effect v4 / effect-smol source, not memory or older Effect v2/v3 - Keep layer composition explicit. Avoid broad hidden provisioning that makes missing dependencies hard to see. - In tests, prefer the repo's existing Effect test helpers and live tests for filesystem, git, child process, locks, or timing behavior. - Do not introduce `any`, non-null assertions, unchecked casts, or older Effect APIs just to satisfy types. -- Do not answer from memory. Verify against `.opencode/references/effect-smol` or nearby code first. +- Do not answer from memory. Verify against `.codev/references/effect-smol` or nearby code first. ## Testing Patterns diff --git a/.opencode/themes/.gitignore b/.codev/themes/.gitignore similarity index 100% rename from .opencode/themes/.gitignore rename to .codev/themes/.gitignore diff --git a/.opencode/themes/mytheme.json b/.codev/themes/mytheme.json similarity index 100% rename from .opencode/themes/mytheme.json rename to .codev/themes/mytheme.json diff --git a/.opencode/tool/github-pr-search.ts b/.codev/tool/github-pr-search.ts similarity index 100% rename from .opencode/tool/github-pr-search.ts rename to .codev/tool/github-pr-search.ts diff --git a/.opencode/tool/github-triage.ts b/.codev/tool/github-triage.ts similarity index 100% rename from .opencode/tool/github-triage.ts rename to .codev/tool/github-triage.ts diff --git a/.opencode/tui.json b/.codev/tui.json similarity index 100% rename from .opencode/tui.json rename to .codev/tui.json diff --git a/AGENTS.md b/AGENTS.md index cd2327e888..c93945ff1e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,8 +1,7 @@ - To regenerate the legacy JavaScript SDK, run `./packages/sdk/js/script/build.ts`. - After changing the public Protocol or Server `HttpApi`, run `bun run generate` from `packages/client`. Do not edit `src/generated` or `src/generated-effect` directly. - Keep runtime dependencies directed from Schema to Core and Protocol, then from Core and Protocol to Server. Client runtime code may depend on Schema and Protocol but never Core or Server; `sdk-next` composes Client, Core, and Server. -- The default branch in this repo is `dev`. -- Local `main` ref may not exist; use `dev` or `origin/dev` for diffs. +- The default branch in this repo is `main`; use `main` or `origin/main` for diffs. (Upstream opencode's default is `dev`; this fork does not have that branch.) ## Branch Names diff --git a/DIVERGENCES.md b/DIVERGENCES.md index d68474a421..e49f47b073 100644 --- a/DIVERGENCES.md +++ b/DIVERGENCES.md @@ -15,7 +15,7 @@ upstream maintainers — see README → Syncing with upstream for why and how. | File | Change | Why | On conflict | | --- | --- | --- | --- | -| `packages/core/src/global.ts`, `packages/core/test/global.test.ts`, `packages/opencode/test/cli/mcp-add.test.ts` | `const app = "opencode"` → `"codev-code"`; test expectations `tmpdir()/opencode` → `tmpdir()/codev-code` and `.config/opencode/` → `.config/codev-code/` | Config/data/cache/state dirs under `~/.config/codev-code` etc.; upstream tests assert the literal dir name. | Keep ours (the one constant + expectations); take upstream's surrounding changes. | +| `packages/core/src/global.ts`, `packages/core/test/global.test.ts`, `packages/opencode/test/cli/mcp-add.test.ts` | `const app = "opencode"` → `"codev"`; test expectations `tmpdir()/opencode` → `tmpdir()/codev` and `.config/opencode/` → `.config/codev/` | Config/data/cache/state dirs under `~/.config/codev` etc.; upstream tests assert the literal dir name. | Keep ours (the one constant + expectations); take upstream's surrounding changes. | | `packages/opencode/src/index.ts`, `packages/opencode/test/cli/error.test.ts`, `packages/opencode/test/cli/help/help-snapshots.test.ts`, `packages/opencode/test/cli/help/__snapshots__/help-snapshots.test.ts.snap` | `scriptName("opencode")` → `"codev"`; `show()` prefix check `"opencode "` → `"codev "`; registered the fork-only `ConfigureCommand` (cli/cmd/configure.ts, new file) and added `configure` to the help-snapshot TOP_LEVEL list; test expectation `` `opencode models` `` → `` `codev models` ``; help snapshots regenerated so usage lines read `codev …` | Help/usage text shows the real user-facing command; `codev configure` is the standalone gateway-setup entry point. The `show()` check must always match the scriptName; upstream's error-format test and help snapshots assert the literal command. | Keep our strings, command registration + expectation; take upstream's surrounding changes. Regenerate the snapshot file with `bun test test/cli/help --update-snapshots` instead of hand-merging. | | `package.json` (root) | Added `release` script delegating to packages/opencode | `bun run release` works from the repo root. | Keep our release line; take upstream's other fields. | | `packages/opencode/package.json` | bin key `opencode` → `codev` (shim path `./bin/opencode` unchanged); added `release` script | Installed command is `codev` — matches the CLI's `scriptName` and help text (the hub's command is `codevhub`; it relinquished the `codev` bin in codev-ai ≥ 0.4.0). `bun run release` publishes the version in this file (upstream-synced; script/release.ts is fork-only). | Keep our bin key and release line; take upstream's other fields including `version`. | @@ -40,6 +40,8 @@ upstream maintainers — see README → Syncing with upstream for why and how. | `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). | +| `.opencode/` (repo root, whole directory) | Renamed to `.codev/`; inner `opencode.jsonc` → `codev.jsonc`; internal `.opencode/` path mentions in `glossary/README.md`, `skills/effect/SKILL.md`, `command/translate.md` updated; the `opencode-local` reference → `codev-local` pointing at `~/.local/share/codev` | This is the repo's own dogfooding config dir; after the config-dir rename row below, the agent only discovers `.codev/`. | Keep our directory; re-apply upstream's `.opencode/**` changes into `.codev/` (sync surfaces them as modify/delete or add conflicts). | +| Config-dir rename: `packages/opencode/src/config/{paths,config,tui}.ts`, `packages/core/src/config.ts`, `packages/opencode/src/plugin/install.ts`, `packages/opencode/src/plugin/tui/runtime.ts`, `packages/tui/src/context/theme.tsx`, `packages/opencode/src/cli/cmd/{agent,mcp}.ts`, `packages/opencode/src/session/session.ts`, plan permission patterns (`packages/opencode/src/agent/agent.ts`, `packages/core/src/plugin/agent.ts`), TUI tips, skill descriptions, `customize-opencode.md`, `specs/tui-plugins.md`, tests creating `.opencode` fixtures, docs (en + es) | Config directory `.opencode` → `.codev` (project walk-up, `~/.codev`, plans dir, theme/plugin discovery) | The fork's config surface uses the fork's name; hard rename, no legacy fallback. NOT renamed: `~/.opencode/bin` install paths (binary location — see installation/uninstall rows), the `ai.opencode.managed` plist domain, identifiers like provider id `opencode` and theme asset keys. | Keep our dir name; take upstream's surrounding logic. Rename any new upstream `.opencode` dir reference to `.codev` (leave `~/.opencode/bin`). | | `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. | @@ -47,10 +49,11 @@ upstream maintainers — see README → Syncing with upstream for why and how. | `packages/desktop/src/main/index.ts`, `packages/desktop/src/main/windows.ts` | APP_NAMES + window title → "CoDev Code" (Dev/Beta variants too) | Desktop app display name. | Keep our names. | | `packages/desktop/electron-builder.config.ts` | `productName` ×3 → "CoDev Code…"; artifactName → `codev-code-desktop-…`; protocol display name | Installer/product branding. appId (`ai.opencode.desktop`) and the `opencode://` deep-link scheme stay upstream — identity plumbing wired into main/index.ts and app deep-links; do not rename casually. | Keep our names; take upstream's other config. | | `packages/ui/src/assets/favicon/` (favicon-v3.svg, site.webmanifest, favicon-96x96-v3.png, apple-touch-icon-v3.png, web-app-manifest-192/512.png) | New codev mark: blocky "C" in #00cdcd (banner cyan) on dark; manifest name "CoDev Code"/"codev" | Web/desktop favicon + PWA branding (served via packages/app/public symlinks). | Keep our assets (binary: take ours wholesale). | +| `AGENTS.md` | Default-branch note: `dev` → `main` (single merged line; upstream has two lines saying local `main` may not exist) | The fork's default branch is `main` (see the workflow-triggers row); agents kept basing diffs on a nonexistent `dev`. | Keep our line; take upstream's other guidance. | | `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/` 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. | +| 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/bin` install paths, provider id `opencode`, fixture APIs (`opencode.run`, `OpencodeCli`), auth method `opencode-login`, default username `opencode`, upstream issue refs, third-party names. Config-file and config-dir fixtures follow the rename rows (`codev.json`, `.codev/`). | 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. | @@ -60,7 +63,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 `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. | +| `packages/opencode/test/server/httpapi-exercise/environment.ts` | Exercise config/data dirs `config/opencode`,`data/opencode` → `…/codev`; 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. | @@ -89,6 +92,7 @@ upstream maintainers — see README → Syncing with upstream for why and how. formats we can't author well — need design assets), desktop app ICONS (resources/icons — need design assets), and the `ai.opencode.desktop` appId / `opencode://` scheme (identity plumbing, like the OPENCODE_* env vars). -- **Internal names**: `@opencode-ai/*` package names, `OPENCODE_*` env vars, `~/.local/share/codev-code` - internals keep upstream naming on purpose. Renaming them would be a permanent - merge-conflict machine for names users never see. Do not "clean these up". +- **Internal names**: `@opencode-ai/*` package names, `OPENCODE_*` env vars, and file names + inside `~/.local/share/codev` (e.g. `opencode-local.db`) keep upstream naming on purpose. + Renaming them would be a permanent merge-conflict machine for names users never see. + Do not "clean these up". diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 347daee6ee..8980cc80e8 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -178,7 +178,7 @@ const layer = Layer.effect( ? [] : yield* fs .up({ - targets: [".opencode", ...names.toReversed()], + targets: [".codev", ...names.toReversed()], start: location.directory, stop: location.project.directory, }) @@ -186,20 +186,20 @@ const layer = Layer.effect( const directories = [ globalDirectory, ...discovered - .filter((item) => path.basename(item) === ".opencode") + .filter((item) => path.basename(item) === ".codev") .toReversed() .map((directory) => AbsolutePath.make(directory)), ] // A config closer to the opened directory should win over one higher up. // Search starts nearby, so reverse the results before applying them. - const directPaths = discovered.filter((item) => path.basename(item) !== ".opencode").toReversed() + const directPaths = discovered.filter((item) => path.basename(item) !== ".codev").toReversed() const direct = yield* Effect.forEach(directPaths, loadFile).pipe( Effect.orDie, Effect.map((configs) => configs.filter((config): config is Document => config !== undefined)), ) const supplementary = yield* Effect.forEach(directories, loadDirectory).pipe(Effect.orDie) // Apply general settings first and more specific settings last: - // global config, project files, then `.opencode` files. + // global config, project files, then `.codev` files. const configs = [...(supplementary[0] ?? []), ...direct, ...supplementary.slice(1).flat()] // Rules use the opposite order so a user-global rule can override a // repository rule. Statement order inside each file stays unchanged. diff --git a/packages/core/src/global.ts b/packages/core/src/global.ts index c78142d863..352476d246 100644 --- a/packages/core/src/global.ts +++ b/packages/core/src/global.ts @@ -7,7 +7,7 @@ import { Flock } from "./util/flock" import { Flag } from "./flag/flag" import { makeGlobalNode } from "./effect/app-node" -const app = "codev-code" +const app = "codev" const data = path.join(xdgData!, app) const cache = path.join(xdgCache!, app) const config = path.join(xdgConfig!, app) diff --git a/packages/core/src/plugin/agent.ts b/packages/core/src/plugin/agent.ts index 9a763c7ea9..c6bc397e28 100644 --- a/packages/core/src/plugin/agent.ts +++ b/packages/core/src/plugin/agent.ts @@ -143,7 +143,7 @@ export const Plugin = define({ { action: "plan_exit", resource: "*", effect: "allow" }, { action: "external_directory", resource: path.join(Global.Path.data, "plans", "*"), effect: "allow" }, { action: "edit", resource: "*", effect: "deny" }, - { action: "edit", resource: path.join(".opencode", "plans", "*.md"), effect: "allow" }, + { action: "edit", resource: path.join(".codev", "plans", "*.md"), effect: "allow" }, { action: "edit", resource: path.relative(worktree, path.join(Global.Path.data, "plans", "*.md")), diff --git a/packages/core/src/plugin/skill.ts b/packages/core/src/plugin/skill.ts index f1d0f46a25..d93f3e98be 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: 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.", + "Use ONLY when the user is editing or creating opencode's own configuration: codev.json, codev.jsonc, files under .codev/, or files under ~/.config/codev/. 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 8c633fa437..1467604ee1 100644 --- a/packages/core/src/plugin/skill/customize-opencode.md +++ b/packages/core/src/plugin/skill/customize-opencode.md @@ -39,14 +39,14 @@ already-loaded config until then. | Scope | Path | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| 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` | -| Global commands | `~/.config/opencode/command(s)/<name>.md` | -| Project skills | `.opencode/skill(s)/<name>/SKILL.md` | -| Global skills | `~/.config/opencode/skill(s)/<name>/SKILL.md` | +| Project config | `./codev.json`, `./codev.jsonc`, or `.codev/codev.json` (opencode walks up from the cwd to the worktree root) | +| Global config | `~/.config/codev/codev.json` (`~/.codev/` is a config directory for agents/commands/plugins, not where the global config file lives) | +| Project agents | `.codev/agent/<name>.md` or `.codev/agents/<name>.md` | +| Global agents | `~/.config/codev/agent(s)/<name>.md` | +| Project commands | `.codev/command/<name>.md` or `.codev/commands/<name>.md` | +| Global commands | `~/.config/codev/command(s)/<name>.md` | +| Project skills | `.codev/skill(s)/<name>/SKILL.md` | +| Global skills | `~/.config/codev/skill(s)/<name>/SKILL.md` | | 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 @@ -71,7 +71,7 @@ Every field is optional. "instructions": ["AGENTS.md", "docs/style.md"], "skills": { - "paths": [".opencode/skills", "/abs/path/to/skills"], + "paths": [".codev/skills", "/abs/path/to/skills"], "urls": ["https://example.com/.well-known/skills/"] }, @@ -165,7 +165,7 @@ file is named `SKILL.md` exactly, and lives in its own folder named after the skill: ``` -.opencode/skills/my-skill/SKILL.md +.codev/skills/my-skill/SKILL.md ``` Frontmatter: @@ -244,7 +244,7 @@ Two ways to define an agent. Use the file form for anything non-trivial. ### File ``` -.opencode/agent/my-reviewer.md OR .opencode/agents/my-reviewer.md +.codev/agent/my-reviewer.md OR .codev/agents/my-reviewer.md ``` ```markdown @@ -286,7 +286,7 @@ opencode's command loader scans for `**/*.md` inside command directories. The file is named after the command, and lives directly inside the `command` folder: ``` -.opencode/command/deploy.md +.codev/command/deploy.md ``` Frontmatter: @@ -320,7 +320,7 @@ model: anthropic/claude-sonnet-4-6 ``` Auto-discovered plugins (no config entry needed): any `*.ts` or `*.js` file in -`.opencode/plugin/` or `.opencode/plugins/`. +`.codev/plugin/` or `.codev/plugins/`. A plugin module exports `default` (or any named export) of type `Plugin = (input: PluginInput, options?) => Promise<Hooks>`. The export is a diff --git a/packages/core/test/config/config.test.ts b/packages/core/test/config/config.test.ts index 6570089357..3983bc949a 100644 --- a/packages/core/test/config/config.test.ts +++ b/packages/core/test/config/config.test.ts @@ -749,7 +749,7 @@ describe("Config", () => { ), ) - it.live("loads global, ancestor, and .opencode configuration up to the project boundary", () => + it.live("loads global, ancestor, and .codev configuration up to the project boundary", () => Effect.acquireRelease( Effect.promise(() => tmpdir()), (tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]()), @@ -763,17 +763,17 @@ describe("Config", () => { yield* Effect.promise(async () => { await fs.mkdir(global, { recursive: true }) await fs.mkdir(directory, { recursive: true }) - await fs.mkdir(path.join(root, ".opencode"), { recursive: true }) - await fs.mkdir(path.join(directory, ".opencode"), { recursive: true }) + await fs.mkdir(path.join(root, ".codev"), { recursive: true }) + await fs.mkdir(path.join(directory, ".codev"), { recursive: true }) await Promise.all([ 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(root, ".codev", "codev.json"), JSON.stringify({ $schema: "root-dot" })), fs.writeFile( - path.join(directory, ".opencode", "codev.jsonc"), + path.join(directory, ".codev", "codev.jsonc"), JSON.stringify({ $schema: "directory-dot" }), ), ]) @@ -786,8 +786,8 @@ describe("Config", () => { expect(entries.filter((entry) => entry.type === "directory").map((entry) => entry.path)).toEqual([ AbsolutePath.make(global), - AbsolutePath.make(path.join(root, ".opencode")), - AbsolutePath.make(path.join(directory, ".opencode")), + AbsolutePath.make(path.join(root, ".codev")), + AbsolutePath.make(path.join(directory, ".codev")), ]) expect(documents.map((document) => document.info.$schema)).toEqual([ "global", @@ -804,9 +804,9 @@ describe("Config", () => { "parent", "directory", "root-dot", - AbsolutePath.make(path.join(root, ".opencode")), + AbsolutePath.make(path.join(root, ".codev")), "directory-dot", - AbsolutePath.make(path.join(directory, ".opencode")), + AbsolutePath.make(path.join(directory, ".codev")), ]) }).pipe( Effect.provide( diff --git a/packages/core/test/global.test.ts b/packages/core/test/global.test.ts index ef7c6826cd..f3a0bd3be0 100644 --- a/packages/core/test/global.test.ts +++ b/packages/core/test/global.test.ts @@ -6,7 +6,7 @@ import { Global } from "@opencode-ai/core/global" describe("global paths", () => { test("tmp path is under the system temp directory", () => { - expect(Global.Path.tmp).toBe(path.join(os.tmpdir(), "codev-code")) + expect(Global.Path.tmp).toBe(path.join(os.tmpdir(), "codev")) expect(Global.make().tmp).toBe(Global.Path.tmp) }) diff --git a/packages/core/test/ripgrep.test.ts b/packages/core/test/ripgrep.test.ts index 88b1822f91..45cdbe4285 100644 --- a/packages/core/test/ripgrep.test.ts +++ b/packages/core/test/ripgrep.test.ts @@ -39,14 +39,14 @@ describe("Ripgrep", () => { Effect.promise(() => tmpdir()), (tmp) => Effect.gen(function* () { - yield* Effect.promise(() => fs.mkdir(path.join(tmp.path, ".opencode"))) - yield* Effect.promise(() => fs.writeFile(path.join(tmp.path, ".opencode", "config"), "needle\n")) + yield* Effect.promise(() => fs.mkdir(path.join(tmp.path, ".codev"))) + yield* Effect.promise(() => fs.writeFile(path.join(tmp.path, ".codev", "config"), "needle\n")) yield* Effect.promise(() => fs.mkdir(path.join(tmp.path, ".git"))) yield* Effect.promise(() => fs.writeFile(path.join(tmp.path, ".git", "config"), "needle\n")) const ripgrep = yield* Ripgrep.Service const files = yield* ripgrep.find({ cwd: tmp.path, pattern: "**/*", limit: 10 }) - expect(files.map((item) => item.path)).toContain(RelativePath.make(".opencode/config")) + expect(files.map((item) => item.path)).toContain(RelativePath.make(".codev/config")) expect(files.map((item) => item.path)).not.toContain(RelativePath.make(".git/config")) const observed: string[] = [] @@ -59,7 +59,7 @@ describe("Ripgrep", () => { expect(observed).toEqual(limited.map((item) => item.path)) const matches = yield* ripgrep.grep({ cwd: tmp.path, pattern: "needle", include: "config", limit: 10 }) - expect(matches.map((item) => item.entry.path)).toContain(RelativePath.make(".opencode/config")) + expect(matches.map((item) => item.entry.path)).toContain(RelativePath.make(".codev/config")) expect(matches.map((item) => item.entry.path)).not.toContain(RelativePath.make(".git/config")) }), (tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]()), diff --git a/packages/opencode/specs/tui-plugins.md b/packages/opencode/specs/tui-plugins.md index 06f7757d51..b6fcbbb7bc 100644 --- a/packages/opencode/specs/tui-plugins.md +++ b/packages/opencode/specs/tui-plugins.md @@ -186,7 +186,7 @@ npm plugins can declare a version compatibility range in `package.json` using th - The value is a semver range checked against the running OpenCode version. - If the range is not satisfied, the plugin is skipped with a warning and a session error. -- If `engines.opencode` is absent, no check is performed (backward compatible). +- If `engines.codev` is absent, no check is performed (backward compatible). - File plugins are never checked; only npm package plugins are validated. - Install flow is shared by CLI and TUI in `src/plugin/install.ts`. @@ -195,8 +195,8 @@ npm plugins can declare a version compatibility range in `package.json` using th - Alias: `opencode plug <module>`. - `-g` / `--global` writes into the global config dir. - Local installs resolve target dir inside `patchPluginConfig`. -- For local scope, path is `<worktree>/.opencode` only when VCS is git and `worktree !== "/"`; otherwise `<directory>/.opencode`. -- Root-worktree fallback (`worktree === "/"` uses `<directory>/.opencode`) is covered by regression tests. +- For local scope, path is `<worktree>/.codev` only when VCS is git and `worktree !== "/"`; otherwise `<directory>/.codev`. +- Root-worktree fallback (`worktree === "/"` uses `<directory>/.codev`) is covered by regression tests. - `patchPluginConfig` applies all detected targets (`server` and/or `tui`) in one call. - `patchPluginConfig` returns structured result unions (`ok`, `code`, fields by error kind) instead of custom thrown errors. - `patchPluginConfig` serializes per-target config writes with `Flock.acquire(...)`. @@ -213,7 +213,7 @@ npm plugins can declare a version compatibility range in `package.json` using th - There is no uninstall, list, or update CLI command for external plugins. - Local file plugins are configured directly in `tui.json`. -When `plugin` entries exist in a writable `.opencode` dir or `OPENCODE_CONFIG_DIR`, OpenCode installs `@opencode-ai/plugin` into that dir and writes: +When `plugin` entries exist in a writable `.codev` dir or `OPENCODE_CONFIG_DIR`, OpenCode installs `@opencode-ai/plugin` into that dir and writes: - `package.json` - `bun.lock` @@ -413,7 +413,7 @@ Theme install behavior: - If the theme name already exists, install is skipped unless plugin metadata state is `updated`. - On `updated`, host skips rewrite when tracked `mtime`/`size` is unchanged. - When a theme already exists and state is not `updated`, host can still persist theme metadata when destination already exists. -- Local plugins persist installed themes under the local `.opencode/themes` area near the plugin config source. +- Local plugins persist installed themes under the local `.codev/themes` area near the plugin config source. - Global plugins persist installed themes under the global `themes` dir. - Invalid or unreadable theme files are ignored. @@ -538,7 +538,7 @@ The plugin manager is exposed as a command with title `Plugins` and value `plugi ## Current in-repo examples -- Local smoke plugin: `.opencode/plugins/tui-smoke.tsx` -- Local vim plugin: `.opencode/plugins/tui-vim.tsx` -- Local smoke config: `.opencode/tui.json` -- Local smoke theme: `.opencode/plugins/smoke-theme.json` +- Local smoke plugin: `.codev/plugins/tui-smoke.tsx` +- Local vim plugin: `.codev/plugins/tui-vim.tsx` +- Local smoke config: `.codev/tui.json` +- Local smoke theme: `.codev/plugins/smoke-theme.json` diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 536a642fe4..cf3d539596 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -170,7 +170,7 @@ const layer = Layer.effect( }, edit: { "*": "deny", - [path.join(".opencode", "plans", "*.md")]: "allow", + [path.join(".codev", "plans", "*.md")]: "allow", [path.relative(ctx.worktree, path.join(Global.Path.data, path.join("plans", "*.md")))]: "allow", }, }), diff --git a/packages/opencode/src/cli/cmd/agent.ts b/packages/opencode/src/cli/cmd/agent.ts index c9c1d2c167..bbc79cd9ce 100644 --- a/packages/opencode/src/cli/cmd/agent.ts +++ b/packages/opencode/src/cli/cmd/agent.ts @@ -108,7 +108,7 @@ const AgentCreateCommand = effectCmd({ if (prompts.isCancel(scopeResult)) throw new UI.CancelledError() scope = scopeResult } - targetPath = path.join(scope === "global" ? Global.Path.config : path.join(ctx.worktree, ".opencode"), "agents") + targetPath = path.join(scope === "global" ? Global.Path.config : path.join(ctx.worktree, ".codev"), "agents") } // Get description diff --git a/packages/opencode/src/cli/cmd/mcp.ts b/packages/opencode/src/cli/cmd/mcp.ts index 89669d965b..b28515dbef 100644 --- a/packages/opencode/src/cli/cmd/mcp.ts +++ b/packages/opencode/src/cli/cmd/mcp.ts @@ -392,11 +392,11 @@ export const McpLogoutCommand = effectCmd({ }) async function resolveConfigPath(baseDir: string, global = false) { - // Check for existing config files (prefer .jsonc over .json, check .opencode/ subdirectory too) + // Check for existing config files (prefer .jsonc over .json, check .codev/ subdirectory too) const candidates = [path.join(baseDir, "codev.json"), path.join(baseDir, "codev.jsonc")] if (!global) { - candidates.push(path.join(baseDir, ".opencode", "codev.json"), path.join(baseDir, ".opencode", "codev.jsonc")) + candidates.push(path.join(baseDir, ".codev", "codev.json"), path.join(baseDir, ".codev", "codev.jsonc")) } for (const candidate of candidates) { diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 785ae7a32c..e9b6506d9f 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -402,7 +402,7 @@ const layer = Layer.effect( const deps: Fiber.Fiber<void>[] = [] for (const dir of directories) { - if (dir.endsWith(".opencode") || dir === Flag.OPENCODE_CONFIG_DIR) { + if (dir.endsWith(".codev") || dir === Flag.OPENCODE_CONFIG_DIR) { for (const file of ["codev.json", "codev.jsonc"]) { const source = path.join(dir, file) yield* Effect.logDebug(`loading config from ${source}`) @@ -439,7 +439,7 @@ const layer = Layer.effect( result.command = mergeDeep(result.command ?? {}, yield* Effect.promise(() => ConfigCommand.load(dir))) result.agent = mergeDeep(result.agent ?? {}, yield* Effect.promise(() => ConfigAgent.load(dir))) result.agent = mergeDeep(result.agent ?? {}, yield* Effect.promise(() => ConfigAgent.loadMode(dir))) - // Auto-discovered plugins under `.opencode/plugin(s)` are already local files, so ConfigPlugin.load + // Auto-discovered plugins under `.codev/plugin(s)` are already local files, so ConfigPlugin.load // returns normalized Specs and we only need to attach origin metadata here. const list = yield* Effect.promise(() => ConfigPlugin.load(dir)) yield* mergePluginOrigins(dir, list) diff --git a/packages/opencode/src/config/paths.ts b/packages/opencode/src/config/paths.ts index 11d90f1292..0b2b14c9d8 100644 --- a/packages/opencode/src/config/paths.ts +++ b/packages/opencode/src/config/paths.ts @@ -26,13 +26,13 @@ export const directories = Effect.fn("ConfigPaths.directories")(function* (direc Global.Path.config, ...(!Flag.OPENCODE_DISABLE_PROJECT_CONFIG ? yield* afs.up({ - targets: [".opencode"], + targets: [".codev"], start: directory, stop: worktree, }) : []), ...(yield* afs.up({ - targets: [".opencode"], + targets: [".codev"], start: Global.Path.home, stop: Global.Path.home, })), diff --git a/packages/opencode/src/config/tui.ts b/packages/opencode/src/config/tui.ts index 5bd4ee1124..d40136892a 100644 --- a/packages/opencode/src/config/tui.ts +++ b/packages/opencode/src/config/tui.ts @@ -168,7 +168,7 @@ const loadState = Effect.fn("TuiConfig.loadState")(function* (ctx: { directory: acc.plugin_origins = plugins }) - // Every config dir we may read from: global config dir, any `.opencode` + // Every config dir we may read from: global config dir, any `.codev` // folders between cwd and home, and OPENCODE_CONFIG_DIR. const directories = yield* ConfigPaths.directories(ctx.directory) yield* Effect.promise(() => migrateTuiConfig({ directories, cwd: ctx.directory })) @@ -197,13 +197,13 @@ const loadState = Effect.fn("TuiConfig.loadState")(function* (ctx: { directory: yield* mergeFile(acc, file) } - // 4. `.opencode` directories (and OPENCODE_CONFIG_DIR) discovered while + // 4. `.codev` directories (and OPENCODE_CONFIG_DIR) discovered while // walking up the tree. Also returned below so callers can install plugin // dependencies from each location. - const dirs = unique(directories).filter((dir) => dir.endsWith(".opencode") || dir === Flag.OPENCODE_CONFIG_DIR) + const dirs = unique(directories).filter((dir) => dir.endsWith(".codev") || dir === Flag.OPENCODE_CONFIG_DIR) for (const dir of dirs) { - if (!dir.endsWith(".opencode") && dir !== Flag.OPENCODE_CONFIG_DIR) continue + if (!dir.endsWith(".codev") && dir !== Flag.OPENCODE_CONFIG_DIR) continue for (const file of ConfigPaths.fileInDirectory(dir, "tui")) { yield* mergeFile(acc, file) } diff --git a/packages/opencode/src/control-plane/dev/README.md b/packages/opencode/src/control-plane/dev/README.md index 1082827718..78151d63bd 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/codev.jsonc`: +This is a plugin to simulate a remote environment locally. Add this to `.codev/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 f9bbcce70e..2f0819edaf 100644 --- a/packages/opencode/src/plugin/install.ts +++ b/packages/opencode/src/plugin/install.ts @@ -334,7 +334,7 @@ function patchDir(input: PatchInput) { if (input.global) return input.config ?? Global.Path.config const git = input.vcs === "git" && input.worktree !== "/" const root = git ? input.worktree : input.directory - return path.join(root, ".opencode") + return path.join(root, ".codev") } function patchName(kind: Kind): "codev" | "tui" { diff --git a/packages/opencode/src/plugin/tui/runtime.ts b/packages/opencode/src/plugin/tui/runtime.ts index 2a88ad3d59..437697bff4 100644 --- a/packages/opencode/src/plugin/tui/runtime.ts +++ b/packages/opencode/src/plugin/tui/runtime.ts @@ -253,9 +253,9 @@ function createThemeInstaller( const name = path.basename(src, path.extname(src)) const source_dir = path.dirname(meta.source) const local_dir = - path.basename(source_dir) === ".opencode" + path.basename(source_dir) === ".codev" ? path.join(source_dir, "themes") - : path.join(source_dir, ".opencode", "themes") + : path.join(source_dir, ".codev", "themes") const dest_dir = meta.scope === "local" ? local_dir : path.join(Global.Path.config, "themes") const dest = path.join(dest_dir, `${name}.json`) const stat = await Filesystem.statAsync(src) @@ -814,7 +814,7 @@ function defaultPluginOrigin(state: RuntimeState, spec: string): ConfigPlugin.Or return { spec, scope: "local", - source: state.api.state.path.config || path.join(state.directory, ".opencode", "tui.json"), + source: state.api.state.path.config || path.join(state.directory, ".codev", "tui.json"), } } diff --git a/packages/opencode/src/session/session.ts b/packages/opencode/src/session/session.ts index de8c3dc4cb..f684b53deb 100644 --- a/packages/opencode/src/session/session.ts +++ b/packages/opencode/src/session/session.ts @@ -330,7 +330,7 @@ export const Event = { export function plan(input: { slug: string; time: { created: number } }, instance: InstanceContext) { const base = instance.project.vcs - ? path.join(instance.worktree, ".opencode", "plans") + ? path.join(instance.worktree, ".codev", "plans") : path.join(Global.Path.data, "plans") return path.join(base, [input.time.created, input.slug].join("-") + ".md") } diff --git a/packages/opencode/src/skill/index.ts b/packages/opencode/src/skill/index.ts index fe0b29162b..305cd4c653 100644 --- a/packages/opencode/src/skill/index.ts +++ b/packages/opencode/src/skill/index.ts @@ -31,7 +31,7 @@ const SKILL_PATTERN = "**/SKILL.md" // 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: 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." + "Use ONLY when the user is editing or creating opencode's own configuration: codev.json, codev.jsonc, files under .codev/, or files under ~/.config/codev/. 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/agent/agent.test.ts b/packages/opencode/test/agent/agent.test.ts index efeaf408a2..990de68fb4 100644 --- a/packages/opencode/test/agent/agent.test.ts +++ b/packages/opencode/test/agent/agent.test.ts @@ -69,14 +69,14 @@ it.instance("build agent has correct default properties", () => }), ) -it.instance("plan agent denies edits except .opencode/plans/*", () => +it.instance("plan agent denies edits except .codev/plans/*", () => Effect.gen(function* () { const plan = yield* load((svc) => svc.get("plan")) expect(plan).toBeDefined() // Wildcard is denied expect(evalPerm(plan, "edit")).toBe("deny") // But specific path is allowed - expect(Permission.evaluate("edit", ".opencode/plans/foo.md", plan!.permission).action).toBe("allow") + expect(Permission.evaluate("edit", ".codev/plans/foo.md", plan!.permission).action).toBe("allow") }), ) @@ -598,7 +598,7 @@ it.instance( () => Effect.gen(function* () { const test = yield* TestInstance - const skillDir = path.join(test.directory, ".opencode", "skill", "perm-skill") + const skillDir = path.join(test.directory, ".codev", "skill", "perm-skill") yield* Effect.promise(() => Bun.write( path.join(skillDir, "SKILL.md"), diff --git a/packages/opencode/test/cli/error.test.ts b/packages/opencode/test/cli/error.test.ts index dd0c9e57e0..e9295f3b5e 100644 --- a/packages/opencode/test/cli/error.test.ts +++ b/packages/opencode/test/cli/error.test.ts @@ -13,9 +13,9 @@ describe("cli.error", () => { }, { tag: "ConfigDirectoryTypoError", - data: { path: "/tmp/codev.jsonc", dir: ".opencode", suggestion: "opencode" }, + data: { path: "/tmp/codev.jsonc", dir: ".codev", suggestion: "opencode" }, expected: - 'Directory ".opencode" in /tmp/codev.jsonc is not valid. Rename the directory to "opencode" or remove it. This is a common typo.', + 'Directory ".codev" in /tmp/codev.jsonc is not valid. Rename the directory to "opencode" or remove it. This is a common typo.', }, { tag: "ConfigFrontmatterError", diff --git a/packages/opencode/test/cli/mcp-add.test.ts b/packages/opencode/test/cli/mcp-add.test.ts index 639515dd7c..c254df4b5b 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", "codev.json")).json(), + Bun.file(path.join(home, ".config", "codev", "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", "codev.json")).json(), + Bun.file(path.join(home, ".config", "codev", "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 8a3a658443..c017b0c915 100644 --- a/packages/opencode/test/cli/tui/plugin-loader.test.ts +++ b/packages/opencode/test/cli/tui/plugin-loader.test.ts @@ -168,9 +168,9 @@ async function load(): Promise<Data> { const invalidThemePath = path.join(dir, invalidThemeFile) const globalThemePath = path.join(dir, globalThemeFile) const preloadedThemePath = path.join(dir, preloadedThemeFile) - const localDest = path.join(dir, ".opencode", "themes", localThemeFile) + const localDest = path.join(dir, ".codev", "themes", localThemeFile) const globalDest = path.join(Global.Path.config, "themes", globalThemeFile) - const preloadedDest = path.join(dir, ".opencode", "themes", preloadedThemeFile) + const preloadedDest = path.join(dir, ".codev", "themes", preloadedThemeFile) const fnMarker = path.join(dir, "function-called.txt") const localMarker = path.join(dir, "local-called.json") const invalidMarker = path.join(dir, "invalid-called.json") @@ -549,7 +549,7 @@ export default { .then(() => true) .catch(() => false) const leaked_global_to_local = await fs - .stat(path.join(tmp.path, ".opencode", "themes", tmp.extra.globalThemeFile)) + .stat(path.join(tmp.path, ".codev", "themes", tmp.extra.globalThemeFile)) .then(() => true) .catch(() => false) @@ -1231,7 +1231,7 @@ test("updates installed theme when plugin metadata changes", async () => { const spec = pathToFileURL(pluginPath).href const themeFile = "theme-update.json" const themePath = path.join(dir, themeFile) - const dest = path.join(dir, ".opencode", "themes", themeFile) + const dest = path.join(dir, ".codev", "themes", themeFile) const themeName = themeFile.replace(/\.json$/, "") const configPath = path.join(dir, "tui.json") diff --git a/packages/opencode/test/config/config.test.ts b/packages/opencode/test/config/config.test.ts index 9868e2a0f7..f5dc4596e5 100644 --- a/packages/opencode/test/config/config.test.ts +++ b/packages/opencode/test/config/config.test.ts @@ -202,7 +202,7 @@ const withConfigTree = <A, E, R>( [ input.global ? writeConfigEffect(global, schemaConfig(input.global)) : undefined, input.project ? writeConfigEffect(directory, schemaConfig(input.project)) : undefined, - input.local ? writeConfigEffect(path.join(directory, ".opencode"), schemaConfig(input.local)) : undefined, + input.local ? writeConfigEffect(path.join(directory, ".codev"), schemaConfig(input.local)) : undefined, ].filter((effect): effect is Effect.Effect<void, FSUtil.Error, FSUtil.Service> => effect !== undefined), { concurrency: "unbounded" }, ) @@ -744,11 +744,11 @@ it.instance("accepts the deprecated reference field", () => }), ) -it.instance("loads config from .opencode directory", () => +it.instance("loads config from .codev directory", () => Effect.gen(function* () { const test = yield* TestInstance yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "agent", "test.md"), + path.join(test.directory, ".codev", "agent", "test.md"), `--- model: test/model --- @@ -770,7 +770,7 @@ it.instance("agent markdown permission config preserves user key order", () => Effect.gen(function* () { const test = yield* TestInstance yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "agent", "ordered.md"), + path.join(test.directory, ".codev", "agent", "ordered.md"), `--- permission: bash: allow @@ -785,11 +785,11 @@ Ordered permissions`, }), ) -it.instance("loads agents from .opencode/agents (plural)", () => +it.instance("loads agents from .codev/agents (plural)", () => Effect.gen(function* () { const test = yield* TestInstance yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "agents", "helper.md"), + path.join(test.directory, ".codev", "agents", "helper.md"), `--- model: test/model mode: subagent @@ -798,7 +798,7 @@ Helper agent prompt`, ) yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "agents", "nested", "child.md"), + path.join(test.directory, ".codev", "agents", "nested", "child.md"), `--- model: test/model mode: subagent @@ -824,11 +824,11 @@ Nested agent prompt`, }), ) -it.instance("loads commands from .opencode/command (singular)", () => +it.instance("loads commands from .codev/command (singular)", () => Effect.gen(function* () { const test = yield* TestInstance yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "command", "hello.md"), + path.join(test.directory, ".codev", "command", "hello.md"), `--- description: Test command --- @@ -836,7 +836,7 @@ Hello from singular command`, ) yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "command", "nested", "child.md"), + path.join(test.directory, ".codev", "command", "nested", "child.md"), `--- description: Nested command --- @@ -857,11 +857,11 @@ Nested command template`, }), ) -it.instance("loads commands from .opencode/commands (plural)", () => +it.instance("loads commands from .codev/commands (plural)", () => Effect.gen(function* () { const test = yield* TestInstance yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "commands", "hello.md"), + path.join(test.directory, ".codev", "commands", "hello.md"), `--- description: Test command --- @@ -869,7 +869,7 @@ Hello from plural commands`, ) yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "commands", "nested", "child.md"), + path.join(test.directory, ".codev", "commands", "nested", "child.md"), `--- description: Nested command --- @@ -1041,7 +1041,7 @@ it.instance("does not error when only custom agent is a subagent", () => Effect.gen(function* () { const test = yield* TestInstance yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "agent", "helper.md"), + path.join(test.directory, ".codev", "agent", "helper.md"), `--- model: test/model mode: subagent @@ -1448,7 +1448,7 @@ it.instance("MCP config deep merges preserving base config properties", () => }), ) -it.instance("local .opencode config can override MCP from project config", () => +it.instance("local .codev config can override MCP from project config", () => Effect.gen(function* () { const test = yield* TestInstance yield* writeConfigEffect(test.directory, { @@ -1461,9 +1461,9 @@ it.instance("local .opencode config can override MCP from project config", () => }, }, }) - yield* FSUtil.use.ensureDir(path.join(test.directory, ".opencode")) + yield* FSUtil.use.ensureDir(path.join(test.directory, ".codev")) yield* writeConfigEffect( - path.join(test.directory, ".opencode"), + path.join(test.directory, ".codev"), { $schema: "https://opencode.ai/config.json", mcp: { @@ -1769,7 +1769,7 @@ describe("deduplicatePluginOrigins", () => { }) test("keeps path plugins separate from package plugins", () => { - const plugins = ["oh-my-opencode@2.4.3", "file:///project/.opencode/plugin/oh-my-opencode.js"] + const plugins = ["oh-my-opencode@2.4.3", "file:///project/.codev/plugin/oh-my-opencode.js"] const result = dedupe(plugins) @@ -1777,11 +1777,11 @@ describe("deduplicatePluginOrigins", () => { }) test("deduplicates direct path plugins by exact spec", () => { - const plugins = ["file:///project/.opencode/plugin/demo.ts", "file:///project/.opencode/plugin/demo.ts"] + const plugins = ["file:///project/.codev/plugin/demo.ts", "file:///project/.codev/plugin/demo.ts"] const result = dedupe(plugins) - expect(result).toEqual(["file:///project/.opencode/plugin/demo.ts"]) + expect(result).toEqual(["file:///project/.codev/plugin/demo.ts"]) }) test("preserves order of remaining plugins", () => { @@ -1798,7 +1798,7 @@ describe("deduplicatePluginOrigins", () => { Effect.gen(function* () { const test = yield* TestInstance yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "plugin", "my-plugin.js"), + path.join(test.directory, ".codev", "plugin", "my-plugin.js"), "export default {}", ) @@ -1826,14 +1826,14 @@ describe("OPENCODE_DISABLE_PROJECT_CONFIG", () => { { config: { model: "project/model", username: "project-user" } }, ) - it.instance("skips project .opencode/ directories when flag is set", () => + it.instance("skips project .codev/ directories when flag is set", () => withProcessEnv( "OPENCODE_DISABLE_PROJECT_CONFIG", "true", Effect.gen(function* () { const test = yield* TestInstance yield* FSUtil.use.writeWithDirs( - path.join(test.directory, ".opencode", "command", "test-cmd.md"), + path.join(test.directory, ".codev", "command", "test-cmd.md"), "# Test Command\nThis is a test command.", ) const directories = yield* Config.use.directories() diff --git a/packages/opencode/test/config/entry-name.test.ts b/packages/opencode/test/config/entry-name.test.ts index bb29ef63ad..9127496f82 100644 --- a/packages/opencode/test/config/entry-name.test.ts +++ b/packages/opencode/test/config/entry-name.test.ts @@ -37,20 +37,20 @@ describe("configEntryNameFromPath", () => { // Regression for #25713: a username (or any parent segment) containing // `agent` or `agents` used to win the substring match before the real // `agents/` directory could match, leaking the entire intervening path into - // the agent key (e.g. `.config/opencode/agents/build`). Anchoring at the + // the agent key (e.g. `.config/codev/agents/build`). Anchoring at the // caller via `path.relative(dir, item)` makes this impossible — the relative // path is always rooted at `agent/` or `agents/`. test("regression #25713: caller passes relative path; parent /agent/ segment is irrelevant", () => { - const dir = "/home/agent/.config/opencode" - const item = "/home/agent/.config/opencode/agents/build.md" + const dir = "/home/agent/.config/codev" + const item = "/home/agent/.config/codev/agents/build.md" const relative = posix.relative(dir, item) expect(relative).toBe("agents/build.md") expect(configEntryNameFromPath(relative, AGENT_PREFIXES)).toBe("build") }) test("regression #25713: parent /agents/ segment is irrelevant", () => { - const dir = "/srv/agents/team/.config/opencode" - const item = "/srv/agents/team/.config/opencode/agents/build.md" + const dir = "/srv/agents/team/.config/codev" + const item = "/srv/agents/team/.config/codev/agents/build.md" const relative = posix.relative(dir, item) expect(configEntryNameFromPath(relative, AGENT_PREFIXES)).toBe("build") }) diff --git a/packages/opencode/test/config/tui.test.ts b/packages/opencode/test/config/tui.test.ts index 21352422e6..bea6551180 100644 --- a/packages/opencode/test/config/tui.test.ts +++ b/packages/opencode/test/config/tui.test.ts @@ -88,7 +88,7 @@ it.instance("keeps server and tui plugin merge semantics aligned", () => Effect.gen(function* () { const fs = yield* FSUtil.Service const test = yield* TestInstance - const local = path.join(test.directory, ".opencode") + const local = path.join(test.directory, ".codev") yield* fs.makeDirectory(local, { recursive: true }) yield* fs.writeJson(path.join(Global.Path.config, "codev.json"), { @@ -130,7 +130,7 @@ it.instance("loads tui config with the same precedence order as server config pa yield* fs.writeJson(path.join(Global.Path.config, "tui.json"), { theme: "global" }) yield* fs.writeJson(path.join(test.directory, "tui.json"), { theme: "project" }) yield* fs.writeWithDirs( - path.join(test.directory, ".opencode", "tui.json"), + path.join(test.directory, ".codev", "tui.json"), JSON.stringify({ theme: "local", diff_style: "stacked" }, null, 2), ) @@ -723,13 +723,13 @@ it.instance("applies file substitutions when first identical token is in a comme ), ) -it.instance("loads .opencode/tui.json", () => +it.instance("loads .codev/tui.json", () => withCleanState( Effect.gen(function* () { const fs = yield* FSUtil.Service const test = yield* TestInstance yield* fs.writeWithDirs( - path.join(test.directory, ".opencode", "tui.json"), + path.join(test.directory, ".codev", "tui.json"), JSON.stringify({ diff_style: "stacked" }, null, 2), ) @@ -860,7 +860,7 @@ it.instance("silently skips malformed tui.json - load failures degrade to {}", ( const fs = yield* FSUtil.Service const test = yield* TestInstance yield* fs.writeFileString(path.join(test.directory, "tui.json"), '{ "theme": "broken",') - yield* fs.writeWithDirs(path.join(test.directory, ".opencode", "tui.json"), JSON.stringify({ theme: "fallback" })) + yield* fs.writeWithDirs(path.join(test.directory, ".codev", "tui.json"), JSON.stringify({ theme: "fallback" })) const config = yield* getTuiConfig(test.directory) expect(config.theme).toBe("fallback") @@ -874,7 +874,7 @@ it.instance("silently skips non-ENOENT read failures (e.g. tui.json is a directo const fs = yield* FSUtil.Service const test = yield* TestInstance yield* fs.makeDirectory(path.join(test.directory, "tui.json"), { recursive: true }) - yield* fs.writeWithDirs(path.join(test.directory, ".opencode", "tui.json"), JSON.stringify({ theme: "fallback" })) + yield* fs.writeWithDirs(path.join(test.directory, ".codev", "tui.json"), JSON.stringify({ theme: "fallback" })) const config = yield* getTuiConfig(test.directory) expect(config.theme).toBe("fallback") diff --git a/packages/opencode/test/plugin/auth-override.test.ts b/packages/opencode/test/plugin/auth-override.test.ts index b49b02c51b..871ccfe686 100644 --- a/packages/opencode/test/plugin/auth-override.test.ts +++ b/packages/opencode/test/plugin/auth-override.test.ts @@ -44,7 +44,7 @@ describe("plugin.auth-override", () => { Effect.gen(function* () { const tmp = yield* TestInstance const fs = yield* FSUtil.Service - const pluginDir = path.join(tmp.directory, ".opencode", "plugin") + const pluginDir = path.join(tmp.directory, ".codev", "plugin") yield* fs.writeWithDirs( path.join(pluginDir, "custom-copilot-auth.ts"), diff --git a/packages/opencode/test/plugin/install-concurrency.test.ts b/packages/opencode/test/plugin/install-concurrency.test.ts index 402137954a..d9ffeb0f96 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", "codev.jsonc")) + const cfg = await read(path.join(tmp.path, ".codev", "codev.jsonc")) expectPlugins(cfg.plugin, all) }, 25_000) @@ -105,8 +105,8 @@ 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", "codev.jsonc")) - const tui = await read(path.join(tmp.path, ".opencode", "tui.jsonc")) + const server = await read(path.join(tmp.path, ".codev", "codev.jsonc")) + const tui = await read(path.join(tmp.path, ".codev", "tui.jsonc")) expectPlugins(server.plugin, all) expectPlugins(tui.plugin, all) }, 25_000) @@ -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", "codev.json") + const cfg = path.join(tmp.path, ".codev", "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", "codev.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "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 8f94dd39d6..ab09a47d42 100644 --- a/packages/opencode/test/plugin/install.test.ts +++ b/packages/opencode/test/plugin/install.test.ts @@ -122,8 +122,8 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(true) - const server = await read(path.join(tmp.path, ".opencode", "codev.jsonc")) - const tui = await read(path.join(tmp.path, ".opencode", "tui.jsonc")) + const server = await read(path.join(tmp.path, ".codev", "codev.jsonc")) + const tui = await read(path.join(tmp.path, ".codev", "tui.jsonc")) expect(server.plugin).toEqual(["acme@1.2.3"]) expect(tui.plugin).toEqual(["acme@1.2.3"]) }) @@ -144,8 +144,8 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).toBe(true) - const server = await read(path.join(tmp.path, ".opencode", "codev.jsonc")) - const tui = await read(path.join(tmp.path, ".opencode", "tui.jsonc")) + const server = await read(path.join(tmp.path, ".codev", "codev.jsonc")) + const tui = await read(path.join(tmp.path, ".codev", "tui.jsonc")) expect(server.plugin).toEqual([["acme@1.2.3", { custom: true, other: false }]]) expect(tui.plugin).toEqual([["acme@1.2.3", { compact: true }]]) }) @@ -153,7 +153,7 @@ describe("plugin.install.task", () => { test("preserves JSONC comments when adding plugins to server and tui config", async () => { await using tmp = await tmpdir() const target = await plugin(tmp.path, ["server", "tui"]) - const cfg = path.join(tmp.path, ".opencode") + const cfg = path.join(tmp.path, ".codev") const server = path.join(cfg, "codev.jsonc") const tui = path.join(cfg, "tui.jsonc") await fs.mkdir(cfg, { recursive: true }) @@ -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", "codev.jsonc") + const cfg = path.join(tmp.path, ".codev", "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", "codev.jsonc")) + const server = await read(path.join(tmp.path, ".codev", "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", "codev.json") + const cfg = path.join(tmp.path, ".codev", "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", "codev.json") + const cfg = path.join(tmp.path, ".codev", "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", "codev.json") + const cfg = path.join(tmp.path, ".codev", "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", "codev.json") + const cfg = path.join(tmp.path, ".codev", "codev.json") await fs.mkdir(path.dirname(cfg), { recursive: true }) await Bun.write( cfg, @@ -367,7 +367,7 @@ describe("plugin.install.task", () => { expect(ok).toBe(true) expect(await Filesystem.exists(path.join(global, "codev.jsonc"))).toBe(true) - expect(await Filesystem.exists(path.join(tmp.path, ".opencode", "codev.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "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", "codev.jsonc"))).toBe(true) - expect(await Filesystem.exists(path.join(worktree, ".opencode", "codev.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(directory, ".codev", "codev.jsonc"))).toBe(true) + expect(await Filesystem.exists(path.join(worktree, ".codev", "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", "codev.jsonc"))).toBe(true) + expect(await Filesystem.exists(path.join(directory, ".codev", "codev.jsonc"))).toBe(true) }) test("writes tui local scope under directory when worktree is root slash", async () => { @@ -421,7 +421,7 @@ describe("plugin.install.task", () => { const ok = await run(ctxRoot(directory)) expect(ok).toBe(true) - expect(await Filesystem.exists(path.join(directory, ".opencode", "tui.jsonc"))).toBe(true) + expect(await Filesystem.exists(path.join(directory, ".codev", "tui.jsonc"))).toBe(true) }) test("writes only tui config for tui-only plugins", async () => { @@ -436,8 +436,8 @@ 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", "codev.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "tui.jsonc"))).toBe(true) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "codev.jsonc"))).toBe(false) }) test("writes tui config for oc-themes-only packages", async () => { @@ -454,10 +454,10 @@ 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", "codev.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "tui.jsonc"))).toBe(true) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "codev.jsonc"))).toBe(false) - const tui = await read(path.join(tmp.path, ".opencode", "tui.jsonc")) + const tui = await read(path.join(tmp.path, ".codev", "tui.jsonc")) expect(tui.plugin).toEqual(["acme@1.2.3"]) }) @@ -473,15 +473,15 @@ 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", "codev.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "tui.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "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", "codev.json") - const tui = path.join(tmp.path, ".opencode", "tui.json") + const server = path.join(tmp.path, ".codev", "codev.json") + const tui = path.join(tmp.path, ".codev", "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)) await Bun.write(tui, JSON.stringify({ plugin: [["acme@1.0.0", { mode: "safe" }], "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", "codev.jsonc") + const cfg = path.join(tmp.path, ".codev", "codev.jsonc") await fs.mkdir(path.dirname(cfg), { recursive: true }) const bad = '{"plugin": ["acme@1.0.0",}' await Bun.write(cfg, bad) @@ -534,8 +534,8 @@ describe("plugin.install.task", () => { const ok = await run(ctx(tmp.path)) expect(ok).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) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "codev.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "tui.jsonc"))).toBe(false) }) test("returns false when manifest cannot be read", async () => { @@ -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", "codev.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "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", "codev.jsonc"))).toBe(false) + expect(await Filesystem.exists(path.join(tmp.path, ".codev", "codev.jsonc"))).toBe(false) }) }) diff --git a/packages/opencode/test/provider/provider.test.ts b/packages/opencode/test/provider/provider.test.ts index 18ec8f9fbe..44d8b249a7 100644 --- a/packages/opencode/test/provider/provider.test.ts +++ b/packages/opencode/test/provider/provider.test.ts @@ -1771,7 +1771,7 @@ const provideMultiInstance = <A, E, R>(eff: Effect.Effect<A, E, R>) => it.effect("plugin config providers persist after instance dispose", () => Effect.gen(function* () { const dir = yield* tmpdirScoped() - const configDir = path.join(dir, ".opencode") + const configDir = path.join(dir, ".codev") const root = path.join(configDir, "plugin") yield* Effect.promise(() => mkdir(root, { recursive: true })) yield* Effect.promise(() => markPluginDependenciesReady(configDir)) @@ -1828,7 +1828,7 @@ it.instance( "plugin config enabled and disabled providers are honored", Effect.gen(function* () { const instance = yield* TestInstance - const configDir = path.join(instance.directory, ".opencode") + const configDir = path.join(instance.directory, ".codev") const root = path.join(configDir, "plugin") yield* Effect.promise(() => mkdir(root, { recursive: true })) yield* Effect.promise(() => markPluginDependenciesReady(configDir)) diff --git a/packages/opencode/test/provider/transform.test.ts b/packages/opencode/test/provider/transform.test.ts index e69dab70f6..e98c6b9eb6 100644 --- a/packages/opencode/test/provider/transform.test.ts +++ b/packages/opencode/test/provider/transform.test.ts @@ -1806,7 +1806,7 @@ describe("ProviderTransform.message - surrogate sanitization", () => { content: [ { type: "text", text: text("assistant text") }, { type: "reasoning", text: text("assistant reasoning") }, - { type: "tool-call", toolCallId: "call-1", toolName: "Read", input: { filePath: ".opencode/tool/emoji.ts" } }, + { type: "tool-call", toolCallId: "call-1", toolName: "Read", input: { filePath: ".codev/tool/emoji.ts" } }, { type: "tool-result", toolCallId: "call-2", diff --git a/packages/opencode/test/server/httpapi-exercise/environment.ts b/packages/opencode/test/server/httpapi-exercise/environment.ts index 5279f4a4e2..2dc09da6d4 100644 --- a/packages/opencode/test/server/httpapi-exercise/environment.ts +++ b/packages/opencode/test/server/httpapi-exercise/environment.ts @@ -12,8 +12,8 @@ process.env.XDG_CONFIG_HOME = path.join(exerciseGlobalRoot, "config") process.env.XDG_STATE_HOME = path.join(exerciseGlobalRoot, "state") process.env.XDG_CACHE_HOME = path.join(exerciseGlobalRoot, "cache") process.env.OPENCODE_DISABLE_SHARE = "true" -export const exerciseConfigDirectory = path.join(exerciseGlobalRoot, "config", "codev-code") -export const exerciseDataDirectory = path.join(exerciseGlobalRoot, "data", "codev-code") +export const exerciseConfigDirectory = path.join(exerciseGlobalRoot, "config", "codev") +export const exerciseDataDirectory = path.join(exerciseGlobalRoot, "data", "codev") // Fork: sharing defaults to disabled, which would 500 the share/unshare // scenarios. Opt back in via codev.json (global config.json support was diff --git a/packages/opencode/test/server/httpapi-provider.test.ts b/packages/opencode/test/server/httpapi-provider.test.ts index 625ca1896b..2cbd9c5f9d 100644 --- a/packages/opencode/test/server/httpapi-provider.test.ts +++ b/packages/opencode/test/server/httpapi-provider.test.ts @@ -106,10 +106,10 @@ function requestCallback(input: { providerID: string; method: number; headers: H function writeProviderAuthPlugin(dir: string) { return Effect.gen(function* () { const fs = yield* FSUtil.Service - yield* Effect.promise(() => markPluginDependenciesReady(path.join(dir, ".opencode"))) + yield* Effect.promise(() => markPluginDependenciesReady(path.join(dir, ".codev"))) yield* fs.writeWithDirs( - path.join(dir, ".opencode", "plugin", "provider-oauth-parity.ts"), + path.join(dir, ".codev", "plugin", "provider-oauth-parity.ts"), [ "export default {", ' id: "test.provider-oauth-parity",', @@ -141,10 +141,10 @@ function writeProviderAuthPlugin(dir: string) { function writeProviderAuthValidationPlugin(dir: string) { return Effect.gen(function* () { const fs = yield* FSUtil.Service - yield* Effect.promise(() => markPluginDependenciesReady(path.join(dir, ".opencode"))) + yield* Effect.promise(() => markPluginDependenciesReady(path.join(dir, ".codev"))) yield* fs.writeWithDirs( - path.join(dir, ".opencode", "plugin", "provider-oauth-validation.ts"), + path.join(dir, ".codev", "plugin", "provider-oauth-validation.ts"), [ "export default {", ' id: "test.provider-oauth-validation",', @@ -183,10 +183,10 @@ function writeProviderAuthValidationPlugin(dir: string) { function writeFunctionOptionsPlugin(dir: string) { return Effect.gen(function* () { const fs = yield* FSUtil.Service - yield* Effect.promise(() => markPluginDependenciesReady(path.join(dir, ".opencode"))) + yield* Effect.promise(() => markPluginDependenciesReady(path.join(dir, ".codev"))) yield* fs.writeWithDirs( - path.join(dir, ".opencode", "plugin", "provider-function-options.ts"), + path.join(dir, ".codev", "plugin", "provider-function-options.ts"), [ "export default {", ' id: "test.provider-function-options",', @@ -215,10 +215,10 @@ function writeFunctionOptionsPlugin(dir: string) { function writeProviderModelsMutationPlugin(dir: string) { return Effect.gen(function* () { const fs = yield* FSUtil.Service - yield* Effect.promise(() => markPluginDependenciesReady(path.join(dir, ".opencode"))) + yield* Effect.promise(() => markPluginDependenciesReady(path.join(dir, ".codev"))) yield* fs.writeWithDirs( - path.join(dir, ".opencode", "plugin", "provider-models-mutation.ts"), + path.join(dir, ".codev", "plugin", "provider-models-mutation.ts"), [ "export default {", ' id: "test.provider-models-mutation",', diff --git a/packages/opencode/test/server/httpapi-sdk.test.ts b/packages/opencode/test/server/httpapi-sdk.test.ts index e03f4ecb03..1af1687646 100644 --- a/packages/opencode/test/server/httpapi-sdk.test.ts +++ b/packages/opencode/test/server/httpapi-sdk.test.ts @@ -285,7 +285,7 @@ function writeStandardFiles(dir: string) { function writeProjectSkill(dir: string) { return FSUtil.Service.use((fs) => fs.writeWithDirs( - path.join(dir, ".opencode", "skills", "project-rest-skill", "SKILL.md"), + path.join(dir, ".codev", "skills", "project-rest-skill", "SKILL.md"), `--- name: project-rest-skill description: A project skill visible to REST API prompts. diff --git a/packages/opencode/test/skill/skill.test.ts b/packages/opencode/test/skill/skill.test.ts index f365b63f0d..a2700a9a21 100644 --- a/packages/opencode/test/skill/skill.test.ts +++ b/packages/opencode/test/skill/skill.test.ts @@ -91,13 +91,13 @@ describe("skill", () => { }), ) - it.live("discovers skills from .opencode/skill/ directory", () => + it.live("discovers skills from .codev/skill/ directory", () => provideTmpdirInstance( (dir) => Effect.gen(function* () { yield* Effect.promise(() => Bun.write( - path.join(dir, ".opencode", "skill", "test-skill", "SKILL.md"), + path.join(dir, ".codev", "skill", "test-skill", "SKILL.md"), `--- name: test-skill description: A test skill for verification. @@ -130,7 +130,7 @@ Instructions here. Effect.gen(function* () { yield* Effect.promise(() => Bun.write( - path.join(dir, ".opencode", "skill", "dir-skill", "SKILL.md"), + path.join(dir, ".codev", "skill", "dir-skill", "SKILL.md"), `--- name: dir-skill description: Skill for dirs test. @@ -143,7 +143,7 @@ description: Skill for dirs test. const skill = yield* Skill.Service const dirs = yield* skill.dirs() - expect(dirs).toContain(path.join(dir, ".opencode", "skill", "dir-skill")) + expect(dirs).toContain(path.join(dir, ".codev", "skill", "dir-skill")) expect(dirs.length).toBe(1) }), ), @@ -151,14 +151,14 @@ description: Skill for dirs test. ), ) - it.live("discovers multiple skills from .opencode/skill/ directory", () => + it.live("discovers multiple skills from .codev/skill/ directory", () => provideTmpdirInstance( (dir) => Effect.gen(function* () { yield* Effect.promise(() => Promise.all([ Bun.write( - path.join(dir, ".opencode", "skill", "skill-one", "SKILL.md"), + path.join(dir, ".codev", "skill", "skill-one", "SKILL.md"), `--- name: skill-one description: First test skill. @@ -168,7 +168,7 @@ description: First test skill. `, ), Bun.write( - path.join(dir, ".opencode", "skill", "skill-two", "SKILL.md"), + path.join(dir, ".codev", "skill", "skill-two", "SKILL.md"), `--- name: skill-two description: Second test skill. @@ -196,7 +196,7 @@ description: Second test skill. Effect.gen(function* () { yield* Effect.promise(() => Bun.write( - path.join(dir, ".opencode", "skill", "no-frontmatter", "SKILL.md"), + path.join(dir, ".codev", "skill", "no-frontmatter", "SKILL.md"), `# No Frontmatter Just some content without YAML frontmatter. @@ -217,7 +217,7 @@ Just some content without YAML frontmatter. Effect.gen(function* () { yield* Effect.promise(() => Bun.write( - path.join(dir, ".opencode", "skill", "manual-skill", "SKILL.md"), + path.join(dir, ".codev", "skill", "manual-skill", "SKILL.md"), `--- name: manual-skill --- @@ -507,10 +507,10 @@ description: A skill in the .agents/skills directory. `, ), Bun.write( - path.join(dir, ".opencode", "skill", "opencode-skill", "SKILL.md"), + path.join(dir, ".codev", "skill", "opencode-skill", "SKILL.md"), `--- name: opencode-skill -description: A skill in the .opencode/skill directory. +description: A skill in the .codev/skill directory. --- # OpenCode Skill @@ -554,20 +554,20 @@ description: A skill in the .agents/skills directory. `, ), Bun.write( - path.join(dir, ".opencode", "skill", "agent-skill", "SKILL.md"), + path.join(dir, ".codev", "skill", "agent-skill", "SKILL.md"), `--- name: opencode-skill -description: A skill in the .opencode/skill directory. +description: A skill in the .codev/skill directory. --- # OpenCode Skill `, ), Bun.write( - path.join(dir, ".opencode", "skills", "agent-skill", "SKILL.md"), + path.join(dir, ".codev", "skills", "agent-skill", "SKILL.md"), `--- name: opencode-skill -description: A skill in the .opencode/skills directory. +description: A skill in the .codev/skills directory. --- # OpenCode Skill diff --git a/packages/opencode/test/tool/registry.test.ts b/packages/opencode/test/tool/registry.test.ts index c8c5fac595..cb7131c935 100644 --- a/packages/opencode/test/tool/registry.test.ts +++ b/packages/opencode/test/tool/registry.test.ts @@ -23,7 +23,7 @@ import { MCP } from "@/mcp" import type { Tool as MCPToolDef } from "@modelcontextprotocol/sdk/types.js" const configLayer = TestConfig.layer({ - directories: () => InstanceState.directory.pipe(Effect.map((dir) => [path.join(dir, ".opencode")])), + directories: () => InstanceState.directory.pipe(Effect.map((dir) => [path.join(dir, ".codev")])), }) // Fake Plugin.Service that returns a single plugin whose `tool` map contains @@ -167,10 +167,10 @@ describe("tool.registry", () => { }), ) - it.instance("loads tools from .opencode/tool (singular)", () => + it.instance("loads tools from .codev/tool (singular)", () => Effect.gen(function* () { const test = yield* TestInstance - const opencode = path.join(test.directory, ".opencode") + const opencode = path.join(test.directory, ".codev") const tool = path.join(opencode, "tool") yield* Effect.promise(() => fs.mkdir(tool, { recursive: true })) yield* Effect.promise(() => @@ -194,10 +194,10 @@ describe("tool.registry", () => { }), ) - it.instance("ignores non-tool exports in .opencode/tool files", () => + it.instance("ignores non-tool exports in .codev/tool files", () => Effect.gen(function* () { const test = yield* TestInstance - const tool = path.join(test.directory, ".opencode", "tool") + const tool = path.join(test.directory, ".codev", "tool") yield* Effect.promise(() => fs.mkdir(tool, { recursive: true })) yield* Effect.promise(() => Bun.write( @@ -230,7 +230,7 @@ describe("tool.registry", () => { it.instance("tolerates a custom tool exporting null/undefined args (no-args fallback)", () => Effect.gen(function* () { const test = yield* TestInstance - const tool = path.join(test.directory, ".opencode", "tool") + const tool = path.join(test.directory, ".codev", "tool") yield* Effect.promise(() => fs.mkdir(tool, { recursive: true })) yield* Effect.promise(() => Bun.write( @@ -272,10 +272,10 @@ describe("tool.registry", () => { }), ) - it.instance("loads tools from .opencode/tools (plural)", () => + it.instance("loads tools from .codev/tools (plural)", () => Effect.gen(function* () { const test = yield* TestInstance - const opencode = path.join(test.directory, ".opencode") + const opencode = path.join(test.directory, ".codev") const tools = path.join(opencode, "tools") yield* Effect.promise(() => fs.mkdir(tools, { recursive: true })) yield* Effect.promise(() => @@ -302,7 +302,7 @@ describe("tool.registry", () => { it.instance("loads Zod-schema custom tools with JSON Schema and validation", () => Effect.gen(function* () { const test = yield* TestInstance - const customTools = path.join(test.directory, ".opencode", "tools") + const customTools = path.join(test.directory, ".codev", "tools") const pluginTool = pathToFileURL(path.resolve(import.meta.dir, "../../../plugin/src/tool.ts")).href yield* Effect.promise(() => fs.mkdir(customTools, { recursive: true })) yield* Effect.promise(() => @@ -355,7 +355,7 @@ describe("tool.registry", () => { () => Effect.gen(function* () { const test = yield* TestInstance - const opencode = path.join(test.directory, ".opencode") + const opencode = path.join(test.directory, ".codev") const customTools = path.join(opencode, "tools") const plugin = path.join(opencode, "node_modules", "@opencode-ai", "plugin") yield* Effect.promise(() => fs.mkdir(path.join(plugin, "dist"), { recursive: true })) @@ -420,7 +420,7 @@ describe("tool.registry", () => { it.instance("preserves attachments from structured custom tool results", () => Effect.gen(function* () { const test = yield* TestInstance - const customTools = path.join(test.directory, ".opencode", "tools") + const customTools = path.join(test.directory, ".codev", "tools") const pluginTool = pathToFileURL(path.resolve(import.meta.dir, "../../../plugin/src/tool.ts")).href yield* Effect.promise(() => fs.mkdir(customTools, { recursive: true })) yield* Effect.promise(() => @@ -465,7 +465,7 @@ describe("tool.registry", () => { it.instance("loads legacy JSON-schema-shaped custom tools with wire schema", () => Effect.gen(function* () { const test = yield* TestInstance - const tools = path.join(test.directory, ".opencode", "tools") + const tools = path.join(test.directory, ".codev", "tools") yield* Effect.promise(() => fs.mkdir(tools, { recursive: true })) yield* Effect.promise(() => Bun.write( @@ -497,7 +497,7 @@ describe("tool.registry", () => { it.instance("loads tools with external dependencies without crashing", () => Effect.gen(function* () { const test = yield* TestInstance - const opencode = path.join(test.directory, ".opencode") + const opencode = path.join(test.directory, ".codev") const tools = path.join(opencode, "tools") yield* Effect.promise(() => fs.mkdir(tools, { recursive: true })) yield* Effect.promise(() => diff --git a/packages/opencode/test/tool/skill.test.ts b/packages/opencode/test/tool/skill.test.ts index 1c25b253cd..97244c0ba8 100644 --- a/packages/opencode/test/tool/skill.test.ts +++ b/packages/opencode/test/tool/skill.test.ts @@ -33,7 +33,7 @@ describe("tool.skill", () => { it.instance("execute returns skill content block with files", () => Effect.gen(function* () { const dir = (yield* TestInstance).directory - const skill = path.join(dir, ".opencode", "skill", "tool-skill") + const skill = path.join(dir, ".codev", "skill", "tool-skill") yield* Effect.promise(() => Bun.write( path.join(skill, "SKILL.md"), diff --git a/packages/session-ui/src/components/markdown-inline-code-kind.test.ts b/packages/session-ui/src/components/markdown-inline-code-kind.test.ts index 5b7c00855b..2419ad8f1c 100644 --- a/packages/session-ui/src/components/markdown-inline-code-kind.test.ts +++ b/packages/session-ui/src/components/markdown-inline-code-kind.test.ts @@ -32,7 +32,7 @@ describe("inlineCodeKind", () => { expect(inlineCodeKind(`terraform.tfvars`)).toBe("path") expect(inlineCodeKind(`pnpm-lock.yaml`)).toBe("path") expect(inlineCodeKind(`packages/desktop-electron`)).toBe("path") - expect(inlineCodeKind(`~/.config/opencode`)).toBe("path") + expect(inlineCodeKind(`~/.config/codev`)).toBe("path") expect(inlineCodeKind(`@opencode-ai/app`)).toBe("path") expect(inlineCodeKind(`session/status`)).toBe("path") }) diff --git a/packages/tui/src/component/dialog-configure.tsx b/packages/tui/src/component/dialog-configure.tsx index 74bb9fe719..985f28c751 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 codev.json provider block the hub writes. The SSO session +// write the same opencode.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 79ec58d0c0..791fd873d4 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: () => ( <text fg={theme.textMuted}> - This only stores a credential. Configure the provider in codev.json to use it. + This only stores a credential. Configure the provider in opencode.json to use it. </text> ), }) @@ -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 codev.json to use it.`, + message: `Saved credential for ${props.providerID}. Configure it in opencode.json to use it.`, }) dialog.clear() return diff --git a/packages/tui/src/context/theme.tsx b/packages/tui/src/context/theme.tsx index 909dd69ac2..53ccc53c34 100644 --- a/packages/tui/src/context/theme.tsx +++ b/packages/tui/src/context/theme.tsx @@ -38,7 +38,7 @@ const themeSource: ThemeSource = { async discover() { const directories = [Global.Path.config] for (let current = process.cwd(); ; current = path.dirname(current)) { - directories.push(path.join(current, ".opencode")) + directories.push(path.join(current, ".codev")) if (path.dirname(current) === current) break } return discoverThemes(directories) diff --git a/packages/tui/src/feature-plugins/home/tips-view.tsx b/packages/tui/src/feature-plugins/home/tips-view.tsx index e87863f7a1..b61d4f88c3 100644 --- a/packages/tui/src/feature-plugins/home/tips-view.tsx +++ b/packages/tui/src/feature-plugins/home/tips-view.tsx @@ -212,16 +212,16 @@ const TIPS: Tip[] = [ return `Use ${items.map(shortcutText).join(" / ")} for parent/child sessions` }, "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", + "Place TUI settings in {highlight}~/.config/codev/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", "Override any keybind in {highlight}tui.json{/highlight} via the {highlight}keybinds{/highlight} section", "Set any keybind to {highlight}none{/highlight} to disable it completely", "Configure local or remote MCP servers in the {highlight}mcp{/highlight} config section", - "Add {highlight}.md{/highlight} files to {highlight}.opencode/commands/{/highlight} for reusable prompts", + "Add {highlight}.md{/highlight} files to {highlight}.codev/commands/{/highlight} for reusable prompts", "Use {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, {highlight}$2{/highlight} in custom commands for dynamic input", "Use backticks to inject shell output (e.g., {highlight}`git status`{/highlight})", - "Add {highlight}.md{/highlight} files to {highlight}.opencode/agents/{/highlight} for specialized AI personas", + "Add {highlight}.md{/highlight} files to {highlight}.codev/agents/{/highlight} for specialized AI personas", "Configure per-agent permissions for {highlight}edit{/highlight}, {highlight}bash{/highlight}, and {highlight}webfetch{/highlight} tools", 'Use patterns like {highlight}"git *": "allow"{/highlight} for granular bash permissions', 'Set {highlight}"rm -rf *": "deny"{/highlight} to block destructive commands', @@ -230,9 +230,9 @@ const TIPS: Tip[] = [ 'Set {highlight}"formatter": false{/highlight} to disable inherited formatters', "Define custom formatter commands with file extensions in config", 'Set {highlight}"lsp": true{/highlight} to enable built-in LSP code analysis', - "Create {highlight}.ts{/highlight} files in {highlight}.opencode/tools/{/highlight} to define new LLM tools", + "Create {highlight}.ts{/highlight} files in {highlight}.codev/tools/{/highlight} to define new LLM tools", "Tool definitions can invoke scripts written in Python, Go, etc", - "Add {highlight}.ts{/highlight} files to {highlight}.opencode/plugins/{/highlight} for event hooks", + "Add {highlight}.ts{/highlight} files to {highlight}.codev/plugins/{/highlight} for event hooks", "Use plugins to send OS notifications when sessions complete", "Create a plugin to prevent OpenCode from reading sensitive files", "Use {highlight}codev run{/highlight} for non-interactive scripting", @@ -249,7 +249,7 @@ const TIPS: Tip[] = [ "Comment {highlight}/opencode fix this{/highlight} on issues to auto-create PRs", "Comment {highlight}/oc{/highlight} on PR code lines for targeted code reviews", 'Use {highlight}"theme": "system"{/highlight} to match your terminal\'s colors', - "Create JSON theme files in {highlight}.opencode/themes/{/highlight} directory", + "Create JSON theme files in {highlight}.codev/themes/{/highlight} directory", "Themes support dark/light variants for both modes", "Use numeric xterm color codes 0-255 in custom theme JSON", "Use {highlight}{env:VAR_NAME}{/highlight} for environment variables in config", diff --git a/packages/tui/src/util/error.ts b/packages/tui/src/util/error.ts index b804fe64db..99821ac43d 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 (codev.json) provider/model names", + "Or check your config (opencode.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 1e92278353..1cfbca5014 100644 --- a/packages/web/src/content/docs/agents.mdx +++ b/packages/web/src/content/docs/agents.mdx @@ -189,10 +189,10 @@ Configure agents in your `codev.json` config file: You can also define agents using markdown files. Place them in: -- Global: `~/.config/opencode/agents/` -- Per-project: `.opencode/agents/` +- Global: `~/.config/codev/agents/` +- Per-project: `.codev/agents/` -```markdown title="~/.config/opencode/agents/review.md" +```markdown title="~/.config/codev/agents/review.md" --- description: Reviews code for quality and best practices mode: subagent @@ -482,7 +482,7 @@ You can override these permissions per agent. You can also set permissions in Markdown agents. -```markdown title="~/.config/opencode/agents/review.md" +```markdown title="~/.config/codev/agents/review.md" --- description: Code review without edits mode: subagent @@ -739,7 +739,7 @@ Do you have an agent you'd like to share? [Submit a PR](https://github.com/anoma ### Documentation agent -```markdown title="~/.config/opencode/agents/docs-writer.md" +```markdown title="~/.config/codev/agents/docs-writer.md" --- description: Writes and maintains project documentation mode: subagent @@ -761,7 +761,7 @@ Focus on: ### Security auditor -```markdown title="~/.config/opencode/agents/security-auditor.md" +```markdown title="~/.config/codev/agents/security-auditor.md" --- description: Performs security audits and identifies vulnerabilities mode: subagent diff --git a/packages/web/src/content/docs/cli.mdx b/packages/web/src/content/docs/cli.mdx index 94d9ba3c75..387b57767e 100644 --- a/packages/web/src/content/docs/cli.mdx +++ b/packages/web/src/content/docs/cli.mdx @@ -76,7 +76,7 @@ This command will guide you through creating a new agent with a custom system pr | Flag | Short | Description | | ------------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| <nobr><code>{"--path"}</code></nobr> | | Directory to write the agent file to (defaults to global or `.opencode/agent` based on the prompt) | +| <nobr><code>{"--path"}</code></nobr> | | Directory to write the agent file to (defaults to global or `.codev/agent` based on the prompt) | | <nobr><code>{"--description"}</code></nobr> | | What the agent should do | | <nobr><code>{"--mode"}</code></nobr> | | Agent mode: `all`, `primary`, or `subagent` | | <nobr><code>{"--permissions"}</code></nobr> | | Comma-separated list of permissions to allow (default: all). Available: `bash`, `read`, `edit`, `glob`, `grep`, `webfetch`, `task`, `todowrite`, `websearch`, `lsp`, `skill`. Anything omitted is denied. Alias: `--tools` | diff --git a/packages/web/src/content/docs/commands.mdx b/packages/web/src/content/docs/commands.mdx index dd67dbee43..7167e8d488 100644 --- a/packages/web/src/content/docs/commands.mdx +++ b/packages/web/src/content/docs/commands.mdx @@ -17,9 +17,9 @@ Custom commands are in addition to the built-in commands like `/init`, `/undo`, Create markdown files in the `commands/` directory to define custom commands. -Create `.opencode/commands/test.md`: +Create `.codev/commands/test.md`: -```md title=".opencode/commands/test.md" +```md title=".codev/commands/test.md" --- description: Run tests with coverage agent: build @@ -79,10 +79,10 @@ Now you can run this command in the TUI: You can also define commands using markdown files. Place them in: -- Global: `~/.config/opencode/commands/` -- Per-project: `.opencode/commands/` +- Global: `~/.config/codev/commands/` +- Per-project: `.codev/commands/` -```markdown title="~/.config/opencode/commands/test.md" +```markdown title="~/.config/codev/commands/test.md" --- description: Run tests with coverage agent: build @@ -112,7 +112,7 @@ The prompts for the custom commands support several special placeholders and syn Pass arguments to commands using the `$ARGUMENTS` placeholder. -```md title=".opencode/commands/component.md" +```md title=".codev/commands/component.md" --- description: Create a new component --- @@ -138,7 +138,7 @@ You can also access individual arguments using positional parameters: For example: -```md title=".opencode/commands/create-file.md" +```md title=".codev/commands/create-file.md" --- description: Create a new file with content --- @@ -167,7 +167,7 @@ Use _!`command`_ to inject [bash command](/docs/tui#bash-commands) output into y For example, to create a custom command that analyzes test coverage: -```md title=".opencode/commands/analyze-coverage.md" +```md title=".codev/commands/analyze-coverage.md" --- description: Analyze test coverage --- @@ -180,7 +180,7 @@ Based on these results, suggest improvements to increase coverage. Or to review recent changes: -```md title=".opencode/commands/review-changes.md" +```md title=".codev/commands/review-changes.md" --- description: Review recent changes --- @@ -199,7 +199,7 @@ Commands run in your project's root directory and their output becomes part of t Include files in your command using `@` followed by the filename. -```md title=".opencode/commands/review-component.md" +```md title=".codev/commands/review-component.md" --- description: Review component --- diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx index a9fc0031d6..7840f82ffc 100644 --- a/packages/web/src/content/docs/config.mdx +++ b/packages/web/src/content/docs/config.mdx @@ -44,18 +44,18 @@ 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/codev.json`) - user preferences +2. **Global config** (`~/.config/codev/codev.json`) - user preferences 3. **Custom config** (`OPENCODE_CONFIG` env var) - custom overrides 4. **Project config** (`codev.json` in project) - project-specific settings -5. **`.opencode` directories** - agents, commands, plugins +5. **`.codev` 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 +7. **Managed config files** (`/Library/Application Support/codev/` on macOS) - admin-controlled 8. **macOS managed preferences** (`.mobileconfig` via MDM) - highest priority, not user-overridable This means project configs can override global defaults, and global configs can override remote organizational defaults. Managed settings override everything. :::note -The `.opencode` and `~/.config/opencode` directories use **plural names** for subdirectories: `agents/`, `commands/`, `modes/`, `plugins/`, `skills/`, `tools/`, and `themes/`. Singular names (e.g., `agent/`) are also supported for backwards compatibility. +The `.codev` and `~/.config/codev` directories use **plural names** for subdirectories: `agents/`, `commands/`, `modes/`, `plugins/`, `skills/`, `tools/`, and `themes/`. Singular names (e.g., `agent/`) are also supported for backwards compatibility. ::: --- @@ -98,9 +98,9 @@ You can enable specific servers in your local config: ### Global -Place your global OpenCode config in `~/.config/opencode/codev.json`. Use global config for user-wide server/runtime preferences like providers, models, and permissions. +Place your global OpenCode config in `~/.config/codev/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`. +For TUI-specific settings, use `~/.config/codev/tui.json`. Global config overrides remote organizational defaults. @@ -139,7 +139,7 @@ Custom config is loaded between global and project configs in the precedence ord Specify a custom config directory using the `OPENCODE_CONFIG_DIR` environment variable. This directory will be searched for agents, commands, -modes, and plugins just like the standard `.opencode` directory, and should +modes, and plugins just like the standard `.codev` directory, and should follow the same structure. ```bash @@ -147,7 +147,7 @@ export OPENCODE_CONFIG_DIR=/path/to/my/config-directory opencode run "Hello world" ``` -The custom directory is loaded after the global config and `.opencode` directories, so it **can override** their settings. +The custom directory is loaded after the global config and `.codev` directories, so it **can override** their settings. --- @@ -161,8 +161,8 @@ Drop an `codev.json` or `codev.jsonc` file in the system managed config director | Platform | Path | | -------- | ---------------------------------------- | -| macOS | `/Library/Application Support/opencode/` | -| Linux | `/etc/opencode/` | +| macOS | `/Library/Application Support/codev/` | +| Linux | `/etc/codev/` | | Windows | `%ProgramData%\opencode` | These directories require admin/root access to write, so users cannot modify them. @@ -194,7 +194,7 @@ Use the `ai.opencode.managed` PayloadType. The OpenCode config keys go directly <key>PayloadType</key> <string>ai.opencode.managed</string> <key>PayloadIdentifier</key> - <string>com.example.opencode.config</string> + <string>com.example.codev.config</string> <key>PayloadUUID</key> <string>GENERATE-YOUR-OWN-UUID</string> <key>PayloadVersion</key> @@ -223,7 +223,7 @@ Use the `ai.opencode.managed` PayloadType. The OpenCode config keys go directly <key>PayloadType</key> <string>Configuration</string> <key>PayloadIdentifier</key> - <string>com.example.opencode</string> + <string>com.example.codev</string> <key>PayloadUUID</key> <string>GENERATE-YOUR-OWN-UUID</string> <key>PayloadVersion</key> @@ -517,7 +517,7 @@ You can configure specialized agents for specific tasks through the `agent` opti } ``` -You can also define agents using markdown files in `~/.config/opencode/agents/` or `.opencode/agents/`. [Learn more here](/docs/agents). +You can also define agents using markdown files in `~/.config/codev/agents/` or `.codev/agents/`. [Learn more here](/docs/agents). --- @@ -581,7 +581,7 @@ You can configure custom commands for repetitive tasks through the `command` opt } ``` -You can also define commands using markdown files in `~/.config/opencode/commands/` or `.opencode/commands/`. [Learn more here](/docs/commands). +You can also define commands using markdown files in `~/.config/codev/commands/` or `.codev/commands/`. [Learn more here](/docs/commands). --- @@ -777,7 +777,7 @@ You can configure MCP servers you want to use through the `mcp` option. [Plugins](/docs/plugins) extend OpenCode with custom tools, hooks, and integrations. -Place plugin files in `.opencode/plugins/` or `~/.config/opencode/plugins/`. You can also load plugins from npm through the `plugin` option. +Place plugin files in `.codev/plugins/` or `~/.config/codev/plugins/`. You can also load plugins from npm through the `plugin` option. ```json title="codev.json" { diff --git a/packages/web/src/content/docs/custom-tools.mdx b/packages/web/src/content/docs/custom-tools.mdx index d89922b1f8..3cfc2a03ab 100644 --- a/packages/web/src/content/docs/custom-tools.mdx +++ b/packages/web/src/content/docs/custom-tools.mdx @@ -17,8 +17,8 @@ Tools are defined as **TypeScript** or **JavaScript** files. However, the tool d They can be defined: -- Locally by placing them in the `.opencode/tools/` directory of your project. -- Or globally, by placing them in `~/.config/opencode/tools/`. +- Locally by placing them in the `.codev/tools/` directory of your project. +- Or globally, by placing them in `~/.config/codev/tools/`. --- @@ -26,7 +26,7 @@ They can be defined: The easiest way to create tools is using the `tool()` helper which provides type-safety and validation. -```ts title=".opencode/tools/database.ts" {1} +```ts title=".codev/tools/database.ts" {1} import { tool } from "@opencode-ai/plugin" export default tool({ @@ -49,7 +49,7 @@ The **filename** becomes the **tool name**. The above creates a `database` tool. You can also export multiple tools from a single file. Each export becomes **a separate tool** with the name **`<filename>_<exportname>`**: -```ts title=".opencode/tools/math.ts" +```ts title=".codev/tools/math.ts" import { tool } from "@opencode-ai/plugin" export const add = tool({ @@ -85,7 +85,7 @@ Custom tools are keyed by tool name. If a custom tool uses the same name as a bu For example, this file replaces the built-in `bash` tool: -```ts title=".opencode/tools/bash.ts" +```ts title=".codev/tools/bash.ts" import { tool } from "@opencode-ai/plugin" export default tool({ @@ -138,7 +138,7 @@ export default { Tools receive context about the current session: -```ts title=".opencode/tools/project.ts" {8} +```ts title=".codev/tools/project.ts" {8} import { tool } from "@opencode-ai/plugin" export default tool({ @@ -165,7 +165,7 @@ You can write your tools in any language you want. Here's an example that adds t First, create the tool as a Python script: -```python title=".opencode/tools/add.py" +```python title=".codev/tools/add.py" import sys a = int(sys.argv[1]) @@ -175,7 +175,7 @@ print(a + b) Then create the tool definition that invokes it: -```ts title=".opencode/tools/python-add.ts" {10} +```ts title=".codev/tools/python-add.ts" {10} import { tool } from "@opencode-ai/plugin" import path from "path" @@ -186,7 +186,7 @@ export default tool({ b: tool.schema.number().describe("Second number"), }, async execute(args, context) { - const script = path.join(context.worktree, ".opencode/tools/add.py") + const script = path.join(context.worktree, ".codev/tools/add.py") const result = await Bun.$`python3 ${script} ${args.a} ${args.b}`.text() return result.trim() }, diff --git a/packages/web/src/content/docs/es/agents.mdx b/packages/web/src/content/docs/es/agents.mdx index fad1078e15..d88c8bbb95 100644 --- a/packages/web/src/content/docs/es/agents.mdx +++ b/packages/web/src/content/docs/es/agents.mdx @@ -189,10 +189,10 @@ Configure agentes en su archivo de configuración `codev.json`: También puede definir agentes utilizando archivos de Markdown. Colócalos en: -- Global: `~/.config/opencode/agents/` -- Por proyecto: `.opencode/agents/` +- Global: `~/.config/codev/agents/` +- Por proyecto: `.codev/agents/` -```markdown title="~/.config/opencode/agents/review.md" +```markdown title="~/.config/codev/agents/review.md" --- description: Reviews code for quality and best practices mode: subagent @@ -455,7 +455,7 @@ Puede anular estos permisos por agente. También puede establecer permisos en los agentes de Markdown. -```markdown title="~/.config/opencode/agents/review.md" +```markdown title="~/.config/codev/agents/review.md" --- description: Code review without edits mode: subagent @@ -712,7 +712,7 @@ A continuación se muestran algunos agentes de ejemplo que pueden resultarle út ### Agente de documentación -```markdown title="~/.config/opencode/agents/docs-writer.md" +```markdown title="~/.config/codev/agents/docs-writer.md" --- description: Writes and maintains project documentation mode: subagent @@ -734,7 +734,7 @@ Focus on: ### Auditor de seguridad -```markdown title="~/.config/opencode/agents/security-auditor.md" +```markdown title="~/.config/codev/agents/security-auditor.md" --- description: Performs security audits and identifies vulnerabilities mode: subagent diff --git a/packages/web/src/content/docs/es/commands.mdx b/packages/web/src/content/docs/es/commands.mdx index 8b5eabf30a..0a5a1db4f0 100644 --- a/packages/web/src/content/docs/es/commands.mdx +++ b/packages/web/src/content/docs/es/commands.mdx @@ -17,9 +17,9 @@ Los comandos personalizados se suman a los comandos integrados como `/init`, `/u Cree archivos de Markdown en el directorio `commands/` para definir comandos personalizados. -Crear `.opencode/commands/test.md`: +Crear `.codev/commands/test.md`: -```md title=".opencode/commands/test.md" +```md title=".codev/commands/test.md" --- description: Run tests with coverage agent: build @@ -79,10 +79,10 @@ Ahora puedes ejecutar este comando en TUI: También puede definir comandos utilizando archivos de Markdown. Colócalos en: -- Global: `~/.config/opencode/commands/` -- Por proyecto: `.opencode/commands/` +- Global: `~/.config/codev/commands/` +- Por proyecto: `.codev/commands/` -```markdown title="~/.config/opencode/commands/test.md" +```markdown title="~/.config/codev/commands/test.md" --- description: Run tests with coverage agent: build @@ -112,7 +112,7 @@ Las indicaciones para los comandos personalizados admiten varios marcadores de p Pase argumentos a comandos usando el marcador de posición `$ARGUMENTS`. -```md title=".opencode/commands/component.md" +```md title=".codev/commands/component.md" --- description: Create a new component --- @@ -138,7 +138,7 @@ También puede acceder a argumentos individuales utilizando parámetros posicion Por ejemplo: -```md title=".opencode/commands/create-file.md" +```md title=".codev/commands/create-file.md" --- description: Create a new file with content --- @@ -167,7 +167,7 @@ Utilice _!`command`_ para inyectar la salida de [comando bash](/docs/tui#bash-co Por ejemplo, para crear un comando personalizado que analice la cobertura de la prueba: -```md title=".opencode/commands/analyze-coverage.md" +```md title=".codev/commands/analyze-coverage.md" --- description: Analyze test coverage --- @@ -180,7 +180,7 @@ Based on these results, suggest improvements to increase coverage. O para revisar cambios recientes: -```md title=".opencode/commands/review-changes.md" +```md title=".codev/commands/review-changes.md" --- description: Review recent changes --- @@ -199,7 +199,7 @@ Los comandos se ejecutan en el directorio raíz de su proyecto y su salida pasa Incluya archivos en su comando usando `@` seguido del nombre del archivo. -```md title=".opencode/commands/review-component.md" +```md title=".codev/commands/review-component.md" --- description: Review component --- diff --git a/packages/web/src/content/docs/es/config.mdx b/packages/web/src/content/docs/es/config.mdx index b20aac85b5..187acc010b 100644 --- a/packages/web/src/content/docs/es/config.mdx +++ b/packages/web/src/content/docs/es/config.mdx @@ -43,16 +43,16 @@ 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/codev.json`) - preferencias del usuario +2. **Configuración global** (`~/.config/codev/codev.json`) - preferencias del usuario 3. **Configuración personalizada** (`OPENCODE_CONFIG` env var): anulaciones personalizadas 4. **Configuración del proyecto** (`codev.json` en el proyecto): configuración específica del proyecto -5. Directorios **`.opencode`** - agentes, comandos, complementos +5. Directorios **`.codev`** - agentes, comandos, complementos 6. **Configuración en línea** (`OPENCODE_CONFIG_CONTENT` env var): anulaciones del tiempo de ejecución Esto significa que las configuraciones del proyecto pueden anular los valores predeterminados globales y las configuraciones globales pueden anular los valores predeterminados de la organización remota. :::note -Los directorios `.opencode` y `~/.config/opencode` usan **nombres en plural** para los subdirectorios: `agents/`, `commands/`, `modes/`, `plugins/`, `skills/`, `tools/` y `themes/`. También se admiten nombres singulares (por ejemplo, `agent/`) para compatibilidad con versiones anteriores. +Los directorios `.codev` y `~/.config/codev` usan **nombres en plural** para los subdirectorios: `agents/`, `commands/`, `modes/`, `plugins/`, `skills/`, `tools/` y `themes/`. También se admiten nombres singulares (por ejemplo, `agent/`) para compatibilidad con versiones anteriores. ::: --- @@ -95,7 +95,7 @@ Puede habilitar servidores específicos en su configuración local: ### Global -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. +Coloque su configuración global OpenCode en `~/.config/codev/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. @@ -132,7 +132,7 @@ La configuración personalizada se carga entre las configuraciones globales y de Especifique un directorio de configuración personalizado usando `OPENCODE_CONFIG_DIR` variable de entorno. En este directorio se buscarán agentes, comandos, -modos y complementos como el directorio estándar `.opencode`, y debería +modos y complementos como el directorio estándar `.codev`, y debería Sigue la misma estructura. ```bash @@ -140,7 +140,7 @@ export OPENCODE_CONFIG_DIR=/path/to/my/config-directory opencode run "Hello world" ``` -El directorio personalizado se carga después de los directorios global config y `.opencode`, por lo que **puede anular** su configuración. +El directorio personalizado se carga después de los directorios global config y `.codev`, por lo que **puede anular** su configuración. --- @@ -336,7 +336,7 @@ Puedes configurar agentes especializados para tareas específicas a través de l } ``` -También puede definir agentes utilizando archivos de Markdown en `~/.config/opencode/agents/` o `.opencode/agents/`. [Más información aquí](/docs/agents). +También puede definir agentes utilizando archivos de Markdown en `~/.config/codev/agents/` o `.codev/agents/`. [Más información aquí](/docs/agents). --- @@ -400,7 +400,7 @@ Puede configurar comandos personalizados para tareas repetitivas a través de la } ``` -También puede definir comandos utilizando archivos de Markdown en `~/.config/opencode/commands/` o `.opencode/commands/`. [Más información aquí](/docs/commands). +También puede definir comandos utilizando archivos de Markdown en `~/.config/codev/commands/` o `.codev/commands/`. [Más información aquí](/docs/commands). --- @@ -536,7 +536,7 @@ Puede configurar los servidores MCP que desee utilizar a través de la opción ` Los [complementos](/docs/plugins) amplían OpenCode con herramientas, enlaces e integraciones personalizados. -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`. +Coloque los archivos de complemento en `.codev/plugins/` o `~/.config/codev/plugins/`. También puedes cargar complementos desde npm a través de la opción `plugin`. ```json title="codev.json" { diff --git a/packages/web/src/content/docs/es/custom-tools.mdx b/packages/web/src/content/docs/es/custom-tools.mdx index 133abf4ab2..4fa4a6bae3 100644 --- a/packages/web/src/content/docs/es/custom-tools.mdx +++ b/packages/web/src/content/docs/es/custom-tools.mdx @@ -17,8 +17,8 @@ Las herramientas se definen como archivos **TypeScript** o **JavaScript**. Sin e Se pueden definir: -- Localmente colocándolos en el directorio `.opencode/tools/` de tu proyecto. -- O de forma global, colocándolos en `~/.config/opencode/tools/`. +- Localmente colocándolos en el directorio `.codev/tools/` de tu proyecto. +- O de forma global, colocándolos en `~/.config/codev/tools/`. --- @@ -26,7 +26,7 @@ Se pueden definir: La forma más sencilla de crear herramientas es utilizar el asistente `tool()` que proporciona seguridad de tipos y validación. -```ts title=".opencode/tools/database.ts" {1} +```ts title=".codev/tools/database.ts" {1} import { tool } from "@opencode-ai/plugin" export default tool({ @@ -49,7 +49,7 @@ El **nombre de archivo** se convierte en el **nombre de la herramienta**. Lo ant También puede exportar varias herramientas desde un solo archivo. Cada exportación se convierte en **una herramienta independiente** con el nombre **`<filename>_<exportname>`**: -```ts title=".opencode/tools/math.ts" +```ts title=".codev/tools/math.ts" import { tool } from "@opencode-ai/plugin" export const add = tool({ @@ -85,7 +85,7 @@ Las herramientas personalizadas están codificadas por el nombre de la herramien Por ejemplo, este archivo reemplaza la herramienta `bash` integrada: -```ts title=".opencode/tools/bash.ts" +```ts title=".codev/tools/bash.ts" import { tool } from "@opencode-ai/plugin" export default tool({ @@ -138,7 +138,7 @@ export default { Las herramientas reciben contexto sobre la sesión actual: -```ts title=".opencode/tools/project.ts" {8} +```ts title=".codev/tools/project.ts" {8} import { tool } from "@opencode-ai/plugin" export default tool({ @@ -165,7 +165,7 @@ Puede escribir sus herramientas en cualquier idioma que desee. Aquí hay un ejem Primero, cree la herramienta como un script de Python: -```python title=".opencode/tools/add.py" +```python title=".codev/tools/add.py" import sys a = int(sys.argv[1]) @@ -175,7 +175,7 @@ print(a + b) Luego cree la definición de herramienta que la invoca: -```ts title=".opencode/tools/python-add.ts" {10} +```ts title=".codev/tools/python-add.ts" {10} import { tool } from "@opencode-ai/plugin" import path from "path" @@ -186,7 +186,7 @@ export default tool({ b: tool.schema.number().describe("Second number"), }, async execute(args, context) { - const script = path.join(context.worktree, ".opencode/tools/add.py") + const script = path.join(context.worktree, ".codev/tools/add.py") const result = await Bun.$`python3 ${script} ${args.a} ${args.b}`.text() return result.trim() }, diff --git a/packages/web/src/content/docs/es/permissions.mdx b/packages/web/src/content/docs/es/permissions.mdx index 28d1ef85b2..e401cf84fd 100644 --- a/packages/web/src/content/docs/es/permissions.mdx +++ b/packages/web/src/content/docs/es/permissions.mdx @@ -217,7 +217,7 @@ Consulte la sección [Reglas granulares (sintaxis de objeto)](#granular-rules-ob También puede configurar los permisos del agente en Markdown: -```markdown title="~/.config/opencode/agents/review.md" +```markdown title="~/.config/codev/agents/review.md" --- description: Code review without edits mode: subagent diff --git a/packages/web/src/content/docs/es/plugins.mdx b/packages/web/src/content/docs/es/plugins.mdx index 46d8769f3a..cefd16b5b4 100644 --- a/packages/web/src/content/docs/es/plugins.mdx +++ b/packages/web/src/content/docs/es/plugins.mdx @@ -19,8 +19,8 @@ Hay dos formas de cargar complementos. Coloque los archivos JavaScript o TypeScript en el directorio del complemento. -- `.opencode/plugins/` - Complementos a nivel de proyecto -- `~/.config/opencode/plugins/` - Complementos globales +- `.codev/plugins/` - Complementos a nivel de proyecto +- `~/.config/codev/plugins/` - Complementos globales Los archivos en estos directorios se cargan automáticamente al inicio. @@ -55,10 +55,10 @@ 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/codev.json`) +1. Configuración global (`~/.config/codev/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/`) +3. Directorio global de complementos (`~/.config/codev/plugins/`) +4. Directorio de complementos del proyecto (`.codev/plugins/`) Los paquetes npm duplicados con el mismo nombre y versión se cargan una vez. Sin embargo, un complemento local y un complemento npm con nombres similares se cargan por separado. @@ -75,7 +75,7 @@ funciones. Cada función recibe un objeto de contexto y devuelve un objeto de en Los complementos locales y las herramientas personalizadas pueden utilizar paquetes npm externos. Agregue un `package.json` a su directorio de configuración con las dependencias que necesita. -```json title=".opencode/package.json" +```json title=".codev/package.json" { "dependencies": { "shescape": "^2.1.0" @@ -85,7 +85,7 @@ Los complementos locales y las herramientas personalizadas pueden utilizar paque OpenCode ejecuta `bun install` al inicio para instalarlos. Luego, sus complementos y herramientas pueden importarlos. -```ts title=".opencode/plugins/my-plugin.ts" +```ts title=".codev/plugins/my-plugin.ts" import { escape } from "shescape" export const MyPlugin = async (ctx) => { @@ -103,7 +103,7 @@ export const MyPlugin = async (ctx) => { ### Estructura básica -```js title=".opencode/plugins/example.js" +```js title=".codev/plugins/example.js" export const MyPlugin = async ({ project, client, $, directory, worktree }) => { console.log("Plugin initialized!") @@ -219,7 +219,7 @@ A continuación se muestran algunos ejemplos de complementos que puede utilizar Enviar notificaciones cuando ocurran ciertos eventos: -```js title=".opencode/plugins/notification.js" +```js title=".codev/plugins/notification.js" export const NotificationPlugin = async ({ project, client, $, directory, worktree }) => { return { event: async ({ event }) => { @@ -244,7 +244,7 @@ Si está utilizando la aplicación de escritorio OpenCode, puede enviar notifica Evite que opencode lea archivos `.env`: -```javascript title=".opencode/plugins/env-protection.js" +```javascript title=".codev/plugins/env-protection.js" export const EnvProtection = async ({ project, client, $, directory, worktree }) => { return { "tool.execute.before": async (input, output) => { @@ -262,7 +262,7 @@ export const EnvProtection = async ({ project, client, $, directory, worktree }) Inyecte variables de entorno en toda la ejecución del shell (herramientas de inteligencia artificial y terminales de usuario): -```javascript title=".opencode/plugins/inject-env.js" +```javascript title=".codev/plugins/inject-env.js" export const InjectEnvPlugin = async () => { return { "shell.env": async (input, output) => { @@ -279,7 +279,7 @@ export const InjectEnvPlugin = async () => { Los complementos también pueden agregar herramientas personalizadas a opencode: -```ts title=".opencode/plugins/custom-tools.ts" +```ts title=".codev/plugins/custom-tools.ts" import { type Plugin, tool } from "@opencode-ai/plugin" export const CustomToolsPlugin: Plugin = async (ctx) => { @@ -318,7 +318,7 @@ Si una herramienta de complemento utiliza el mismo nombre que una herramienta in Utilice `client.app.log()` en lugar de `console.log` para el registro estructurado: -```ts title=".opencode/plugins/my-plugin.ts" +```ts title=".codev/plugins/my-plugin.ts" export const MyPlugin = async ({ client }) => { await client.app.log({ body: { @@ -339,7 +339,7 @@ Niveles: `debug`, `info`, `warn`, `error`. Consulte la [documentación del SDK]( Personalice el contexto incluido cuando se compacta una sesión: -```ts title=".opencode/plugins/compaction.ts" +```ts title=".codev/plugins/compaction.ts" import type { Plugin } from "@opencode-ai/plugin" export const CompactionPlugin: Plugin = async (ctx) => { @@ -363,7 +363,7 @@ El hook `experimental.session.compacting` se activa antes de que LLM genere un r También puede reemplazar completamente el mensaje de compactación configurando `output.prompt`: -```ts title=".opencode/plugins/custom-compaction.ts" +```ts title=".codev/plugins/custom-compaction.ts" import type { Plugin } from "@opencode-ai/plugin" export const CustomCompactionPlugin: Plugin = async (ctx) => { diff --git a/packages/web/src/content/docs/es/providers.mdx b/packages/web/src/content/docs/es/providers.mdx index fcdd384fac..d4374cb16a 100644 --- a/packages/web/src/content/docs/es/providers.mdx +++ b/packages/web/src/content/docs/es/providers.mdx @@ -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/codev.jsonc" +```jsonc title="~/.config/codev/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/codev.jsonc" +```jsonc title="~/.config/codev/codev.jsonc" { "$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 37703d30fe..d409c165be 100644 --- a/packages/web/src/content/docs/es/rules.mdx +++ b/packages/web/src/content/docs/es/rules.mdx @@ -62,7 +62,7 @@ Coloque un `AGENTS.md` en la raíz de su proyecto para reglas específicas del p ### Global -También puedes tener reglas globales en un archivo `~/.config/opencode/AGENTS.md`. Esto se aplica en todas las sesiones opencode. +También puedes tener reglas globales en un archivo `~/.config/codev/AGENTS.md`. Esto se aplica en todas las sesiones opencode. Dado que esto no está comprometido con Git ni se comparte con su equipo, recomendamos usarlo para especificar las reglas personales que debe seguir LLM. @@ -71,7 +71,7 @@ Dado que esto no está comprometido con Git ni se comparte con su equipo, recome Para los usuarios que migran desde Claude Code, OpenCode admite las convenciones de archivos de Claude Code como alternativas: - **Reglas del proyecto**: `CLAUDE.md` en el directorio de tu proyecto (se usa si no existe `AGENTS.md`) -- **Reglas globales**: `~/.claude/CLAUDE.md` (se usa si no existe `~/.config/opencode/AGENTS.md`) +- **Reglas globales**: `~/.claude/CLAUDE.md` (se usa si no existe `~/.config/codev/AGENTS.md`) - **Habilidades**: `~/.claude/skills/`; consulte [Habilidades del agente](/docs/skills/) para obtener más detalles. Para deshabilitar la compatibilidad de Claude Code, configure una de estas variables de entorno: @@ -89,16 +89,16 @@ export OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 # Disable only .claude/skills Cuando se inicia opencode, busca archivos de reglas en este orden: 1. **Archivos locales** atravesando desde el directorio actual (`AGENTS.md`, `CLAUDE.md`) -2. **Archivo global** en `~/.config/opencode/AGENTS.md` +2. **Archivo global** en `~/.config/codev/AGENTS.md` 3. **Archivo de Claude Code** en `~/.claude/CLAUDE.md` (a menos que esté deshabilitado) -El primer archivo coincidente gana en cada categoría. Por ejemplo, si tiene `AGENTS.md` y `CLAUDE.md`, solo se usa `AGENTS.md`. De manera similar, `~/.config/opencode/AGENTS.md` tiene prioridad sobre `~/.claude/CLAUDE.md`. +El primer archivo coincidente gana en cada categoría. Por ejemplo, si tiene `AGENTS.md` y `CLAUDE.md`, solo se usa `AGENTS.md`. De manera similar, `~/.config/codev/AGENTS.md` tiene prioridad sobre `~/.claude/CLAUDE.md`. --- ## Instrucciones personalizadas -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. +Puede especificar archivos de instrucciones personalizados en su `codev.json` o el `~/.config/codev/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: diff --git a/packages/web/src/content/docs/es/skills.mdx b/packages/web/src/content/docs/es/skills.mdx index ba8b6745c2..d5477edbc3 100644 --- a/packages/web/src/content/docs/es/skills.mdx +++ b/packages/web/src/content/docs/es/skills.mdx @@ -13,8 +13,8 @@ Las habilidades se cargan bajo demanda a través de la herramienta nativa `skill Cree una carpeta por nombre de habilidad y coloque un `SKILL.md` dentro de ella. OpenCode busca estas ubicaciones: -- Configuración del proyecto: `.opencode/skills/<name>/SKILL.md` -- Configuración global: `~/.config/opencode/skills/<name>/SKILL.md` +- Configuración del proyecto: `.codev/skills/<name>/SKILL.md` +- Configuración global: `~/.config/codev/skills/<name>/SKILL.md` - Compatible con Proyecto Claude: `.claude/skills/<name>/SKILL.md` - Compatible con Claude global: `~/.claude/skills/<name>/SKILL.md` - Compatible con agente de proyecto: `.agents/skills/<name>/SKILL.md` @@ -25,9 +25,9 @@ OpenCode busca estas ubicaciones: ## Entender el descubrimiento Para las rutas locales del proyecto, OpenCode sube desde su directorio de trabajo actual hasta llegar al árbol de trabajo de git. -Carga cualquier `skills/*/SKILL.md` coincidente en `.opencode/` y cualquier `.claude/skills/*/SKILL.md` o `.agents/skills/*/SKILL.md` coincidente a lo largo del camino. +Carga cualquier `skills/*/SKILL.md` coincidente en `.codev/` y cualquier `.claude/skills/*/SKILL.md` o `.agents/skills/*/SKILL.md` coincidente a lo largo del camino. -Las definiciones globales también se cargan desde `~/.config/opencode/skills/*/SKILL.md`, `~/.claude/skills/*/SKILL.md` y `~/.agents/skills/*/SKILL.md`. +Las definiciones globales también se cargan desde `~/.config/codev/skills/*/SKILL.md`, `~/.claude/skills/*/SKILL.md` y `~/.agents/skills/*/SKILL.md`. --- @@ -73,7 +73,7 @@ Manténgalo lo suficientemente específico para que el agente elija correctament ## Usar un ejemplo -Crea `.opencode/skills/git-release/SKILL.md` así: +Crea `.codev/skills/git-release/SKILL.md` así: ```markdown --- diff --git a/packages/web/src/content/docs/es/themes.mdx b/packages/web/src/content/docs/es/themes.mdx index 8c8028eb6e..0a9988b3ff 100644 --- a/packages/web/src/content/docs/es/themes.mdx +++ b/packages/web/src/content/docs/es/themes.mdx @@ -83,9 +83,9 @@ OpenCode admite un sistema de temas flexible basado en JSON que permite a los us Los temas se cargan desde varios directorios en el siguiente orden, donde los directorios posteriores anulan los anteriores: 1. **Temas integrados**: están integrados en el binario -2. **Directorio de configuración de usuario**: definido en `~/.config/opencode/themes/*.json` o `$XDG_CONFIG_HOME/opencode/themes/*.json` -3. **Directorio raíz del proyecto**: definido en `<project-root>/.opencode/themes/*.json` -4. **Directorio de trabajo actual** - Definido en `./.opencode/themes/*.json` +2. **Directorio de configuración de usuario**: definido en `~/.config/codev/themes/*.json` o `$XDG_CONFIG_HOME/opencode/themes/*.json` +3. **Directorio raíz del proyecto**: definido en `<project-root>/.codev/themes/*.json` +4. **Directorio de trabajo actual** - Definido en `./.codev/themes/*.json` Si varios directorios contienen un tema con el mismo nombre, se utilizará el tema del directorio con mayor prioridad. @@ -98,15 +98,15 @@ Para crear un tema personalizado, cree un archivo JSON en uno de los directorios Para temas para todo el usuario: ```bash no-frame -mkdir -p ~/.config/opencode/themes -vim ~/.config/opencode/themes/my-theme.json +mkdir -p ~/.config/codev/themes +vim ~/.config/codev/themes/my-theme.json ``` Y para temas específicos del proyecto. ```bash no-frame -mkdir -p .opencode/themes -vim .opencode/themes/my-theme.json +mkdir -p .codev/themes +vim .codev/themes/my-theme.json ``` --- diff --git a/packages/web/src/content/docs/es/troubleshooting.mdx b/packages/web/src/content/docs/es/troubleshooting.mdx index eab6f1c8bd..1c5581d4db 100644 --- a/packages/web/src/content/docs/es/troubleshooting.mdx +++ b/packages/web/src/content/docs/es/troubleshooting.mdx @@ -57,7 +57,7 @@ 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/codev.jsonc` (o `~/.config/opencode/codev.json`) +- **macOS/Linux**: `~/.config/codev/codev.jsonc` (o `~/.config/codev/codev.json`) - **macOS/Linux** (instalaciones anteriores): `~/.local/share/opencode/codev.jsonc` - **Windows**: Presione `WIN+R` y pegue `%USERPROFILE%\.config\opencode\codev.jsonc` @@ -75,10 +75,10 @@ Si tiene complementos configurados, desactívelos temporalmente eliminando la cl OpenCode también puede cargar complementos locales desde el disco. Quítelos temporalmente del camino (o cambie el nombre de la carpeta) y reinicie la aplicación de escritorio: - **Complementos globales** - - **macOS/Linux**: `~/.config/opencode/plugins/` + - **macOS/Linux**: `~/.config/codev/plugins/` - **Windows**: Presione `WIN+R` y pegue `%USERPROFILE%\.config\opencode\plugins` - **Complementos de proyecto** (solo si usas la configuración por proyecto) - - `<your-project>/.opencode/plugins/` + - `<your-project>/.codev/plugins/` Si la aplicación comienza a funcionar nuevamente, vuelva a habilitar los complementos uno a la vez para encontrar cuál está causando el problema. diff --git a/packages/web/src/content/docs/permissions.mdx b/packages/web/src/content/docs/permissions.mdx index 3bb497664b..46c9f6a53f 100644 --- a/packages/web/src/content/docs/permissions.mdx +++ b/packages/web/src/content/docs/permissions.mdx @@ -238,7 +238,7 @@ Refer to the [Granular Rules (Object Syntax)](#granular-rules-object-syntax) sec You can also configure agent permissions in Markdown: -```markdown title="~/.config/opencode/agents/review.md" +```markdown title="~/.config/codev/agents/review.md" --- description: Code review without edits mode: subagent diff --git a/packages/web/src/content/docs/plugins.mdx b/packages/web/src/content/docs/plugins.mdx index 889f43cf41..4632bfe400 100644 --- a/packages/web/src/content/docs/plugins.mdx +++ b/packages/web/src/content/docs/plugins.mdx @@ -19,8 +19,8 @@ There are two ways to load plugins. Place JavaScript or TypeScript files in the plugin directory. -- `.opencode/plugins/` - Project-level plugins -- `~/.config/opencode/plugins/` - Global plugins +- `.codev/plugins/` - Project-level plugins +- `~/.config/codev/plugins/` - Global plugins Files in these directories are automatically loaded at startup. @@ -55,10 +55,10 @@ 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/codev.json`) +1. Global config (`~/.config/codev/codev.json`) 2. Project config (`codev.json`) -3. Global plugin directory (`~/.config/opencode/plugins/`) -4. Project plugin directory (`.opencode/plugins/`) +3. Global plugin directory (`~/.config/codev/plugins/`) +4. Project plugin directory (`.codev/plugins/`) Duplicate npm packages with the same name and version are loaded once. However, a local plugin and an npm plugin with similar names are both loaded separately. @@ -75,7 +75,7 @@ functions. Each function receives a context object and returns a hooks object. Local plugins and custom tools can use external npm packages. Add a `package.json` to your config directory with the dependencies you need. -```json title=".opencode/package.json" +```json title=".codev/package.json" { "dependencies": { "shescape": "^2.1.0" @@ -85,7 +85,7 @@ Local plugins and custom tools can use external npm packages. Add a `package.jso OpenCode runs `bun install` at startup to install these. Your plugins and tools can then import them. -```ts title=".opencode/plugins/my-plugin.ts" +```ts title=".codev/plugins/my-plugin.ts" import { escape } from "shescape" export const MyPlugin = async (ctx) => { @@ -103,7 +103,7 @@ export const MyPlugin = async (ctx) => { ### Basic structure -```js title=".opencode/plugins/example.js" +```js title=".codev/plugins/example.js" export const MyPlugin = async ({ project, client, $, directory, worktree }) => { console.log("Plugin initialized!") @@ -219,7 +219,7 @@ Here are some examples of plugins you can use to extend opencode. Send notifications when certain events occur: -```js title=".opencode/plugins/notification.js" +```js title=".codev/plugins/notification.js" export const NotificationPlugin = async ({ project, client, $, directory, worktree }) => { return { event: async ({ event }) => { @@ -244,7 +244,7 @@ If you’re using the OpenCode desktop app, it can send system notifications aut Prevent opencode from reading `.env` files: -```javascript title=".opencode/plugins/env-protection.js" +```javascript title=".codev/plugins/env-protection.js" export const EnvProtection = async ({ project, client, $, directory, worktree }) => { return { "tool.execute.before": async (input, output) => { @@ -262,7 +262,7 @@ export const EnvProtection = async ({ project, client, $, directory, worktree }) Inject environment variables into all shell execution (AI tools and user terminals): -```javascript title=".opencode/plugins/inject-env.js" +```javascript title=".codev/plugins/inject-env.js" export const InjectEnvPlugin = async () => { return { "shell.env": async (input, output) => { @@ -279,7 +279,7 @@ export const InjectEnvPlugin = async () => { Plugins can also add custom tools to opencode: -```ts title=".opencode/plugins/custom-tools.ts" +```ts title=".codev/plugins/custom-tools.ts" import { type Plugin, tool } from "@opencode-ai/plugin" export const CustomToolsPlugin: Plugin = async (ctx) => { @@ -318,7 +318,7 @@ If a plugin tool uses the same name as a built-in tool, the plugin tool takes pr Use `client.app.log()` instead of `console.log` for structured logging: -```ts title=".opencode/plugins/my-plugin.ts" +```ts title=".codev/plugins/my-plugin.ts" export const MyPlugin = async ({ client }) => { await client.app.log({ body: { @@ -339,7 +339,7 @@ Levels: `debug`, `info`, `warn`, `error`. See [SDK documentation](https://openco Customize the context included when a session is compacted: -```ts title=".opencode/plugins/compaction.ts" +```ts title=".codev/plugins/compaction.ts" import type { Plugin } from "@opencode-ai/plugin" export const CompactionPlugin: Plugin = async (ctx) => { @@ -363,7 +363,7 @@ The `experimental.session.compacting` hook fires before the LLM generates a cont You can also replace the compaction prompt entirely by setting `output.prompt`: -```ts title=".opencode/plugins/custom-compaction.ts" +```ts title=".codev/plugins/custom-compaction.ts" import type { Plugin } from "@opencode-ai/plugin" export const CustomCompactionPlugin: Plugin = async (ctx) => { diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index 09eb7464d4..db7590ee63 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -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/codev.jsonc" +```jsonc title="~/.config/codev/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/codev.jsonc" +```jsonc title="~/.config/codev/codev.jsonc" { "$schema": "https://opencode.ai/config.json", "provider": { diff --git a/packages/web/src/content/docs/rules.mdx b/packages/web/src/content/docs/rules.mdx index bf91d7bf3b..12c9166f13 100644 --- a/packages/web/src/content/docs/rules.mdx +++ b/packages/web/src/content/docs/rules.mdx @@ -70,7 +70,7 @@ Place an `AGENTS.md` in your project root for project-specific rules. These only ### Global -You can also have global rules in a `~/.config/opencode/AGENTS.md` file. This gets applied across all opencode sessions. +You can also have global rules in a `~/.config/codev/AGENTS.md` file. This gets applied across all opencode sessions. Since this isn't committed to Git or shared with your team, we recommend using this to specify any personal rules that the LLM should follow. @@ -79,7 +79,7 @@ Since this isn't committed to Git or shared with your team, we recommend using t For users migrating from Claude Code, OpenCode supports Claude Code's file conventions as fallbacks: - **Project rules**: `CLAUDE.md` in your project directory (used if no `AGENTS.md` exists) -- **Global rules**: `~/.claude/CLAUDE.md` (used if no `~/.config/opencode/AGENTS.md` exists) +- **Global rules**: `~/.claude/CLAUDE.md` (used if no `~/.config/codev/AGENTS.md` exists) - **Skills**: `~/.claude/skills/` — see [Agent Skills](/docs/skills/) for details To disable Claude Code compatibility, set one of these environment variables: @@ -97,16 +97,16 @@ export OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 # Disable only .claude/skills When opencode starts, it looks for rule files in this order: 1. **Local files** by traversing up from the current directory (`AGENTS.md`, `CLAUDE.md`) -2. **Global file** at `~/.config/opencode/AGENTS.md` +2. **Global file** at `~/.config/codev/AGENTS.md` 3. **Claude Code file** at `~/.claude/CLAUDE.md` (unless disabled) -The first matching file wins in each category. For example, if you have both `AGENTS.md` and `CLAUDE.md`, only `AGENTS.md` is used. Similarly, `~/.config/opencode/AGENTS.md` takes precedence over `~/.claude/CLAUDE.md`. +The first matching file wins in each category. For example, if you have both `AGENTS.md` and `CLAUDE.md`, only `AGENTS.md` is used. Similarly, `~/.config/codev/AGENTS.md` takes precedence over `~/.claude/CLAUDE.md`. --- ## Custom Instructions -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. +You can specify custom instruction files in your `codev.json` or the global `~/.config/codev/codev.json`. This allows you and your team to reuse existing rules rather than having to duplicate them to AGENTS.md. Example: diff --git a/packages/web/src/content/docs/skills.mdx b/packages/web/src/content/docs/skills.mdx index cce499b4e9..92bf76f466 100644 --- a/packages/web/src/content/docs/skills.mdx +++ b/packages/web/src/content/docs/skills.mdx @@ -13,8 +13,8 @@ Skills are loaded on-demand via the native `skill` tool—agents see available s Create one folder per skill name and put a `SKILL.md` inside it. OpenCode searches these locations: -- Project config: `.opencode/skills/<name>/SKILL.md` -- Global config: `~/.config/opencode/skills/<name>/SKILL.md` +- Project config: `.codev/skills/<name>/SKILL.md` +- Global config: `~/.config/codev/skills/<name>/SKILL.md` - Project Claude-compatible: `.claude/skills/<name>/SKILL.md` - Global Claude-compatible: `~/.claude/skills/<name>/SKILL.md` - Project agent-compatible: `.agents/skills/<name>/SKILL.md` @@ -25,9 +25,9 @@ OpenCode searches these locations: ## Understand discovery For project-local paths, OpenCode walks up from your current working directory until it reaches the git worktree. -It loads any matching `skills/*/SKILL.md` in `.opencode/` and any matching `.claude/skills/*/SKILL.md` or `.agents/skills/*/SKILL.md` along the way. +It loads any matching `skills/*/SKILL.md` in `.codev/` and any matching `.claude/skills/*/SKILL.md` or `.agents/skills/*/SKILL.md` along the way. -Global definitions are also loaded from `~/.config/opencode/skills/*/SKILL.md`, `~/.claude/skills/*/SKILL.md`, and `~/.agents/skills/*/SKILL.md`. +Global definitions are also loaded from `~/.config/codev/skills/*/SKILL.md`, `~/.claude/skills/*/SKILL.md`, and `~/.agents/skills/*/SKILL.md`. --- @@ -73,7 +73,7 @@ Keep it specific enough for the agent to choose correctly. ## Use an example -Create `.opencode/skills/git-release/SKILL.md` like this: +Create `.codev/skills/git-release/SKILL.md` like this: ```markdown --- diff --git a/packages/web/src/content/docs/themes.mdx b/packages/web/src/content/docs/themes.mdx index 8a7c6a46ac..d486f1b6a3 100644 --- a/packages/web/src/content/docs/themes.mdx +++ b/packages/web/src/content/docs/themes.mdx @@ -83,9 +83,9 @@ OpenCode supports a flexible JSON-based theme system that allows users to create Themes are loaded from multiple directories in the following order where later directories override earlier ones: 1. **Built-in themes** - These are embedded in the binary -2. **User config directory** - Defined in `~/.config/opencode/themes/*.json` or `$XDG_CONFIG_HOME/opencode/themes/*.json` -3. **Project root directory** - Defined in the `<project-root>/.opencode/themes/*.json` -4. **Current working directory** - Defined in `./.opencode/themes/*.json` +2. **User config directory** - Defined in `~/.config/codev/themes/*.json` or `$XDG_CONFIG_HOME/opencode/themes/*.json` +3. **Project root directory** - Defined in the `<project-root>/.codev/themes/*.json` +4. **Current working directory** - Defined in `./.codev/themes/*.json` If multiple directories contain a theme with the same name, the theme from the directory with higher priority will be used. @@ -98,15 +98,15 @@ To create a custom theme, create a JSON file in one of the theme directories. For user-wide themes: ```bash no-frame -mkdir -p ~/.config/opencode/themes -vim ~/.config/opencode/themes/my-theme.json +mkdir -p ~/.config/codev/themes +vim ~/.config/codev/themes/my-theme.json ``` And for project-specific themes. ```bash no-frame -mkdir -p .opencode/themes -vim .opencode/themes/my-theme.json +mkdir -p .codev/themes +vim .codev/themes/my-theme.json ``` --- diff --git a/packages/web/src/content/docs/troubleshooting.mdx b/packages/web/src/content/docs/troubleshooting.mdx index a8eafb4d2d..bc1fa49746 100644 --- a/packages/web/src/content/docs/troubleshooting.mdx +++ b/packages/web/src/content/docs/troubleshooting.mdx @@ -71,7 +71,7 @@ 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/codev.jsonc` (or `~/.config/opencode/codev.json`) +- **macOS/Linux**: `~/.config/codev/codev.jsonc` (or `~/.config/codev/codev.json`) - **macOS/Linux** (older installs): `~/.local/share/opencode/codev.jsonc` - **Windows**: Press `WIN+R` and paste `%USERPROFILE%\.config\opencode\codev.jsonc` @@ -89,10 +89,10 @@ If you have plugins configured, temporarily disable them by removing the key or OpenCode can also load local plugins from disk. Temporarily move these out of the way (or rename the folder) and restart the desktop app: - **Global plugins** - - **macOS/Linux**: `~/.config/opencode/plugins/` + - **macOS/Linux**: `~/.config/codev/plugins/` - **Windows**: Press `WIN+R` and paste `%USERPROFILE%\.config\opencode\plugins` - **Project plugins** (only if you use per-project config) - - `<your-project>/.opencode/plugins/` + - `<your-project>/.codev/plugins/` If the app starts working again, re-enable plugins one at a time to find which one is causing the issue.