npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lux-tech/opencode-ai

v2.3.32

Published

opencodev2 — AI-powered development tool. Community fork of opencode (MCP auto-reconnect, hot reload, eval pipeline, memory consolidation, unified prompt); installs the opencodev2 CLI alongside the official opencode.

Readme

Fork notice — this repository (menoxz/opencode) is a community fork of the official opencode with additional features (MCP auto-reconnect, hot reload, eval pipeline, memory consolidation, unified prompt). It is not affiliated with the official opencode team. See fork differences →

OpenCode Terminal UI


Installation (fork)

The fork is published on npm under the scope @lux-tech and installs its command as opencodev2 — a distinct binary that coexists with the official opencode (installed from opencode-ai). It also keeps its own data/config directories (~/.local/share/opencodev2, ~/.config/opencodev2), so both products can run side by side without touching each other's data. On the first interactive launch, the fork offers to import your existing opencode configuration, API keys and session history — the original installation is left untouched. See coexistence with the official opencode.

Recommended: npm

npm install -g @lux-tech/opencode-ai

Verify:

opencodev2 --version
# 1.18.59 (or the latest published version)

The meta-package @lux-tech/opencode-ai automatically downloads the correct platform binary from one of its 12 optional dependencies (see the platform binaries table) and exposes it as the opencodev2 command.

Alternative: GitHub Releases (manual)

Release archives are published on the releases page as .tar.gz (Linux) and .zip (macOS / Windows). Each archive contains the compiled CLI binary at its root — rename it to opencodev2 when installing manually so it never clashes with the official opencode binary.

# Example: Linux x64
VERSION=v1.18.59
curl -fsSL -o opencode.tar.gz "https://github.com/menoxz/opencode/releases/download/$VERSION/opencode-linux-x64.tar.gz"
tar -xzf opencode.tar.gz
sudo mv opencode /usr/local/bin/opencodev2   # distinct name, no clash with the official binary
# Example: Windows x64 (PowerShell)
$VERSION = "v1.18.59"
Invoke-WebRequest -Uri "https://github.com/menoxz/opencode/releases/download/$VERSION/opencode-windows-x64.zip" -OutFile opencode.zip
Expand-Archive -Path opencode.zip -DestinationPath . -Force
Move-Item .\opencode.exe "$env:LOCALAPPDATA\Microsoft\WindowsApps\opencodev2.exe" -Force

Binary location

| Install method | Binary path | |---|---| | npm (Windows) | %APPDATA%\npm\opencodev2.exe | | npm (Linux / macOS) | $(npm prefix -g)/bin/opencodev2 | | GitHub release (manual) | wherever you placed it |

Update

# Built-in updater (fetches the latest @lux-tech/opencode-ai release)
opencodev2 upgrade

# Or via npm
npm update -g @lux-tech/opencode-ai

Uninstall

npm uninstall -g @lux-tech/opencode-ai

On Windows, also remove the stale shim if npm left one behind:

Remove-Item "$env:APPDATA\npm\opencodev2*" -Force -ErrorAction SilentlyContinue

Coexistence with the official opencode

The fork (@lux-tech/opencode-ai) installs its command as opencodev2, while the official opencode (opencode-ai) installs opencode. The two names never clash, and the fork uses its own data directories (~/.local/share/opencodev2, ~/.config/opencodev2, ~/.local/state/opencodev2, ~/.cache/opencodev2), so both can be installed and used at the same time.

First-run migration wizard

On the first interactive launch, opencodev2 detects whether a previous opencode installation exists (config, API keys, sessions) and asks what to do:

  • Import (recommended) — copies your config, credentials (auth.json) and session history (opencode.db) from the original opencode directories into the opencodev2 directories. The original data is left untouched.
  • Later — starts fresh and asks again at the next launch.
  • Never — starts with empty opencodev2 data (a marker file prevents further prompts).

Headless environments (CI, scripts) can force the behaviour:

OPENCODEV2_MIGRATE=copy opencodev2 ...   # import non-interactively
OPENCODEV2_MIGRATE=skip opencodev2 ...   # skip and mark as decided

The wizard runs only once per data directory (a .migrate-state marker records the decision). After an import, the copied database belongs to opencodev2 — subsequent opencodev2 database migrations never touch the original opencode installation.

Which one should you use?

| Need | Use | |---|---| | MCP auto-reconnect, hot reload, eval pipeline, memory consolidation, unified prompt | This fork (opencodev2) | | The official, widely-validated release | official opencode (opencode) |

Both stay up to date independently:

opencodev2 upgrade        # updates the fork (@lux-tech/opencode-ai)
opencode upgrade          # updates the official opencode (opencode-ai)

Platform binaries

@lux-tech/opencode-ai ships as a meta-package with 12 optional platform binaries (all published at the same version):

| Package | Platform / CPU | Notes | |---|---|---| | @lux-tech/opencode-ai-darwin-arm64 | macOS arm64 | Apple Silicon | | @lux-tech/opencode-ai-darwin-x64 | macOS x64 | Intel | | @lux-tech/opencode-ai-darwin-x64-baseline | macOS x64 | CPUs without AVX2 | | @lux-tech/opencode-ai-linux-arm64 | Linux arm64 | | | @lux-tech/opencode-ai-linux-arm64-musl | Linux arm64 | Alpine / musl | | @lux-tech/opencode-ai-linux-x64 | Linux x64 | | | @lux-tech/opencode-ai-linux-x64-baseline | Linux x64 | CPUs without AVX2 | | @lux-tech/opencode-ai-linux-x64-baseline-musl | Linux x64 | musl, no AVX2 | | @lux-tech/opencode-ai-linux-x64-musl | Linux x64 | Alpine / musl | | @lux-tech/opencode-ai-windows-arm64 | Windows arm64 | | | @lux-tech/opencode-ai-windows-x64 | Windows x64 | | | @lux-tech/opencode-ai-windows-x64-baseline | Windows x64 | CPUs without AVX2 |


Server mode: run headless, attach with the TUI

opencodev2 normally runs the TUI and the harness in one process. To keep a session alive without a TUI — or to watch a running harness from a second terminal — split the two:

opencodev2 serve --port 4096      # headless harness; prints the bound URL
opencodev2 attach http://localhost:4096

serve exposes the harness over HTTP (its API and event stream) and owns the sessions, so it is independent of any client. attach points a full TUI at that server instead of spawning its own: the session you see is the one the server holds, so it outlives the TUI and can be inspected from anywhere the server is reachable.

| Flag (serve) | Effect | |---|---| | --port | port to bind (0 = OS-assigned) | | --hostname | interface to bind (default 127.0.0.1) | | --mdns / --mdns-domain | advertise the server on the local network | | --cors | allowed origins for browser clients |

Serving beyond loopback requires a password (OPENCODE_SERVER_PASSWORD), and serve refuses to start without one.

attach <url> accepts --dir (working directory; a path on the remote server when attaching), --session / --continue / --fork, and --password / --username (Basic auth; default to OPENCODE_SERVER_PASSWORD and OPENCODE_SERVER_USERNAME, or opencode). When nothing is listening on a local URL, attach starts serve on that port for you.

Both commands start the background daemon if it is not already running. For non-interactive or CI use, opencodev2 run --headless drives the same harness as a batch subprocess, and run --attach <url> is its counterpart when the batch client should talk to a server you started yourself.


Agents

OpenCode includes two built-in agents you can switch between with the Tab key.

  • build - Default, full-access agent for development work
  • plan - Read-only agent for analysis and code exploration
    • Denies file edits by default
    • Asks permission before running bash commands
    • Ideal for exploring unfamiliar codebases or planning changes

Also included is a general subagent for complex searches and multistep tasks. This is used internally and can be invoked using @general in messages.

The fork additionally ships a planner agent that auto-decomposes tasks before execution. Learn more about agents in the official docs — behavior is compatible with upstream.


Documentation

  • Fork-specific docs live in this repository: docs/ (architecture, ADRs, hot reload & MCP design) and CHANGELOG.md.
  • General configuration docs are compatible with the official documentation: opencode.ai/docs.

Fork Differences

This fork (menoxz/opencode) adds the following features on top of upstream:

| Feature | Description | |---------|-------------| | MCP Auto-reconnect | MCP servers whose connection dies are detected (transport events + health ping) and reconnected automatically with exponential backoff — no more stale "connected" status or dead sessions | | Hot Reload | Agents, plugins, and MCP servers reload automatically on file change — no restart needed | | Eval Pipeline | SQLite-backed evaluation with regression detection, trend analysis, and compare CLI commands | | Memory Consolidation | Cross-session memory with auto-decay, pattern detection, and post-mortem analysis | | Unified Prompt | Single core.txt replaces 10 model-specific prompts — cleaner, smaller, easier to maintain | | Continuous Improvement | Methods are living documents — update existing skills with changelog instead of creating duplicates | | Planner Integration | Built-in planner agent auto-decomposes tasks before execution | | opencodev2 identity + migration | Installs as opencodev2 with its own data directories, so it coexists with the official opencode; a first-run wizard imports your config, API keys and session history on request |

New features are versioned in CHANGELOG.md.


Contributing

If you're interested in contributing to this fork, please read our contributing docs before submitting a pull request. Pull requests target the dev branch.


Building on OpenCode

If you are working on a project that's related to OpenCode and is using "opencode" as part of its name, for example "opencode-dashboard" or "opencode-mobile", please add a note to your README to clarify that it is not built by the OpenCode team and is not affiliated with us in any way.


Report issues on GitHub Issues · Source github.com/menoxz/opencode