Skip to content

feat(registry): Add cliproxy plugin#118

Draft
kdcokenny wants to merge 1 commit intomainfrom
feat/cliproxy-plugin
Draft

feat(registry): Add cliproxy plugin#118
kdcokenny wants to merge 1 commit intomainfrom
feat/cliproxy-plugin

Conversation

@kdcokenny
Copy link
Owner

@kdcokenny kdcokenny commented Jan 31, 2026

Summary

Adds the cliproxy plugin to OCX Kit registry for CLIProxyAPI integration.

Features

  • MCP-style credential resolution: Supports raw strings, {env:VAR}, and {file:PATH}
  • Auto model discovery: Queries proxy API for available models
  • Multi-provider support: Injects anthropic, google, and openai providers
  • Flexible auth: API key optional for unsecured local proxies
  • Fail fast: Throws on malformed JSONC config

Config Example

{
  "url": "http://localhost:8317",
  "apiKey": "{env:CLIPROXY_API_KEY}",
  "prefix": "cliproxy"
}

Usage

  1. Install: ocx add kit/cliproxy
  2. Create config: .opencode/cliproxy.jsonc
  3. Set env var: export CLIPROXY_API_KEY=your-key
  4. Start OpenCode - providers appear automatically

Files Changed

  • workers/ocx-kit/files/plugin/cliproxy.ts - Main plugin
  • workers/ocx-kit/files/plugin/cliproxy.jsonc - Config template
  • workers/ocx-kit/registry.jsonc - Registry entry

Summary by cubic

Adds the cliproxy plugin to OCX Kit for CLIProxyAPI integration, with automatic model discovery and provider injection. Enables flexible credentials and simple setup for local or secured proxies.

  • New Features

    • MCP-style credentials: raw, {env:VAR}, {file:PATH}; API key optional
    • Auto-discovers models and injects Anthropic, Google, and OpenAI providers
    • Config loader reads from project/global paths and fails fast on malformed JSONC
    • Adds registry entry and a config template
  • Migration

    • Install: ocx add kit/cliproxy
    • Create .opencode/cliproxy.jsonc and set url/apiKey as needed
    • Restart OpenCode to load providers

Written for commit 6321c3a. Summary will update on new commits.

- Add cliproxy plugin for CLIProxyAPI integration
- Support flexible credential sources: raw string, {env:VAR}, {file:PATH}
- Auto-discover models from proxy API
- Inject providers via config hook (anthropic, google, openai)
- Allow empty API key for unsecured local proxies
- Fail fast on malformed JSONC config
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 31, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ocx-kit 6321c3a Commit Preview URL

Branch Preview URL
Jan 31 2026, 11:56 AM

@kdcokenny kdcokenny changed the title feat(ocx-kit): add cliproxy plugin feat(registry): Add cliproxy plugin Jan 31, 2026
@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.05%. Comparing base (9e72ac9) to head (6321c3a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #118   +/-   ##
=======================================
  Coverage   48.05%   48.05%           
=======================================
  Files          46       46           
  Lines        4903     4903           
=======================================
  Hits         2356     2356           
  Misses       2547     2547           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant