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

@koreanhole/opencodex

v3.2.32

Published

Full opencodex runtime with Cline 2.2.0+ JSON and Gemini CLI headless provider adapters

Readme

opencodex: full upstream runtime + Cline JSON and Gemini CLI headless adapters

This distribution keeps the complete original @bitkyc08/opencodex runtime and adds locally installed Cline CLI and Gemini CLI as model providers. Cline turns use the CLI's one-shot --json mode after a runtime --help capability check and support both the Cline 2.2.0 raw-message contract and the current structured contract; Gemini turns use the CLI's one-shot -p stream-json mode.

The original package is an exact npm dependency. This repository does not copy, patch, delete, or rewrite upstream source files. The ocx entrypoint loads the original CLI in-process and attaches the two CLI adapters through a loopback Responses gateway.

Install

npm install -g @koreanhole/opencodex

That single package installs the pinned upstream runtime as a normal dependency. Do not install the original package separately and do not clone either project just to run this distribution.

Vendor prerequisites remain separate:

npm install -g cline
cline auth

npm install -g @google/gemini-cli
gemini

Gemini headless turns support an explicit Gemini Developer API key, Vertex AI GenAI configuration, or the operator's existing Gemini CLI OAuth login. opencodex does not automate Google OAuth. OAuth reuse requires an account and tier eligible for the installed Gemini CLI's service. Explicit environment configuration takes precedence, then the vendor's selected authentication method; a vendor-selected API-key login uses its .env, while an OAuth selection keeps OAuth-only behavior. Without a readable vendor selection, the previous OAuth-first fallback applies, including logins stored in the vendor keychain or under a custom GEMINI_CLI_HOME. Linux keyring access and the vendor encrypted credential file are preserved for isolated OAuth turns.

Vertex AI (enterprise)

Select Vertex AI in the vendor settings and authenticate with Application Default Credentials:

{
  "security": {
    "auth": {
      "selectedType": "vertex-ai"
    }
  }
}
gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT="your-project"
export GOOGLE_CLOUD_LOCATION="us-central1"
# Optional: use a service-account ADC file instead of the gcloud login.
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/adc.json"

opencodex mirrors the vendor vertex-ai selection into its isolated Gemini settings, forwards those three variables unchanged, and adds neither GOOGLE_GENAI_USE_GCA nor encrypted-storage forcing. Gemini CLI's oauth_creds.json is not used in this mode; an existing cached OAuth login does not override the Vertex selection.

Cline 2.2.0 is the minimum supported release. Newer options are used only when the installed binary advertises them.

Start

ocx provider add gemini-cli --set-default
ocx provider add cline-cli
ocx start

The original opencodex commands, dashboard, client integrations, account and model management, service lifecycle, and restore behavior remain available through the same ocx command.

The managed provider rows appear as gemini-cli/... and cline-cli/.... Cline does not require ACP: it exposes a stable default selector that follows the model already selected in Cline, while Cline model turns use the installed CLI's JSON transport across the 2.2.0 and current output contracts. Explicit ocx login cline-cli delegates to the vendor cline auth command. Gemini runtime model discovery uses the installed CLI's ACP session, while reasoning metadata and model turns use the installed CLI's headless transport. Parent-declared tools are exposed through a request-scoped capture MCP server.

Commands

Adapter-specific compatibility commands:

ocx login cline-cli [--json] [--no-wait]
ocx provider add <cline-cli|gemini-cli> [--set-default]
ocx provider use <cline-cli|gemini-cli>
ocx provider list [--json]
ocx adapter detach

All other commands are delegated to the immutable upstream CLI. Examples:

ocx start
ocx status
ocx stop
ocx restore
ocx sync
ocx service install
ocx gui
ocx doctor

ocx adapter detach removes only the two managed provider rows or restores their previous values from the mode-0600 journal.

Upstream updates

The dependency is pinned exactly:

{
  "@bitkyc08/opencodex": "2.94.0"
}

To adopt an upstream release:

  1. Change only the exact dependency version and refresh the lockfile.
  2. Run bun run verify:upstream.
  3. Run bun run typecheck, bun test tests, bun run test:e2e, and bun run test:e2e:gemini.
  4. Accept the update only when every gate passes.

No patch series or upstream source tree is maintained in this repository.

ocx update and ocx system update are owned by this distribution because the upstream updater is hardcoded to the original package name. They install the selected release of this fork:

ocx update
ocx update --tag preview
ocx update --json

Restart any running ocx process after an update. Automatic upstream update checks are disabled for the delegated runtime.

Release

After every required verification and live E2E gate passes, bump the package to the next semver patch version, commit and push main, then publish:

npm publish --access public

Never force-publish or reuse an already published version. If any gate is missing, failing, or blocked, stop before commit, push, or publish and report the blocker.

Security boundary

  • Cline does not receive filesystem or terminal capability from the proxy.
  • Cline runs with request-scoped, mode-0600 settings. Its built-in tools, user MCP servers, hooks, plugins, telemetry, updates, and self-approval are disabled. Modern provider state and legacy global/secrets state are copied privately; the originals are never modified. No Cline runtime path requires ACP. Its turn options are used only after the installed binary's --help output advertises them.
  • Gemini headless turns run in a request-scoped workspace with GEMINI_CLI_TRUST_WORKSPACE=true, --skip-trust, and --approval-mode auto_edit, but the generated isolated Gemini home settings scope tools.core to mcp_opencodex_* and expose only the request-scoped capture MCP server. No built-in, file-edit, shell, network, user-MCP, extension, skill, or hook tool executes; yolo remains disabled.
  • Gemini JSON schema instructions are prompt-only: a schema already present in the client's system/developer instructions is accompanied by a JSON-only and pre-response validation contract. The adapter does not parse, repair, or reject the model's JSON.
  • Cline tool intent is returned to Codex for approval and execution.
  • Gemini tool intent is returned to Codex through the capture-only MCP server; the parent agent performs approval and execution.
  • Vendor credentials stay in vendor homes or authenticated environments. The proxy does not store or log vendor tokens.
  • The adapter gateway binds 127.0.0.1 only and uses a per-run bearer token.
  • Request bodies, API keys, bearer tokens, and full vendor diagnostics are never logged.

Tests

bun run verify:upstream
bun run typecheck
bun test tests
bun run test:e2e
bun run test:e2e:cline-live
bun run test:e2e:gemini
bun run test:e2e:gemini-oauth-only
bun run test:e2e:gemini-slow
bun run test:e2e:gemini-parent-tool
bun run privacy:scan
bun run structure:check

test:e2e:gemini starts the original runtime and the adapter gateway, then uses a real Codex client and a real authenticated Gemini CLI. It runs both the minimal completion and a 12-second pre-event slow-start regression. It fails, not skips, on a missing binary, authentication, Flash Lite model, response marker, timeout, or child cleanup assertion. test:e2e:gemini-slow runs only the slow-start case.

test:e2e exercises the Cline 2.2.0-compatible contract through the real HTTP server. test:e2e:cline-live additionally requires the installed Cline CLI and its existing authentication, and fails rather than skipping on a missing binary, response marker, or cleanup assertion.

Optional overrides are CLINE_BIN_PATH, GEMINI_BIN_PATH, and CODEX_BIN_PATH.