[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-85110":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":11,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":9,"rankLanguage":9,"license":15,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":9,"pushedAt":9,"updatedAt":20,"readmeContent":21,"aiSummary":9,"trendingCount":13,"starSnapshotCount":13,"syncStatus":22,"lastSyncTime":23,"discoverSource":24},85110,"opencode-x","sdeonvacation\u002Fopencode-x","sdeonvacation","Open-source Claude Code alternative. Provider-agnostic, MIT licensed. Native Claude Code hook\u002Fplugin compatibility.",null,"TypeScript",133,1,0,36.9,"MIT License",false,"main",true,[],"2026-06-15 10:04:23","# OpenCode X\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@sdeonvacation\u002Fopencode-x?color=blue)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@sdeonvacation\u002Fopencode-x)\n[![GitHub release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fsdeonvacation\u002Fopencode-x)](https:\u002F\u002Fgithub.com\u002Fsdeonvacation\u002Fopencode-x\u002Freleases\u002Flatest)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsdeonvacation\u002Fopencode-x)](https:\u002F\u002Fgithub.com\u002Fsdeonvacation\u002Fopencode-x\u002Fstargazers)\n[![TypeScript](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTypeScript-5.8-blue?logo=typescript&logoColor=white)](https:\u002F\u002Fwww.typescriptlang.org\u002F)\n[![Built with Effect](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBuilt%20with-Effect--TS-purple)](https:\u002F\u002Feffect.website\u002F)\n\nA terminal-based AI coding agent that works with **any LLM provider**. Built on [opencode](https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode), adding production-grade features: swarm execution, global LSP sharing, persistent memory, autonomous goals, and native support for claude code plugins\u002Fhooks.\n\nThink Claude Code, but open source, provider-agnostic, and free.\n\n## Demo\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fopencode-x-demo.gif\" alt=\"OpenCode X — terminal AI agent with swarm execution and multi-provider support\" width=\"800\">\n  \u003Cbr>\n  \u003Cem>Autonomous multi-turn task execution with real-time cost tracking\u003C\u002Fem>\n\u003C\u002Fp>\n\n---\n\n## Why OpenCode X?\n\nNative support for claude code plugins and hooks. Bundles several claude code features like \u002Fbtw, \u002Fgoal, push-to-background subagents, memory and detailed usage tracking. All of this, while giving you the provider-agnostic flavour of opencode. Best of both worlds.\n\n|                         | OpenCode X                                           | Claude Code                                 |\n| ----------------------- | ---------------------------------------------------- | ------------------------------------------- |\n| **Cost**                | Free + bring your own API keys                       | $200\u002Fmo subscription                        |\n| **Models**              | Any provider (Claude, GPT, Gemini, Mistral, local)   | Anthropic only                              |\n| **Swarm execution**     | Batch-parallel subagents with bounded concurrency    | Native                                      |\n| **Worktree management** | `\u002Fworktree` command for user-initiated isolation     | `--worktree` CLI flag                       |\n| **Global LSP**          | Single instance shared across all agents + worktrees | Unknown                                     |\n| **Autonomous goals**    | `\u002Fgoal` with 200-turn auto-continuation              | \u002Fgoal but no configurable turn\u002Ftoken limits |\n| **Token savings**       | LLM compression saves 30-60% on tool output          | Raw output to model                         |\n| **Claude Code hooks**   | Native compatibility (same config, same env vars)    | Native                                      |\n| **Open source**         | MIT, no telemetry, no account                        | Proprietary                                 |\n\nvs. **upstream opencode**: OpenCode X adds 280+ fork-only commits — swarm, persistent memory, goal system, session memory, context safety net, push-to-background, tool compression, cache optimization, global LSP sharing, `\u002Fworktree` command, and more. Full comparison below.\n\n---\n\n## Install\n\n### npm (Recommended)\n\n```bash\nnpm install -g @sdeonvacation\u002Fopencode-x\nopencode-x\n```\n\n### Download Binary\n\nDownload from [Releases](https:\u002F\u002Fgithub.com\u002Fsdeonvacation\u002Fopencode-x\u002Freleases\u002Flatest):\n\n| Asset                          | Platform                  |\n| ------------------------------ | ------------------------- |\n| `opencode-x-darwin-arm64`      | macOS Apple Silicon       |\n| `opencode-x-darwin-x64`        | macOS Intel               |\n| `opencode-x-linux-arm64`       | Linux arm64 (glibc)       |\n| `opencode-x-linux-x64`         | Linux x64 (glibc)         |\n| `opencode-x-linux-arm64-musl`  | Linux arm64 (Alpine\u002Fmusl) |\n| `opencode-x-linux-x64-musl`    | Linux x64 (Alpine\u002Fmusl)   |\n| `opencode-x-windows-arm64.exe` | Windows arm64             |\n| `opencode-x-windows-x64.exe`   | Windows x64               |\n\n```bash\n# macOS \u002F Linux\nchmod +x opencode-x-\u003Cplatform>\nsudo mv opencode-x-\u003Cplatform> \u002Fusr\u002Flocal\u002Fbin\u002Fopencode-x\n\n# Windows (PowerShell as Admin)\nmove opencode-x-windows-x64.exe C:\\Windows\\opencode-x.exe\n```\n\n### Build from Source\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fsdeonvacation\u002Fopencode-x\ncd opencode-x && bun install\n.\u002Fpackages\u002Fopencode\u002Fscript\u002Fbuild.ts --single\n# Binary at: packages\u002Fopencode\u002Fdist\u002Fopencode-$(uname -s | tr A-Z a-z)-$(uname -m)\u002Fbin\u002Fopencode\n```\n\n---\n\n## Quick Start\n\n```bash\n# 1. Set any API key\nexport ANTHROPIC_API_KEY=sk-...    # or OPENAI_API_KEY, GOOGLE_API_KEY, etc.\n\n# 2. Run\nopencode-x\n\n# 3. Type a prompt. That's it.\n```\n\nSwitch models anytime — no config migration, no lock-in.\n\n---\n\n## Configuration\n\nFor full configuration, agent setup, skills, hooks, and plugin details, see the **[OpenCode-X Guide](.\u002FOPENCODE-X_GUIDE.md)**.\n\n---\n\n## Feature Highlights\n\n### Swarm Execution\n\nDispatch the same prompt template across N items in parallel. Review 10 files, lint 5 modules, translate 3 documents — all at once.\n\n```json\n{ \"experimental\": { \"swarm\": true, \"swarm_concurrency\": 5 } }\n```\n\n- Bounded concurrency (default 5, max 20)\n- Per-item failure isolation (one failure doesn't abort the rest)\n- Background mode: dispatch and continue working\n\n### Global LSP\u002FMCP Sharing\n\nSingle LSP\u002FMCP server per project, shared across all agent types — primary, subagents, background sessions, isolated worktrees, swarms. No redundant spawns. Path translation maps worktree paths to parent-equivalent. Idle shutdown after 30 minutes.\n\n### Worktree Isolation + `\u002Fworktree` Command\n\nUpstream opencode isolates subagents in worktrees automatically. OpenCode X adds the `\u002Fworktree` (or `\u002Fwt`) slash command for **user-initiated** worktree management: create, list, remove, switch directory. Useful when you want to manually manage parallel workstreams.\n\n### Autonomous Goals\n\n```\n\u002Fgoal Implement feature X with tests passing\n```\n\nAgent works autonomously toward the objective. Auto-continuation between turns, 200-turn hard limit, optional token budget. `goal_complete` tool called with evidence when done.\n\n### Tool Output Compression\n\nLLM-powered compression before tool outputs reach the main model. Three strategies (EXTRACT, SUMMARIZE, FILTER) selected per tool type. Saves 30-60% tokens on large outputs.\n\n### Persistent + Session Memory\n\n- **Persistent**: cross-session facts in `~\u002F.local\u002Fshare\u002Fopencode\u002Fmemory\u002F` — preferences, project conventions, corrections\n- **Session**: SQLite-backed entries that survive `\u002Fclear` and compaction\n\n### Push to Background (Leader+D)\n\nDetach any running session to background without killing it. TUI immediately accepts new input. Toast notification on completion.\n\n### Context Safety Net (3-Tier)\n\n1. **Tool Result Budget** (50K cap) — oldest outputs truncated first\n2. **MicroCompact** (75% context) — summarize old messages, keep 10 recent\n3. **Context Collapse** (97% context) — emergency backup + structured summary\n\n### Cache Stability\n\nSystem prompt split into stable prefix (cached) + dynamic suffix (changes freely). Saves cache invalidation costs on every turn.\n\n---\n\n## Full Comparison (vs. Upstream + Claude Code)\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Click to expand full feature matrix\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n| Feature                                      | **OpenCode X**                                                                                                                                          | **Upstream OpenCode**                          | **Claude Code**                                     |\n| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | --------------------------------------------------- |\n| **Claude Code hooks + plugins**              | Native — reads `~\u002F.claude\u002Fsettings.json` hooks, `~\u002F.claude\u002Fplugins\u002Finstalled_plugins.json`, `~\u002F.claude\u002Fhooks\u002Fcommands.json`; same events, same env vars | Plugin system only (no hook lifecycle events)  | Native                                              |\n| **Push agent to background**                 | `Leader+D` chord detaches running session to background; TUI unblocks for new prompts, toast on completion                                              | Background subagents (spawn only)              | Native                                              |\n| **Cache stability (prompt split)**           | System prompt split into stable prefix + dynamic suffix; sub-part `cacheControl` on Anthropic\u002FBedrock\u002FAlibaba; stable ordering for OpenAI auto-cache    | No optimization                                | Unknown                                             |\n| **Tool output compression**                  | LLM-powered compression (3 templates: EXTRACT, SUMMARIZE, FILTER) before outputs hit cloud model; anti-hallucination + fallback                         | None                                           | Unknown                                             |\n| **MCP tool filtering**                       | Native per-provider\u002Fmodel tool filtering; ApplyPatch swap for GPT-4.1; WebSearch gating; route-based filtering (cloud vs local)                         | None                                           | Tool allowlists per agent                           |\n| **Persistent memory**                        | Cross-session file-based memory (`~\u002F.local\u002Fshare\u002Fopencode\u002Fmemory\u002F`); `memory_persist` tool; types: user\u002Fproject\u002Ffeedback; injected into system prompt   | None                                           | Native                                              |\n| **Session memory**                           | SQLite-backed per-session entries; survive `\u002Fclear` and `\u002Fclear-compact`; `\u002Fmemory_add`, `\u002Fmemory_edit`, `\u002Fmemory_delete`                               | None                                           | Session memory (markdown file, subagent extraction) |\n| **Goal tracking**                            | `\u002Fgoal` command sets autonomous objective; `goal_complete` tool; auto-continuation loop (200-turn cap + token budget); status in prompt                 | None                                           | Native                                              |\n| **Context safety net**                       | 3-tier: tool result budget (50K cap) → MicroCompact (75% threshold) → Context Collapse (97% emergency)                                                  | Basic overflow handling                        | Auto-compact + micro-compact                        |\n| **Sliding window compaction**                | Rolling head summary + verbatim tail; cached per boundary; inflight dedup; configurable threshold\u002Fratio                                                 | Hard truncation                                | Forked subagent compaction                          |\n| **Doom loop detection**                      | Ring-buffer hash detector (configurable threshold); aborts repeated identical tool calls                                                                | None                                           | Unknown                                             |\n| **Snapshot gate**                            | Skips git snapshot track\u002Fpatch when no FS-mutating tool fired; saves IO per non-edit turn                                                               | None                                           | Unknown                                             |\n| **Part coalescer**                           | Batches rapid streaming part updates (300ms window); flushes terminal states immediately; reduces DB writes                                             | None                                           | Unknown                                             |\n| **Parallel tool execution**                  | Safe concurrent read\u002Fglob\u002Fgrep within single LLM round-trip                                                                                             | None                                           | Native                                              |\n| **Swarm (batch parallel subagents)**         | `SwarmTool` — same prompt template dispatched across N items in parallel; foreground or background; bounded concurrency; per-item failure isolation     | None                                           | Native                                              |\n| **Worktree isolation + `\u002Fworktree` command** | `isolation: true` on Task tool + `\u002Fworktree` slash command for user-initiated management (create, list, remove, switch)                                 | Subagent-only (automatic, no user command)     | `--worktree` flag + `isolation: worktree`           |\n| **Global LSP\u002FMCP sharing**                   | Single LSP\u002FMCP instance shared across all agent types; path translation for worktree paths; idle shutdown after 30min                                   | Per-subagent spawn (not shared with worktrees) | Unknown                                             |\n| **Hybrid model routing**                     | Per-task-category model routing + ultrawork override; configurable per provider\u002Fmodel                                                                   | None                                           | Fast mode (single toggle)                           |\n| **Configurable subagent timeout**            | `experimental.subagent_timeout` in config                                                                                                               | Hardcoded                                      | Hardcoded                                           |\n| **Orchestration guardrails**                 | Configurable spawn depth limits, descendant caps, per-model concurrency limiter, doom loop + hard cap                                                   | Basic                                          | Coordinator mode (feature-gated)                    |\n| **`\u002Fclear`**                                 | Clear session messages (keeps session alive)                                                                                                            | None                                           | `\u002Fclear` equivalent                                 |\n| **`\u002Fclear-compact`**                         | Clear + trigger compaction of history                                                                                                                   | None                                           | Native - \u002Fcompact                                   |\n| **`\u002Fbtw`**                                   | Inject context without starting new turn (no LLM call)                                                                                                  | None                                           | Native                                              |\n| **`\u002Fstatus` (improved)**                     | Shows session ID, model, provider, token counts, cost; copyable session ID for debugging                                                                | Basic status                                   | Native                                              |\n| **Per-tool token usage**                     | Streaming token count displayed per tool call during execution                                                                                          | None                                           | None                                                |\n| **`\u002Fconfig`**                                | Shows all merged config key-values in a toast                                                                                                           | None                                           | Part of `\u002Fstatus`                                   |\n| **`\u002Fusage`**                                 | Per-model cost\u002Ftokens\u002Fduration breakdown + subagent costs                                                                                               | None                                           | Part of `\u002Fstatus`                                   |\n| **Read tool safe default**                   | 300-line limit with head+tail summary; prevents context floods                                                                                          | Unbounded                                      | Bounded (configurable)                              |\n| **Session cost tracking**                    | Per-session totals, tiered pricing, streaming token count during execution, cache-aware (no double-count)                                               | Basic                                          | Full cost tracker                                   |\n| **LSP efficiency**                           | Orphan prevention, stale diagnostics cleanup, idle shutdown, nearest-package resolution                                                                 | Accumulates servers                            | LSP with diagnostic registry                        |\n| **Provider lock-in**                         | None — 75+ providers via Vercel AI SDK                                                                                                                  | None (same)                                    | Anthropic-only                                      |\n| **Pricing**                                  | Free\u002FOSS, bring your own keys                                                                                                                           | Free\u002FOSS, bring your own keys                  | $200\u002Fmo subscription or API usage                   |\n\n\u003C\u002Fdetails>\n\n---\n\n## Featured Slash Commands\n\n| Command          | Description                                                |\n| ---------------- | ---------------------------------------------------------- |\n| `\u002Fbtw`           | Inject context without starting a new turn (no LLM call)   |\n| `\u002Fclear`         | Clear session messages                                     |\n| `\u002Fclear-compact` | Clear messages and compact history                         |\n| `\u002Fconfig`        | Show all merged config key-values in toast                 |\n| `\u002Fgoal`          | Set autonomous objective                                   |\n| `\u002Fmemory_add`    | Add session memory entry                                   |\n| `\u002Fmemory_edit`   | Edit existing memory entry                                 |\n| `\u002Fmemory_delete` | Remove memory entry                                        |\n| `\u002Fstatus`        | Session info with copyable session ID, model, cost, tokens |\n| `\u002Fusage`         | Per-model cost\u002Ftokens\u002Fduration + subagent costs            |\n| `\u002Fworktree`      | Manage git worktrees (create, list, remove, switch)        |\n\n---\n\n## Tech Stack\n\n- **Runtime**: Bun 1.3.11\n- **Language**: TypeScript 5.8\n- **Framework**: Effect-ts 4.0.0-beta\n- **TUI**: Solid.js + @opentui\n- **Database**: SQLite + Drizzle\n- **AI**: Vercel AI SDK + 75+ providers\n\n---\n\n## Contributing\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fsdeonvacation\u002Fopencode-x\ncd opencode-x && bun install\nbun run dev                              # TUI\nbun run --cwd packages\u002Fopencode dev      # CLI\nbun --cwd packages\u002Fopencode run build\nbun --cwd packages\u002Fopencode test --timeout 30000\n```\n\nRequires Bun 1.3.11+.\n\n---\n\n## Resources\n\n- **Upstream**: https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode\n- **Docs**: https:\u002F\u002Fopencode.ai\u002Fdocs\n- **Repository**: https:\u002F\u002Fgithub.com\u002Fsdeonvacation\u002Fopencode-x\n\n---\n\n## License\n\nSee [LICENSE](.\u002FLICENSE).\n",2,"2026-06-15 02:30:02","CREATED_QUERY"]