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

opencode2vscode

v0.1.0

Published

Bridge between OpenCode server and VS Code chat (OpenAI-compatible API)

Readme

OpenCode -> VS Code Bridge

Puente Hono entre el servidor HTTP de OpenCode y clientes compatibles con OpenAI Chat Completions.

Instalación

# Instalación global
npm i -g opencode2vscode
# Ejecutar el bridge
opencode2vscode server

# O sin instalar (npx)
npx opencode2vscode server

Uso

# Inicia el bridge (puerto 4097 por defecto)
opencode2vscode server

# Con variables de entorno
PORT=4097 OPENCODE_URL=http://127.0.0.1:4096 opencode2vscode server

Configurar VS Code

Copia chatLanguageModels.json.opencode a tu carpeta de usuario de VS Code:

# Windows
copy chatLanguageModels.json.opencode %APPDATA%\Code\User\chatLanguageModels.json

# Linux/macOS
cp chatLanguageModels.json.opencode ~/.config/Code/User/chatLanguageModels.json

Luego en VS Code: abre el chat (Ctrl+Shift+I) y selecciona el modelo "OpenCode Local".

VS Code
   |
   | POST /v1/chat/completions
   |
Hono bridge :4097
   |
   |-> /v1/models
   |-> SSE streaming
   |-> tool-call events
   |-> OpenCode translation
   |
OpenCode :4096
   |
   |-> sessions
   |-> agents
   |-> files
   |-> shell
   |-> LSP
   |-> MCP
   |-> configured model

Características

| Característica | Descripción | | --- | --- | | API compatible con OpenAI | Expone /v1/chat/completions y /v1/models para clientes compatibles con OpenAI Chat Completions (VS Code, extensiones, etc.) | | Streaming SSE | Respuestas en streaming mediante Server-Sent Events, incluyendo eventos de tool-calls | | Traducción de mensajes | Convierte peticiones OpenAI (roles, tool calls, formatos) al formato nativo de OpenCode | | Gestión de sesiones | Crea, reutiliza, aborta y elimina sesiones de OpenCode (KEEP_SESSIONS para persistirlas) | | Modelos y agentes configurables | DEFAULT_MODEL y DEFAULT_AGENT para fijar el modelo/agente por defecto | | Autenticación | Credenciales OPENCODE_USERNAME / OPENCODE_PASSWORD para el servidor de OpenCode | | Health check | Endpoint /health que reporta el estado del bridge y del servidor OpenCode | | Configuración por entorno | Variables de entorno validadas con Zod (puerto, host, timeouts, etc.) | | Gestión con PM2 | ecosystem.config.cjs lanza servidor y bridge juntos, con autoreinicio y límites de memoria | | Multiplataforma | Resolución automática del binario de OpenCode en Windows (pnpm) y Unix | | TypeScript | Código 100% TypeScript con tipado estricto, ESLint (neostandard) y Prettier |

Publicar en npm

# 1. Verificar que el nombre está disponible
npm view opencode2vscode

# 2. Login en npm (solo la primera vez)
npm login

# 3. Publicar (ejecuta automáticamente lint + typecheck + build)
npm publish

# 4. Verificar la publicación
npm view opencode2vscode version

Probar localmente antes de publicar

# Probar el CLI sin publicar
npx . --help
npx . server

# Probar como instalación global (enlace simbólico)
npm link
opencode2vscode server

Actualizar versión

npm version patch   # 0.1.0 -> 0.1.1
npm version minor   # 0.1.0 -> 0.2.0
npm version major   # 0.1.0 -> 1.0.0
npm publish