@legioncodeinc/rflectr 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +4 -1
- package/dist/cli.js.map +1 -0
- package/package.json +4 -1
- package/.markdown-link-check.json +0 -7
- package/AGENTS.md +0 -169
- package/assets/733630021_1421561133353555_3999689754075308337_n.jpg +0 -0
- package/assets/github-home-image.png +0 -0
- package/assets/og-image.jpg +0 -0
- package/assets/og-image.png +0 -0
- package/assets/og-image.psd +0 -0
- package/assets/rflectr-no-bg.png +0 -0
- package/assets/vertex-models.example.json +0 -14
- package/library/README.md +0 -39
- package/library/issues/README.md +0 -46
- package/library/issues/backlog/README.md +0 -26
- package/library/issues/completed/README.md +0 -13
- package/library/issues/in-work/README.md +0 -13
- package/library/knowledge/README.md +0 -34
- package/library/knowledge/private/README.md +0 -40
- package/library/knowledge/private/ai/README.md +0 -8
- package/library/knowledge/private/ai/model-discovery-classification.md +0 -81
- package/library/knowledge/private/ai/translation-layer.md +0 -88
- package/library/knowledge/private/architecture/README.md +0 -10
- package/library/knowledge/private/architecture/launch-flow-claude.md +0 -93
- package/library/knowledge/private/architecture/system-overview.md +0 -108
- package/library/knowledge/private/auth/README.md +0 -9
- package/library/knowledge/private/auth/oauth-device-flows.md +0 -95
- package/library/knowledge/private/data/README.md +0 -8
- package/library/knowledge/private/data/preferences-config.md +0 -87
- package/library/knowledge/private/data/provider-registry.md +0 -126
- package/library/knowledge/private/infrastructure/README.md +0 -7
- package/library/knowledge/private/infrastructure/server-gateway.md +0 -87
- package/library/knowledge/private/integrations/README.md +0 -8
- package/library/knowledge/private/integrations/harnesses.md +0 -87
- package/library/knowledge/private/integrations/local-proxy.md +0 -82
- package/library/knowledge/private/security/README.md +0 -9
- package/library/knowledge/private/security/credential-storage.md +0 -129
- package/library/knowledge/private/standards/documentation-framework.md +0 -154
- package/library/knowledge/public/README.md +0 -49
- package/library/knowledge/public/faqs/README.md +0 -7
- package/library/knowledge/public/faqs/troubleshooting.md +0 -92
- package/library/knowledge/public/guides/README.md +0 -13
- package/library/knowledge/public/guides/ai-agents.md +0 -273
- package/library/knowledge/public/guides/api-server.md +0 -108
- package/library/knowledge/public/guides/claude-desktop.md +0 -382
- package/library/knowledge/public/guides/codex.md +0 -296
- package/library/knowledge/public/guides/gemini-cli.md +0 -105
- package/library/knowledge/public/guides/model-compatibility.md +0 -80
- package/library/knowledge/public/guides/providers.md +0 -90
- package/library/knowledge/public/overview/README.md +0 -7
- package/library/knowledge/public/overview/what-is-rflectr.md +0 -71
- package/library/notes/README.md +0 -21
- package/library/requirements/README.md +0 -51
- package/library/requirements/backlog/README.md +0 -30
- package/library/requirements/completed/README.md +0 -14
- package/library/requirements/completed/prd-001-cli-core-launch-orchestration/prd-001-cli-core-launch-orchestration-index.md +0 -205
- package/library/requirements/completed/prd-001-cli-core-launch-orchestration/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-002-provider-registry/prd-002-provider-registry-index.md +0 -263
- package/library/requirements/completed/prd-002-provider-registry/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-003-model-discovery-classification/prd-003-model-discovery-classification-index.md +0 -260
- package/library/requirements/completed/prd-003-model-discovery-classification/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-004-translation-layer/prd-004-translation-layer-index.md +0 -196
- package/library/requirements/completed/prd-004-translation-layer/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-005-local-proxy-catalog-routing/prd-005-local-proxy-catalog-routing-index.md +0 -176
- package/library/requirements/completed/prd-005-local-proxy-catalog-routing/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-006-credential-storage/prd-006-credential-storage-index.md +0 -190
- package/library/requirements/completed/prd-006-credential-storage/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-007-oauth-device-flows/prd-007-oauth-device-flows-index.md +0 -208
- package/library/requirements/completed/prd-007-oauth-device-flows/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-008-preferences-tiers-favorites/prd-008-preferences-tiers-favorites-index.md +0 -249
- package/library/requirements/completed/prd-008-preferences-tiers-favorites/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-009-codex-integration/prd-009-codex-integration-index.md +0 -212
- package/library/requirements/completed/prd-009-codex-integration/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-010-gemini-cli-integration/prd-010-gemini-cli-integration-index.md +0 -211
- package/library/requirements/completed/prd-010-gemini-cli-integration/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-011-claude-desktop-integration/prd-011-claude-desktop-integration-index.md +0 -228
- package/library/requirements/completed/prd-011-claude-desktop-integration/qa/.gitkeep +0 -0
- package/library/requirements/completed/prd-012-server-gateway/prd-012-server-gateway-index.md +0 -356
- package/library/requirements/completed/prd-012-server-gateway/qa/.gitkeep +0 -0
- package/library/requirements/in-work/README.md +0 -19
- package/library/requirements/reports/README.md +0 -31
- package/scripts/refresh-models-dev-cache.mjs +0 -34
- package/test-proxy.ts +0 -19
- package/test-split.js +0 -1
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# Gemini CLI
|
|
2
|
-
|
|
3
|
-
> Category: Guide | Version: 1.0 | Date: June 2026 | Status: Active · Experimental
|
|
4
|
-
|
|
5
|
-
Use the **Google Gemini CLI** with any model from your rflectr registry — Anthropic, xAI, Google Gemini, Nvidia, DeepSeek, OpenAI, and more.
|
|
6
|
-
|
|
7
|
-
> 🧪 **Experimental.** Gemini CLI integration is newer than the Claude and Codex paths; expect rough edges.
|
|
8
|
-
|
|
9
|
-
| Command | Launches | Config target |
|
|
10
|
-
|---|---|---|
|
|
11
|
-
| `rflectr gemini` | Gemini **terminal** (prompt loop / TUI) | Ephemeral proxy port via environment variables. |
|
|
12
|
-
|
|
13
|
-
It uses the same registry (`~/.rflectr/providers.json`) and provider picker as Claude Code and Codex — Google's native Gemini endpoints when possible, and a local translation proxy for everything else.
|
|
14
|
-
|
|
15
|
-
> 📖 Full flags: `rflectr gemini --help`.
|
|
16
|
-
> 🤖 Automating it? See [AI Agents & automation](ai-agents.md) or run `rflectr --ai`.
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Prerequisites
|
|
21
|
-
|
|
22
|
-
1. **rflectr** on your PATH (`npm install -g @legioncodeinc/rflectr`, or built locally).
|
|
23
|
-
2. **At least one provider:** `rflectr providers add` (or `rflectr providers import`).
|
|
24
|
-
3. **Gemini CLI installed:** `npm install -g @google/gemini-cli`.
|
|
25
|
-
|
|
26
|
-
Registry providers plus OpenCode Zen/Go all route through rflectr's translation layer when they don't natively speak Gemini format.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## How it works
|
|
31
|
-
|
|
32
|
-
The Gemini CLI uses the **Gemini API format** (`POST /v1beta/models/<model>:generateContent`). When you pick a non-Google provider, rflectr spins up a local translation proxy:
|
|
33
|
-
|
|
34
|
-
```mermaid
|
|
35
|
-
flowchart LR
|
|
36
|
-
gemini["Gemini CLI"]
|
|
37
|
-
gemini -->|"Tier 1: Google only"| google["Google directly"]
|
|
38
|
-
gemini -->|"Tier 2: everyone else"| proxy["rflectr proxy<br/>(127.0.0.1)"]
|
|
39
|
-
proxy --> sdk["Vercel AI SDK"]
|
|
40
|
-
sdk --> upstream["Anthropic / xAI / OpenAI / …"]
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Your real API keys stay in rflectr (keychain / registry); the proxy holds them in memory for the session.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Quick start
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
rflectr gemini
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Pick provider → pick model → the Gemini prompt loop opens, pointed at the translation proxy automatically.
|
|
54
|
-
|
|
55
|
-
### Flags
|
|
56
|
-
|
|
57
|
-
| Flag | Purpose |
|
|
58
|
-
|---|---|
|
|
59
|
-
| *(none)* | Interactive launch. |
|
|
60
|
-
| `--trace` | Write debug logs to `~/.rflectr/logs/gemini-proxy-debug.log`. |
|
|
61
|
-
| `--help` | Help text. |
|
|
62
|
-
|
|
63
|
-
rflectr manages `--provider` and `--model`; pass other Gemini CLI flags directly:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
rflectr gemini -p "Analyze this"
|
|
67
|
-
rflectr gemini --provider google --model gemini-2.5-flash -p "Review this file" -o stream-json
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Environment isolation
|
|
71
|
-
|
|
72
|
-
On launch, rflectr builds a clean child environment: it removes conflicting Gemini env vars, points the CLI at the proxy via base-URL discovery, and sets the selected model. When the CLI exits (normal, `Ctrl+C`, or terminal close), your shell is unchanged.
|
|
73
|
-
|
|
74
|
-
### Favorites catalog mode
|
|
75
|
-
|
|
76
|
-
With favorites saved via `rflectr models`, `rflectr gemini` shows your starting model + favorites in the mid-session picker natively.
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Provider routing
|
|
81
|
-
|
|
82
|
-
| Provider | Route | Notes |
|
|
83
|
-
|---|---|---|
|
|
84
|
-
| **Google** | Tier 1 direct | Native Gemini endpoints for best performance. |
|
|
85
|
-
| **Anthropic, xAI, OpenAI, Nvidia, DeepSeek, …** | Tier 2 proxy | Converts Gemini-format requests to each native format via the Vercel AI SDK. |
|
|
86
|
-
| **OpenCode Zen / Go** | Tier 2 proxy | Requires an OpenCode API key. |
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Troubleshooting
|
|
91
|
-
|
|
92
|
-
| Symptom | Fix |
|
|
93
|
-
|---|---|
|
|
94
|
-
| Provider missing in picker | `rflectr providers add` |
|
|
95
|
-
| Model errors / disconnected | `rflectr gemini --trace`, then read `~/.rflectr/logs/gemini-proxy-debug.log` |
|
|
96
|
-
| JSON parse error on first stdout lines (agents) | Add `-o stream-json` or `-o json` |
|
|
97
|
-
|
|
98
|
-
**Known limitation:** the model name in the top-right of the Gemini CLI UI does not refresh after a mid-session `.model` switch. This is a Gemini CLI UI limitation, not a routing problem — the new model is active.
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Related guides
|
|
103
|
-
|
|
104
|
-
- [AI Agents & automation](ai-agents.md) · [Providers](providers.md) · [Troubleshooting](../faqs/troubleshooting.md)
|
|
105
|
-
- [Gemini CLI on npm](https://www.npmjs.com/package/@google/gemini-cli)
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Model Compatibility
|
|
2
|
-
|
|
3
|
-
> Category: Guide | Version: 1.0 | Date: June 2026 | Status: Active
|
|
4
|
-
|
|
5
|
-
Why some models don't appear in the picker, and how rflectr decides what to show. By default rflectr shows every model a provider's live API returns — models are hidden **only when there's a specific reason** (they can't run a coding agent, or a free promo ended).
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## The two filters
|
|
10
|
-
|
|
11
|
-
```mermaid
|
|
12
|
-
flowchart TD
|
|
13
|
-
api["Live provider API model list"] --> bl{"In curated blacklist?"}
|
|
14
|
-
bl -->|yes| hide["Hidden"]
|
|
15
|
-
bl -->|no| cap{"In models.dev catalog<br/>and unfit for coding agents?"}
|
|
16
|
-
cap -->|yes| hide
|
|
17
|
-
cap -->|no| show["Shown in picker"]
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
1. **Curated blacklist** — `src/data/model-incompatible.json`. Researched entries, each with a provider, model id, category, reason, and sources.
|
|
21
|
-
2. **models.dev capabilities** — a bundled full snapshot in `src/data/models-dev-cache.json` (~2 MB, all providers). When a model exists in that catalog, rflectr may auto-hide it if it can't support coding agents (no text output, `tool_call: false`, etc.). **Missing catalog data never hides a model.**
|
|
22
|
-
|
|
23
|
-
**Offline / blocked network:** the bundled snapshot is always used when `~/.rflectr/models-dev-cache.json` is missing or a fetch fails. **On launch:** rflectr refreshes from `https://models.dev/api.json` in the background (non-blocking); the next compatibility check uses the updated file.
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Google Gemini (raw API)
|
|
28
|
-
|
|
29
|
-
Google's `GET /v1/models` returns **many non-chat models** (Imagen, Veo, embeddings, TTS, robotics, …), and models.dev only catalogs a subset. So rflectr also keeps explicit `provider: google` entries in the blacklist for non-coding ids verified on the live API list. After `rflectr providers refresh-models`, if new non-coding ids appear, they should be added to the blacklist rather than matched by name patterns.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## "Why don't I see model X?"
|
|
34
|
-
|
|
35
|
-
| Likely cause | What to do |
|
|
36
|
-
|---|---|
|
|
37
|
-
| It's a non-coding model (image/video/embedding/TTS). | Expected — those are filtered out. |
|
|
38
|
-
| Its free promotion ended (stale id still returned by the API). | Expected — hidden via a `"*"` blacklist entry. |
|
|
39
|
-
| Your model list is stale. | `rflectr providers refresh-models [provider]`. |
|
|
40
|
-
| You think it's hidden by mistake. | Run with `--trace` where supported — hidden models log via `hideReason()`. |
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Maintainers
|
|
45
|
-
|
|
46
|
-
### Add a blacklist entry
|
|
47
|
-
|
|
48
|
-
Edit `src/data/model-incompatible.json`:
|
|
49
|
-
|
|
50
|
-
```json
|
|
51
|
-
{
|
|
52
|
-
"provider": "google",
|
|
53
|
-
"modelId": "example-bad-model",
|
|
54
|
-
"category": "managed_agent",
|
|
55
|
-
"reason": "Plain English explanation",
|
|
56
|
-
"sources": ["https://…"],
|
|
57
|
-
"verifiedAt": "2026-06-10"
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
- Use `"provider": "*"` to hide a model id for **every** provider (stale promos, deprecated ids).
|
|
62
|
-
- Optional `"agents": ["codex", "codex-app"]` limits hiding to specific launch surfaces.
|
|
63
|
-
|
|
64
|
-
Rebuild after changes: `npm run build`.
|
|
65
|
-
|
|
66
|
-
### Refresh the bundled snapshot
|
|
67
|
-
|
|
68
|
-
Before a release (or when models.dev changes materially):
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
npm run refresh:models-dev
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
This commits an updated `src/data/models-dev-cache.json` for offline installs. The user cache path is `~/.rflectr/models-dev-cache.json`, written automatically on launch when the network allows.
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Related guides
|
|
79
|
-
|
|
80
|
-
- [Providers](providers.md) · [Troubleshooting](../faqs/troubleshooting.md)
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
# Providers
|
|
2
|
-
|
|
3
|
-
> Category: Guide | Version: 1.0 | Date: June 2026 | Status: Active
|
|
4
|
-
|
|
5
|
-
Every provider rflectr can launch, the base URL each uses, and the gotchas worth knowing before you add one. New to rflectr? Start with [What is rflectr?](../overview/what-is-rflectr.md)
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## How the registry works
|
|
10
|
-
|
|
11
|
-
`rflectr` stores your providers and cached model lists in a **native provider registry** at `~/.rflectr/providers.json`. API keys are kept in your **OS keychain**, never in that file. Add a provider with:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
rflectr providers add # pick a template, paste a key
|
|
15
|
-
rflectr providers import # one-time import from an existing OpenCode setup
|
|
16
|
-
rflectr providers list # see what's configured
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
When you add a provider, rflectr picks the correct endpoint format (`@ai-sdk/openai-compatible` vs a provider-specific SDK) and fetches the available models automatically.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Built-in cloud backends
|
|
24
|
-
|
|
25
|
-
These are always available with an `OPENCODE_API_KEY` — they don't need to be added to the registry.
|
|
26
|
-
|
|
27
|
-
| id | Description |
|
|
28
|
-
|---|---|
|
|
29
|
-
| `zen` | OpenCode Zen — free and paid models. |
|
|
30
|
-
| `go` | OpenCode Go — paid models. |
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Hosted providers
|
|
35
|
-
|
|
36
|
-
| Provider | Base URL | Notes |
|
|
37
|
-
|---|---|---|
|
|
38
|
-
| **Anthropic** | `https://api.anthropic.com` | Official Claude API. Recommended for standard Claude access. |
|
|
39
|
-
| **OpenAI** | `https://api.openai.com/v1` | GPT, o-series reasoning models, and Codex. |
|
|
40
|
-
| **Google Gemini** | `https://generativelanguage.googleapis.com/v1beta/openai` | Official Gemini API. |
|
|
41
|
-
| **Groq** | `https://api.groq.com/openai/v1` | Ultra-fast inference for open-weight models (Llama, Mixtral). |
|
|
42
|
-
| **Mistral** | `https://api.mistral.ai/v1` | ⚠️ Free tier has strict rate limits (HTTP 429) — tool-heavy sessions burn quota fast. |
|
|
43
|
-
| **Together AI** | `https://api.together.xyz/v1` | Train, fine-tune, and run open-source models. |
|
|
44
|
-
| **Cerebras** | `https://api.cerebras.ai/v1` | High-speed inference on wafer-scale chips. |
|
|
45
|
-
| **DeepInfra** | `https://api.deepinfra.com/v1/openai` | Serverless inference for open-source models. |
|
|
46
|
-
| **DeepSeek** | `https://api.deepseek.com/v1` | DeepSeek coding and chat models. |
|
|
47
|
-
| **Zhipu AI (GLM)** | `https://open.bigmodel.cn/api/paas/v4` | The GLM model family. |
|
|
48
|
-
| **Alibaba DashScope** | `https://dashscope.aliyuncs.com/compatible-mode/v1` | Qwen and other models. |
|
|
49
|
-
| **xAI** | `https://api.x.ai/v1` | Grok models. Supports OAuth — see [Codex § OAuth](codex.md#oauth). |
|
|
50
|
-
| **Perplexity** | `https://api.perplexity.ai` | Perplexity's online Sonar models. |
|
|
51
|
-
| **Cohere** | `https://api.cohere.com/compatibility/v1` | Command models. |
|
|
52
|
-
| **OpenRouter** | `https://openrouter.ai/api/v1` | Unified proxy to dozens of models. |
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Local models (Ollama & LM Studio)
|
|
57
|
-
|
|
58
|
-
Connect to a locally running inference engine. When you add one, rflectr prompts for your local URL (e.g. `http://127.0.0.1:11434/v1`). You can leave the API key blank — local engines generally don't require auth.
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## The Moonshot / Kimi confusion
|
|
63
|
-
|
|
64
|
-
Moonshot AI split its product into **three separate platforms**. They all use the "Kimi" name but have **different billing, different base URLs, and non-interchangeable API keys**. Using the wrong template for your key gives a `401 Invalid Authentication` / `Incorrect API key` error.
|
|
65
|
-
|
|
66
|
-
| Platform | For | Base URL | Key from |
|
|
67
|
-
|---|---|---|---|
|
|
68
|
-
| **Moonshot (Kimi)** | China domestic, pay-as-you-go | `https://api.moonshot.cn/v1` | `platform.moonshot.cn` |
|
|
69
|
-
| **Moonshot Global (kimi.ai)** | International, pay-as-you-go | `https://api.moonshot.ai/v1` | `platform.kimi.ai` |
|
|
70
|
-
| **Kimi Code** | Monthly coding subscription | `https://api.kimi.com/coding/v1` | `kimi.com/code/console` |
|
|
71
|
-
|
|
72
|
-
> 💡 The **Global** platform also grants `kimi-k2.7-code` directly through the standard API — no separate coding subscription needed. If your key is from `platform.kimi.ai`, pick **Moonshot Global**.
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Advanced / not directly addable
|
|
77
|
-
|
|
78
|
-
These need credentials beyond a simple API key, so they aren't in the `add` template list:
|
|
79
|
-
|
|
80
|
-
| Provider | How to use |
|
|
81
|
-
|---|---|
|
|
82
|
-
| **Amazon Bedrock** | Needs AWS credentials. Configure in OpenCode, then `rflectr providers import`. |
|
|
83
|
-
| **Azure OpenAI** | Needs per-model deployment URLs. Configure in OpenCode, then import. |
|
|
84
|
-
| **Google Vertex AI** | Handled via `gcloud` Application Default Credentials through `rflectr server --vertex` — no registry key required. See [API Server § Vertex](api-server.md). |
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Related guides
|
|
89
|
-
|
|
90
|
-
- [What is rflectr?](../overview/what-is-rflectr.md) · [Model compatibility](model-compatibility.md) · [Troubleshooting](../faqs/troubleshooting.md)
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# What is rflectr?
|
|
2
|
-
|
|
3
|
-
> Category: Overview | Version: 1.0 | Date: June 2026 | Status: Active
|
|
4
|
-
|
|
5
|
-
**rflectr** — *point your coding agents at any model.* Launch Claude Code, OpenAI Codex, Google Gemini CLI, and the Claude / Codex desktop apps against whatever model you want — OpenCode Zen & Go, or your own provider keys (Groq, Mistral, OpenAI, Gemini, DeepSeek, xAI, Ollama, and more) — without touching the host tool's own settings.
|
|
6
|
-
|
|
7
|
-
Built by [Legion Code Inc.](https://github.com/legioncodeinc) · `npm install -g @legioncodeinc/rflectr`
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## The one-paragraph version
|
|
12
|
-
|
|
13
|
-
Every major AI coding tool talks only to its vendor's API out of the box. rflectr sits in front of them: you pick a provider and model from an interactive wizard, and rflectr launches the tool with an environment (or a translating local proxy) that makes it believe it's talking to its native API. Run Claude Code on a Groq Llama model, Codex on DeepSeek, or Gemini CLI on a local Ollama endpoint — same tools, any backend.
|
|
14
|
-
|
|
15
|
-
```mermaid
|
|
16
|
-
flowchart LR
|
|
17
|
-
you["You pick<br/>provider + model"] --> rflectr["rflectr"]
|
|
18
|
-
rflectr --> cc["Claude Code"]
|
|
19
|
-
rflectr --> cx["Codex CLI / app"]
|
|
20
|
-
rflectr --> gm["Gemini CLI"]
|
|
21
|
-
rflectr --> cd["Claude Desktop"]
|
|
22
|
-
cc & cx & gm & cd --> any["Any model backend<br/>(Zen/Go, Groq, OpenAI, Gemini, Ollama, …)"]
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## What you can launch
|
|
28
|
-
|
|
29
|
-
| Command | Launches | Guide |
|
|
30
|
-
|---|---|---|
|
|
31
|
-
| `rflectr claude` | Claude Code CLI | (interactive — start here) |
|
|
32
|
-
| `rflectr codex` / `codex-app` | OpenAI Codex CLI / desktop app | [Codex](../guides/codex.md) |
|
|
33
|
-
| `rflectr gemini` | Google Gemini CLI | [Gemini CLI](../guides/gemini-cli.md) |
|
|
34
|
-
| `rflectr claude-app` | Claude Desktop (Cowork + Code) | [Claude Desktop](../guides/claude-desktop.md) |
|
|
35
|
-
| `rflectr server` | Local API gateway (Anthropic + OpenAI compatible) | [API Server](../guides/api-server.md) |
|
|
36
|
-
| `rflectr providers` | Manage your provider registry | [Providers](../guides/providers.md) |
|
|
37
|
-
| `rflectr models` | Pick favorites for mid-session `/model` switching | — |
|
|
38
|
-
| `rflectr --ai` | Machine-readable reference for scripts & agents | [AI Agents](../guides/ai-agents.md) |
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## How it works, in three ideas
|
|
43
|
-
|
|
44
|
-
1. **A provider registry.** Your providers and their models live in `~/.rflectr/providers.json`; secrets live in your OS keychain, never in the file. Add providers with `rflectr providers add` or import them from OpenCode once. See [Providers](../guides/providers.md).
|
|
45
|
-
|
|
46
|
-
2. **A single translation layer.** Anything that isn't natively Anthropic is routed through one path — the Vercel AI SDK — so the host tool's wire format is translated to and from your chosen model. There's no per-provider hand-rolled translator. See [Model compatibility](../guides/model-compatibility.md).
|
|
47
|
-
|
|
48
|
-
3. **No settings-file surgery.** rflectr launches the host with a purpose-built environment and a throwaway local proxy on `127.0.0.1`. The two desktop apps are the exception — their config is patched, backed up, and restored on exit.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Glossary
|
|
53
|
-
|
|
54
|
-
| Term | Meaning |
|
|
55
|
-
|---|---|
|
|
56
|
-
| **Provider** | A source of models — `groq`, `openai`, `zen`, `go`, a local Ollama, etc. |
|
|
57
|
-
| **Registry** | Your saved providers + cached model lists, at `~/.rflectr/providers.json`. |
|
|
58
|
-
| **Zen / Go** | OpenCode's cloud backends. Always available with an `OPENCODE_API_KEY`. |
|
|
59
|
-
| **Proxy** | The local `127.0.0.1` server rflectr starts to translate wire formats. |
|
|
60
|
-
| **Favorites** | Up to 20 models saved with `rflectr models` for live `/model` switching. |
|
|
61
|
-
| **Boot flags** | `--provider` / `--model` — skip the wizard for scripts and CI. |
|
|
62
|
-
| **Gateway** | The `rflectr server` long-lived endpoint, used by Claude Desktop. |
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Where to go next
|
|
67
|
-
|
|
68
|
-
- **Just want to use it?** Run `rflectr providers add`, then `rflectr claude`.
|
|
69
|
-
- **Set up a specific tool:** [Codex](../guides/codex.md) · [Gemini CLI](../guides/gemini-cli.md) · [Claude Desktop](../guides/claude-desktop.md) · [API Server](../guides/api-server.md)
|
|
70
|
-
- **Automating / scripting:** [AI Agents & automation](../guides/ai-agents.md)
|
|
71
|
-
- **Something's wrong:** [Troubleshooting](../faqs/troubleshooting.md)
|
package/library/notes/README.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
ai_description: |
|
|
3
|
-
HUMAN-ONLY junk drawer. Agents MUST NOT read from, write to, create
|
|
4
|
-
files in, or reference files in this folder for any purpose.
|
|
5
|
-
If you want to capture something persistent, write to
|
|
6
|
-
library/knowledge/private/<domain>/<slug>.md instead.
|
|
7
|
-
This invariant is absolute and has no exceptions.
|
|
8
|
-
human_description: |
|
|
9
|
-
Unstructured scratch space for humans. Agents do not touch this folder.
|
|
10
|
-
Put anything here: rough notes, links, half-formed ideas, meeting notes.
|
|
11
|
-
Nothing in notes/ is authoritative or maintained.
|
|
12
|
-
For persistent reference, move content to knowledge/private/ when it matures.
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Notes
|
|
16
|
-
|
|
17
|
-
Human-only scratch space. Agents never read or write here.
|
|
18
|
-
|
|
19
|
-
Put rough notes, links, and half-formed ideas here. Nothing here is authoritative.
|
|
20
|
-
|
|
21
|
-
When a note matures into reference material, move it to `knowledge/private/<domain>/`.
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
ai_description: |
|
|
3
|
-
This folder contains all planned product and feature work (PRDs).
|
|
4
|
-
Sub-folders: backlog/ (queued, not started), in-work/ (actively
|
|
5
|
-
being implemented), completed/ (shipped), reports/ (routine code scans).
|
|
6
|
-
Lifecycle = location: move entire PRD folders between states.
|
|
7
|
-
PRD folder naming: prd-<###>-<kebab-slug>/
|
|
8
|
-
PRD numbers are repo-local sequential. Take max+1 from all prd-* folders
|
|
9
|
-
across backlog/, in-work/, and completed/.
|
|
10
|
-
Never write PRD content outside of a prd-<###>-<slug>/ folder.
|
|
11
|
-
Do NOT put IRDs here — those go in issues/ (peer of requirements/).
|
|
12
|
-
human_description: |
|
|
13
|
-
Product and feature work (PRDs) organized by lifecycle stage.
|
|
14
|
-
- backlog/: planned work not yet started
|
|
15
|
-
- in-work/: currently being implemented
|
|
16
|
-
- completed/: shipped work (move entire folder here when done)
|
|
17
|
-
- reports/: routine code-scan and QA reports not tied to a specific PRD
|
|
18
|
-
To start a new PRD: create prd-<###>-<slug>/ in backlog/ with an index.md.
|
|
19
|
-
To move lifecycle: move the entire prd-<###>-<slug>/ folder.
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
# Requirements
|
|
23
|
-
|
|
24
|
-
Product and feature work, organized by lifecycle state.
|
|
25
|
-
|
|
26
|
-
## Sub-folders
|
|
27
|
-
|
|
28
|
-
| Folder | State | Description |
|
|
29
|
-
|---|---|---|
|
|
30
|
-
| `backlog/` | Queued | PRDs planned but not yet started |
|
|
31
|
-
| `in-work/` | Active | PRDs currently being implemented |
|
|
32
|
-
| `completed/` | Shipped | Entire PRD folder moves here when work ships |
|
|
33
|
-
| `reports/` | Evergreen | Routine code-scan and QA reports not tied to a PRD |
|
|
34
|
-
|
|
35
|
-
## PRD folder structure
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
prd-007-user-export/
|
|
39
|
-
prd-007-user-export-index.md module overview + feature list
|
|
40
|
-
prd-007a-user-export-backend.md sub-feature a
|
|
41
|
-
prd-007b-user-export-ui.md sub-feature b
|
|
42
|
-
qa/
|
|
43
|
-
prd-007-user-export-qa.md QA audit (written by quality-guardian)
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Naming
|
|
47
|
-
|
|
48
|
-
- Folder: `prd-<###>-<kebab-slug>/` (3-digit zero-padded)
|
|
49
|
-
- Index: `prd-<###>-<kebab-slug>-index.md`
|
|
50
|
-
- Sub-PRDs: `prd-<###><letter>-<kebab-slug>-<feature>.md`
|
|
51
|
-
- PRD numbers are **repo-local sequential** — not GitHub issue numbers.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
ai_description: |
|
|
3
|
-
Contains PRD folders planned but not yet started. This is where
|
|
4
|
-
library-guardian creates new PRD folders on "write a PRD for X".
|
|
5
|
-
PRD folder naming: prd-<###>-<kebab-slug>/ (3-digit zero-padded).
|
|
6
|
-
PRD number: take max+1 from all prd-* folders across backlog/,
|
|
7
|
-
in-work/, and completed/ in this repo.
|
|
8
|
-
Each PRD folder must contain: prd-<###>-<slug>-index.md (always),
|
|
9
|
-
prd-<###><letter>-<slug>-<feature>.md (one per sub-feature, optional),
|
|
10
|
-
qa/ subfolder (empty on creation; quality-guardian writes QA reports here).
|
|
11
|
-
Move entire folder to in-work/ when implementation begins.
|
|
12
|
-
human_description: |
|
|
13
|
-
PRDs planned but not yet started. Create new PRDs here.
|
|
14
|
-
- Naming: prd-007-feature-name/ with prd-007-feature-name-index.md inside
|
|
15
|
-
- Sub-features: prd-007a-feature-name-backend.md, prd-007b-feature-name-ui.md
|
|
16
|
-
- QA folder: qa/prd-007-feature-name-qa.md (created by quality-guardian)
|
|
17
|
-
Move to in-work/ when implementation begins.
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
# Requirements — Backlog
|
|
21
|
-
|
|
22
|
-
Planned PRDs not yet in implementation. All new PRD folders are created here.
|
|
23
|
-
|
|
24
|
-
## Creating a new PRD
|
|
25
|
-
|
|
26
|
-
1. Find `max_n` across `backlog/prd-*/`, `in-work/prd-*/`, `completed/prd-*/`.
|
|
27
|
-
2. Create `prd-<max_n + 1>-<kebab-slug>/`.
|
|
28
|
-
3. Create `prd-<###>-<slug>-index.md` (module overview + feature list).
|
|
29
|
-
4. Create `qa/` subfolder (empty; `quality-guardian` writes reports here).
|
|
30
|
-
5. Add sub-PRDs `prd-<###>a-<slug>-<feature>.md` etc. as needed.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
ai_description: |
|
|
3
|
-
Contains shipped PRD folders. Entire prd-<###>-<slug>/ folders move
|
|
4
|
-
here from in-work/ when the work ships. Read-only after landing here —
|
|
5
|
-
do NOT edit or move files out of completed/.
|
|
6
|
-
The PRD index, sub-PRDs, and qa/ sub-folder all travel together.
|
|
7
|
-
human_description: |
|
|
8
|
-
Shipped PRD folders. Move entire prd-NNN-slug/ here from in-work/ when
|
|
9
|
-
the feature ships. Read-only — do not edit completed PRDs.
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Requirements — Completed
|
|
13
|
-
|
|
14
|
-
Shipped PRD folders. Entire `prd-<###>-<slug>/` folders land here after the work ships and is confirmed in production. Do not edit files here after landing.
|