|
| 1 | +<p align="right"> |
| 2 | + 🌐 English · <a href="README.ko.md">한국어</a> |
| 3 | +</p> |
| 4 | + |
1 | 5 | # CommandCode Bridge |
2 | 6 |
|
3 | | -[한국어 README](./README.ko.md) |
| 7 | +<p align="center"> |
| 8 | + <img src="docs/assets/readme/commandcode-bridge-overview.png" alt="CommandCode Bridge architecture overview" width="760"> |
| 9 | +</p> |
| 10 | + |
| 11 | +<p align="center"> |
| 12 | + <strong>OpenAI-compatible gateway for trusted CommandCode deployments.</strong> |
| 13 | +</p> |
| 14 | + |
| 15 | +<p align="center"> |
| 16 | + <a href=".github/workflows/ci.yml"><img src="https://img.shields.io/badge/CI-GitHub%20Actions-5865f2?style=flat-square" alt="CI workflow"></a> |
| 17 | + <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-2ea44f?style=flat-square" alt="MIT License"></a> |
| 18 | + <img src="https://img.shields.io/badge/Node.js-20%2B-5fa04e?style=flat-square" alt="Node.js 20+"> |
| 19 | + <img src="https://img.shields.io/badge/API-OpenAI--compatible-6b7280?style=flat-square" alt="OpenAI-compatible API"> |
| 20 | +</p> |
4 | 21 |
|
5 | 22 | CommandCode Bridge is a trusted-environment HTTP bridge that exposes a small OpenAI-compatible API for a CommandCode account. It lets local, LAN, VPN, or tailnet clients call CommandCode-backed models through standard `/v1/models` and `/v1/chat/completions` endpoints. |
6 | 23 |
|
7 | 24 | > **CommandCode required.** This project is not a public standalone DeepSeek proxy and does not include or repackage CommandCode's CLI bundle. You need the official CommandCode CLI/account environment (`cmd` from the `command-code` npm package) or equivalent CommandCode API credentials. Install/authenticate CommandCode from the official site: <https://commandcode.ai/install>. |
8 | 25 |
|
9 | 26 | > **Status.** Internal/trusted-environment bridge. The upstream CommandCode `/alpha/generate` path behaves like an alpha/internal API and may change. |
10 | 27 |
|
| 28 | +## At a glance |
| 29 | + |
| 30 | +| Area | Summary | |
| 31 | +| --- | --- | |
| 32 | +| API surface | `/health`, `/dashboard`, `/v1/models`, `/v1/chat/completions`, and redacted admin diagnostics. | |
| 33 | +| Core value | OpenAI-compatible clients can use CommandCode-backed models without spawning `cmd` per request. | |
| 34 | +| Routing | Multi-key credential selection with daily-burn, balance-priority, round-robin, and drain-first policies. | |
| 35 | +| Operations | Mobile-first dashboard for bind settings, routing, credentials, model toggles, diagnostics, save, and restart. | |
| 36 | +| Safety boundary | No upstream secrets are bundled; expose only on localhost or a trusted VPN/tailnet/private proxy. | |
| 37 | + |
11 | 38 | ## What this bridge does |
12 | 39 |
|
13 | 40 | - Provides OpenAI-compatible endpoints: |
@@ -625,6 +652,16 @@ ss -ltnp '( sport = :9992 )' |
625 | 652 |
|
626 | 653 | Stop the conflicting process or change `PORT`. |
627 | 654 |
|
| 655 | +## Contributing |
| 656 | +
|
| 657 | +Contributions are welcome when they preserve the bridge's trust boundary: no bundled upstream secrets, no public-internet-by-default exposure, and no CommandCode CLI redistribution. Before opening a change, run: |
| 658 | +
|
| 659 | +```bash |
| 660 | +npm run verify |
| 661 | +``` |
| 662 | +
|
| 663 | +For security-sensitive changes, read `docs/SECURITY.md` first and avoid including credentials, local env files, private topology, or billing details in issues, logs, screenshots, or fixtures. |
| 664 | +
|
628 | 665 | ## Documentation map |
629 | 666 |
|
630 | 667 | - `README.ko.md` — Korean README. |
|
0 commit comments