# AI use cases for Opengrok (OnlyTerp/opengrok)

Repo: [OnlyTerp/opengrok](https://github.com/OnlyTerp/opengrok) | Use cases: 4 | Page: https://dedupedai.com/use-cases/onlyterp-opengrok/

opengrok is a config sidecar that lets an existing Grok Bot install use other AI models through a model picker, provider wire maps, and a health doctor.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Bind non-Grok models to Grok Bot agents: https://dedupedai.com/use-cases/onlyterp-opengrok/bind-other-models-to-grok-bot-agents/
- Swap models mid-chat from the LiquidGlass panel: https://dedupedai.com/use-cases/onlyterp-opengrok/switch-models-mid-chat-in-grok-bot/
- Keep model bindings working after Grok Bot updates: https://dedupedai.com/use-cases/onlyterp-opengrok/keep-grok-bot-setup-working-after-updates/
- Add a new model provider with a wire capture: https://dedupedai.com/use-cases/onlyterp-opengrok/add-a-new-provider-with-wire-evidence/

## How to bind non-Grok models to Grok Bot agents with Opengrok

Repo: [OnlyTerp/opengrok](https://github.com/OnlyTerp/opengrok) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Pick a model per agent in a picker, test it live, and save so Grok Bot talks to that model natively.

**Who it is for:** A developer who uses Grok Bot daily and wants Claude, GLM, Gemini, DeepSeek, or a local model for specific agents, triggered by a model feeling slow or off in the default setup.

**The problem:** Dropping a foreign model into Grok Bot often works but feels slower, weaker, or more token-hungry because the wire shape does not match the model.

**The outcome:** Each agent is bound to a chosen model with a wire map that matches that provider, and a live test confirms the binding works.

### Steps

1. Install the Grok Bot desktop app, Python 3.9+, and Node 18+, and have API keys ready for the providers you want.
2. Run `git clone https://github.com/OnlyTerp/opengrok`
3. Run `cd opengrok`
4. Run `python setup.py` and answer the three setup questions if asked.
5. In the picker, pick a model for each agent, click test for a live request, then save.

### Prompt to paste into your agent

```text
Using the OnlyTerp/opengrok repo, run `python setup.py` in a local clone and bind <target-model> to the agent named <agent-name> in the picker. Report the saved binding for that agent and the result of the live test. Verify the test returned a real reply from <target-model>, not an error.
```

### Caveat

The README says only some providers are working today and others are pending capture, so check the status list before you bind a model you need.

Risk, credentials: Each provider you bind needs its own API key, so keep those keys in your OS-managed environment rather than in shared files.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/onlyterp-opengrok/bind-other-models-to-grok-bot-agents/

## How to swap models mid-chat from the LiquidGlass panel with Opengrok

Repo: [OnlyTerp/opengrok](https://github.com/OnlyTerp/opengrok) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Change the model an agent uses during a conversation and confirm the switch with a verified hop receipt.

**Who it is for:** A user running a long Grok Bot session who wants to move a task to a different model without restarting the agent.

**The problem:** A conversation may need a different model partway through, but restarting the agent would lose the thread's momentum.

**The outcome:** The agent's next reply uses the newly chosen model, and the switch is confirmed end to end with a copyable proof.

### Steps

1. Complete the setup with `python setup.py` so the LiquidGlass HUD is in place.
2. Confirm the HUD is injected with `python tools/glass-inject.py --check`.
3. Open the agent in Grok Bot and choose a bound model from the glass dropdown.
4. Wait for the VERIFIED HOP confirmation, then use Copy Proof if you need the receipt.
5. Watch the Context Guardian bar against the 256k window during long runs.

### Prompt to paste into your agent

```text
Using the OnlyTerp/opengrok repo, run `python tools/glass-inject.py --check` and report whether the LiquidGlass HUD is present in the Grok Bot app. Then switch the active agent to <target-model> from the glass dropdown. Verify the VERIFIED HOP confirmation appears before reporting success.
```

### Caveat

The HUD lives inside the Grok Bot window, so it only appears after glass-inject has run against your installed app version.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/onlyterp-opengrok/switch-models-mid-chat-in-grok-bot/

## How to keep model bindings working after Grok Bot updates with Opengrok

Repo: [OnlyTerp/opengrok](https://github.com/OnlyTerp/opengrok) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Run the doctor and HUD checks so you can see exactly what a Grok Bot update changed and restore it.

**Who it is for:** A user whose Grok Bot updates silently rewrite the app bundle and who needs to know whether their model bindings and HUD still work.

**The problem:** Grok Bot updates rewrite its bundle without notice, which can break bindings or remove the HUD with no visible warning.

**The outcome:** A health report that names what moved after an update, and a HUD that is re-injected automatically while the app is closed.

### Steps

1. Run `python tools/doctor.py` after setup to confirm the machine baseline is healthy.
2. Run `python tools/glass-inject.py --check` to see whether the HUD is still in the app.
3. Run `python tools/glass-inject.py --watch --auto-relaunch` to self-heal the HUD while the app is closed. (inferred, check the README)
4. Run `python tools/qa.py` to check the repo for leaks, broken references, and failing tests.

### Prompt to paste into your agent

```text
Using the OnlyTerp/opengrok repo, run `python tools/doctor.py` and report every item the doctor says has changed since the baseline. Then run `python tools/glass-inject.py --check` and report whether the HUD is present. Verify the report names specific files or services, not just a general healthy or unhealthy label.
```

### Caveat

The HUD injection works against the Grok Bot app bundle, so it can fail loudly when the layout drifts, and the README says the repo fails loud rather than guessing.

Risk, reverse engineering: The HUD is injected into the Grok Bot app bundle and anchored on stable names, so it depends on the app's internal file layout and may need fixing after updates.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/onlyterp-opengrok/keep-grok-bot-setup-working-after-updates/

## How to add a new model provider with a wire capture with Opengrok

Repo: [OnlyTerp/opengrok](https://github.com/OnlyTerp/opengrok) | Difficulty: Advanced | Time: 60 minutes | Basis: From the README

Probe a provider's API, attach the capture to a pull request, and pass the repo's contract tests.

**Who it is for:** A contributor who wants to add a provider not yet in the repo, triggered by needing a model that Opengrok does not support today.

**The problem:** A provider mapped without evidence can silently ignore thinking or effort settings, so the repo requires a capture before any map is merged.

**The outcome:** A verified wire map for the new provider, backed by a capture and passing both provider-map contract suites.

### Steps

1. Run `python tools/wire-probe.py --base https://api.example.com/v1 --model their-model --key-env THEIR_API_KEY` against the provider.
2. Read CONTRIBUTING.md for the contract and attach the capture to your pull request.
3. Run `node tools/test-provider-maps.cjs` for Contract A.
4. Run `node tools/test-provider-maps-hop.cjs` for Contract B.
5. Run `python tools/qa.py` for the leak scan, reference integrity, and suites.

### Prompt to paste into your agent

```text
Using the OnlyTerp/opengrok repo, run `python tools/wire-probe.py` against <provider-base-url> with model <model-id> and key from the environment variable <KEY_ENV_NAME>. Report the verdict and the path of the saved capture. Verify both `node tools/test-provider-maps.cjs` and `node tools/test-provider-maps-hop.cjs` pass before reporting the map as ready.
```

### Caveat

The README says a provider is only listed as working after its capture is in the repo, so a new provider with no capture is not a supported route.

Risk, reverse engineering: Probing a provider's live API to record its wire behavior is a form of reverse engineering, so only probe services you are allowed to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/onlyterp-opengrok/add-a-new-provider-with-wire-evidence/
