@steipete/oracle 0.16.1 → 0.17.1
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/README.md +72 -337
- package/dist/bin/oracle-cli.js +185 -56
- package/dist/docs-site/.nojekyll +0 -0
- package/dist/docs-site/CNAME +1 -0
- package/dist/docs-site/RELEASING.html +410 -0
- package/dist/docs-site/agents.html +374 -0
- package/dist/docs-site/anthropic.html +368 -0
- package/dist/docs-site/bridge.html +416 -0
- package/dist/docs-site/browser-mode.html +594 -0
- package/dist/docs-site/chromium-forks.html +347 -0
- package/dist/docs-site/cli-reference.html +346 -0
- package/dist/docs-site/configuration.html +462 -0
- package/dist/docs-site/favicon.svg +14 -0
- package/dist/docs-site/followup.html +375 -0
- package/dist/docs-site/gemini.html +383 -0
- package/dist/docs-site/grok.html +325 -0
- package/dist/docs-site/index.html +360 -0
- package/dist/docs-site/install.html +335 -0
- package/dist/docs-site/linux.html +321 -0
- package/dist/docs-site/llms.txt +43 -0
- package/dist/docs-site/manual-tests.html +596 -0
- package/dist/docs-site/mcp.html +391 -0
- package/dist/docs-site/multimodel.html +364 -0
- package/dist/docs-site/mythical-pro-agents.html +360 -0
- package/dist/docs-site/notifier.html +338 -0
- package/dist/docs-site/openai-endpoints.html +410 -0
- package/dist/docs-site/openrouter.html +344 -0
- package/dist/docs-site/quickstart.html +369 -0
- package/dist/docs-site/refactor/ux.html +532 -0
- package/dist/docs-site/sessions.html +389 -0
- package/dist/docs-site/social-card.png +0 -0
- package/dist/docs-site/social-card.svg +79 -0
- package/dist/docs-site/spec.html +363 -0
- package/dist/docs-site/testing.html +320 -0
- package/dist/docs-site/tui-debug.html +326 -0
- package/dist/docs-site/windows-work.html +324 -0
- package/dist/docs-site/windows.html +320 -0
- package/dist/scripts/test-browser.js +1 -25
- package/dist/src/browser/actions/modelSelection.js +36 -34
- package/dist/src/browser/actions/navigation.js +8 -3
- package/dist/src/browser/actions/thinkingTime.js +96 -45
- package/dist/src/browser/chromeLifecycle.js +8 -37
- package/dist/src/browser/index.js +23 -8
- package/dist/src/browser/modelDisplay.js +67 -0
- package/dist/src/browser/reattach.js +14 -1
- package/dist/src/browser/recoverConversation.js +2 -1
- package/dist/src/browser/sessionRunner.js +9 -10
- package/dist/src/browser/wslHost.js +50 -0
- package/dist/src/cli/browserConfig.js +31 -11
- package/dist/src/cli/detach.js +21 -4
- package/dist/src/cli/dryRun.js +13 -2
- package/dist/src/cli/engine.js +2 -2
- package/dist/src/cli/options.js +5 -1
- package/dist/src/cli/sessionDisplay.js +60 -8
- package/dist/src/cli/sessionLifecycle.js +2 -1
- package/dist/src/cli/sessionRunner.js +110 -60
- package/dist/src/cli/sessionTable.js +5 -1
- package/dist/src/cli/tui/index.js +12 -4
- package/dist/src/duration.js +3 -0
- package/dist/src/gemini-web/client.js +19 -1
- package/dist/src/oracle/modelResolver.js +8 -1
- package/dist/src/oracle/request.js +9 -2
- package/dist/src/oracle/run.js +43 -3
- package/dist/src/oracle/thinkingTime.js +9 -3
- package/dist/src/sessionManager.js +41 -12
- package/dist/vendor/oracle-notifier/OracleNotifier.app/Contents/CodeResources +0 -0
- package/dist/vendor/oracle-notifier/OracleNotifier.app/Contents/MacOS/OracleNotifier +0 -0
- package/package.json +17 -17
- package/vendor/oracle-notifier/OracleNotifier.app/Contents/CodeResources +0 -0
- package/vendor/oracle-notifier/OracleNotifier.app/Contents/MacOS/OracleNotifier +0 -0
package/README.md
CHANGED
|
@@ -1,401 +1,136 @@
|
|
|
1
|
-
# oracle 🧿 —
|
|
1
|
+
# oracle 🧿 — Bring a second brain, not a second briefing
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<img src="./README-header.png" alt="Oracle CLI header banner" width="1100">
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<a href="https://
|
|
9
|
-
<a href="https://
|
|
10
|
-
<a href="https://
|
|
11
|
-
<a href="LICENSE"><img src="https://img.shields.io/
|
|
8
|
+
<a href="https://github.com/steipete/oracle/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/steipete/oracle/ci.yml?branch=main&style=flat-square&label=ci" alt="CI status"></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/@steipete/oracle"><img src="https://img.shields.io/npm/v/@steipete/oracle?style=flat-square" alt="npm version"></a>
|
|
10
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/node/v/@steipete/oracle?style=flat-square" alt="Node.js version"></a>
|
|
11
|
+
<a href="LICENSE"><img src="https://img.shields.io/github/license/steipete/oracle?style=flat-square" alt="License"></a>
|
|
12
|
+
<a href="https://github.com/steipete/homebrew-tap/blob/main/Formula/oracle.rb"><img src="https://img.shields.io/badge/homebrew-steipete%2Ftap-orange?style=flat-square" alt="Homebrew tap"></a>
|
|
12
13
|
</p>
|
|
13
14
|
|
|
14
|
-
Oracle
|
|
15
|
+
Oracle is a CLI and MCP server that bundles a prompt with the files you select, sends that context to an AI model through an API or a signed-in browser, and stores the result as a session. It is for developers and coding agents that need a second-model review grounded in the actual project.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Full documentation is at [askoracle.sh](https://askoracle.sh).
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
## Install
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Run this once to create Oracle's private automation profile and log into ChatGPT. This profile is separate from your normal Chrome profile. The browser will stay open so you can complete the login:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
oracle --engine browser --browser-manual-login \
|
|
26
|
-
--browser-keep-browser --browser-input-timeout 120000 \
|
|
27
|
-
-p "HI"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Subsequent runs
|
|
31
|
-
|
|
32
|
-
Once logged in, the automation profile is saved. Use this for all future runs:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
oracle --engine browser --browser-manual-login \
|
|
36
|
-
--browser-auto-reattach-delay 5s \
|
|
37
|
-
--browser-auto-reattach-interval 3s \
|
|
38
|
-
--browser-auto-reattach-timeout 60s \
|
|
39
|
-
-p "your prompt"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
> **Why these flags?**
|
|
43
|
-
>
|
|
44
|
-
> - `--browser-manual-login` — Skips macOS Keychain cookie access (avoids repeated permission popups)
|
|
45
|
-
> - `--browser-auto-reattach-*` — Reconnects when ChatGPT redirects mid-page-load (fixes "Inspected target navigated or closed" error)
|
|
46
|
-
> - `--browser-keep-browser` — Keeps browser open for first-time login (not needed after)
|
|
47
|
-
> - `--browser-input-timeout 120000` — Gives you 2 minutes to log in on first run
|
|
48
|
-
|
|
49
|
-
## Quick start
|
|
50
|
-
|
|
51
|
-
Install globally: `npm install -g @steipete/oracle`
|
|
52
|
-
Homebrew: `brew install steipete/tap/oracle`
|
|
53
|
-
|
|
54
|
-
Requires Node 24+. Or use `npx -y @steipete/oracle …` (or pnpx).
|
|
21
|
+
With Homebrew on macOS or Linux:
|
|
55
22
|
|
|
56
23
|
```bash
|
|
57
|
-
|
|
58
|
-
npx -y @steipete/oracle --render --copy -p "Review the TS data layer for schema drift" --file "src/**/*.ts,*/*.test.ts"
|
|
59
|
-
|
|
60
|
-
# Minimal API run (expects OPENAI_API_KEY in your env)
|
|
61
|
-
npx -y @steipete/oracle -p "Write a concise architecture note for the storage adapters" --file src/storage/README.md
|
|
62
|
-
|
|
63
|
-
# Multi-model API run
|
|
64
|
-
npx -y @steipete/oracle -p "Cross-check the data layer assumptions" --models gpt-5.1-pro,gemini-3-pro --file "src/**/*.ts"
|
|
65
|
-
|
|
66
|
-
# Follow up from an existing OpenAI/Azure session id
|
|
67
|
-
npx -y @steipete/oracle --engine api --model gpt-5.2-pro --followup release-readiness-audit --followup-model gpt-5.2-pro -p "Re-evaluate with this new context" --file "src/**/*.ts"
|
|
68
|
-
|
|
69
|
-
# Follow up directly from an OpenAI Responses API id
|
|
70
|
-
npx -y @steipete/oracle --engine api --model gpt-5.2-pro --followup resp_abc1234567890 -p "Continue from this response" --file docs/notes.md
|
|
71
|
-
|
|
72
|
-
# Preview without spending tokens
|
|
73
|
-
npx -y @steipete/oracle --dry-run summary -p "Check release notes" --file docs/release-notes.md
|
|
74
|
-
|
|
75
|
-
# Check provider routing/readiness before an API panel
|
|
76
|
-
npx -y @steipete/oracle doctor --providers --models gpt-5.5-pro,gemini-3-pro,claude-4.6-sonnet
|
|
77
|
-
|
|
78
|
-
# Multi-model advisory panel with recoverable partial success
|
|
79
|
-
npx -y @steipete/oracle --models gpt-5.5-pro,gemini-3-pro,claude-4.6-sonnet \
|
|
80
|
-
--allow-partial --write-output /tmp/panel.md \
|
|
81
|
-
-p "Review the naming options" --file docs/naming.md
|
|
82
|
-
|
|
83
|
-
# Trace startup and time-to-first-output
|
|
84
|
-
npx -y @steipete/oracle --perf-trace --perf-trace-path /tmp/oracle-perf.json \
|
|
85
|
-
--dry-run summary -p "Quick smoke"
|
|
86
|
-
|
|
87
|
-
# Browser run (no API key, will open ChatGPT)
|
|
88
|
-
npx -y @steipete/oracle --engine browser -p "Walk through the UI smoke test" --file "src/**/*.ts"
|
|
89
|
-
|
|
90
|
-
# Add explicit shared context to a ChatGPT Project without deleting anything
|
|
91
|
-
npx -y @steipete/oracle project-sources add \
|
|
92
|
-
--chatgpt-url "https://chatgpt.com/g/g-p-example/project" \
|
|
93
|
-
--browser-manual-login \
|
|
94
|
-
--file docs/architecture.md \
|
|
95
|
-
--dry-run
|
|
96
|
-
|
|
97
|
-
# Browser multi-turn consult in one ChatGPT conversation
|
|
98
|
-
npx -y @steipete/oracle --engine browser --model gpt-5.5-pro \
|
|
99
|
-
-p "Review this migration plan" --file docs/migration.md \
|
|
100
|
-
--browser-follow-up "Challenge your previous recommendation" \
|
|
101
|
-
--browser-follow-up "Give the final decision"
|
|
102
|
-
|
|
103
|
-
# Gemini browser mode (no API key; uses Chrome cookies from gemini.google.com)
|
|
104
|
-
npx -y @steipete/oracle --engine browser --model gemini-3.1-pro --prompt "a cute robot holding a banana" --generate-image out.jpg --aspect 1:1
|
|
105
|
-
|
|
106
|
-
# Sessions (list and replay)
|
|
107
|
-
npx -y @steipete/oracle status --hours 72
|
|
108
|
-
npx -y @steipete/oracle session <id> --render
|
|
109
|
-
npx -y @steipete/oracle restart <id>
|
|
110
|
-
|
|
111
|
-
# TUI (interactive, only for humans)
|
|
112
|
-
npx -y @steipete/oracle tui
|
|
24
|
+
brew install steipete/tap/oracle
|
|
113
25
|
```
|
|
114
26
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
## Integration
|
|
118
|
-
|
|
119
|
-
**CLI**
|
|
120
|
-
|
|
121
|
-
- API mode expects API keys in your environment: `OPENAI_API_KEY` (GPT-5.x), `GEMINI_API_KEY` (Gemini 3.1 Pro / 3.5 Flash / 3.1 Flash-Lite), `ANTHROPIC_API_KEY` (Claude Sonnet 4.6 / Opus 4.1).
|
|
122
|
-
- Gemini browser mode uses Chrome cookies instead of an API key—just be logged into `gemini.google.com` in Chrome (no Python/venv required).
|
|
123
|
-
- Gemini browser mode accepts explicit `gemini-3.1-flash-lite`, `gemini-3.5-flash`, and `gemini-3.1-pro` IDs. Legacy `gemini-3-pro` browser runs target current Gemini 3.1 Pro. If your account can’t access the requested model, Oracle falls back to 3.1 Flash-Lite and logs the fallback in verbose mode.
|
|
124
|
-
- Prefer API mode or `--copy` + manual paste; browser automation is experimental.
|
|
125
|
-
- Browser support: stable on macOS; works on Linux (add `--browser-chrome-path/--browser-cookie-path` when needed) and Windows (manual-login or inline cookies recommended when app-bound cookies block decryption).
|
|
126
|
-
- Remote browser service: `oracle serve` on a signed-in host; clients use `--remote-host/--remote-token`.
|
|
127
|
-
- Browser artifacts: browser sessions save `transcript.md` and generated artifacts under `~/.oracle/sessions/<id>/artifacts/`. Deep Research saves `deep-research-report.md` when the report surface is captured; ChatGPT-generated images and downloadable files are saved with the active browser session when supported file URLs are present.
|
|
128
|
-
- MCP image agents: use the `chatgpt_image` tool for the easiest path, or pass `generateImage` to `consult` with `engine: "browser"`; saved paths come back in `structuredContent.images`.
|
|
129
|
-
- Browser archiving: by default, successful non-project, non-Deep-Research, non-multi-turn ChatGPT one-shots are archived after local artifacts are saved. Use `--browser-archive never` to disable or `--browser-archive always` to force archiving after a successful browser run. Archived chats remain manageable in ChatGPT.
|
|
130
|
-
- Conversation mode guidance: use one-shot browser runs for narrow bug reports or quick file-set reviews; use explicit browser follow-ups for ambiguous architecture/product tradeoffs where a challenge pass and final decision are valuable; use Deep Research for broad public-web questions that need citations. Oracle never invents follow-ups automatically.
|
|
131
|
-
- Project Sources: `oracle project-sources list|add --chatgpt-url <project-url>` manages the Project Sources tab in ChatGPT browser mode. v1 is append-only (`list`, `add`, `--dry-run`) so agents can share explicit project context without deleting or replacing user sources.
|
|
132
|
-
- Fast failure: root runs without a prompt exit nonzero after printing help; `--dry-run` conflicts with `--render` / `--render-markdown`; foreground API runs exit 130 on Ctrl-C while browser cleanup and session recovery still run.
|
|
133
|
-
- Performance traces: `--perf-trace` / `ORACLE_PERF_TRACE=1` writes JSON timing marks for startup, root command, first output, and exit. `--perf-trace-path` or `--perf-trace=/tmp/oracle.json` selects the path; detached API children write a session-suffixed sidecar trace.
|
|
134
|
-
- AGENTS.md/CLAUDE.md:
|
|
135
|
-
```
|
|
136
|
-
- Oracle bundles a prompt plus the right files so another AI (GPT 5 Pro + more) can answer. Use when stuck/bugs/reviewing.
|
|
137
|
-
- Run `npx -y @steipete/oracle --help` once per session before first use.
|
|
138
|
-
```
|
|
139
|
-
- Tip: set `browser.chatgptUrl` in config (or `--chatgpt-url`) to a dedicated ChatGPT project folder so browser runs don’t clutter your main history.
|
|
140
|
-
|
|
141
|
-
**Codex skill**
|
|
142
|
-
|
|
143
|
-
- Copy the bundled skill from this repo to your Codex skills folder:
|
|
144
|
-
- `mkdir -p ~/.codex/skills`
|
|
145
|
-
- `cp -R skills/oracle ~/.codex/skills/oracle`
|
|
146
|
-
- Then reference it in your `AGENTS.md`/`CLAUDE.md` so Codex loads it.
|
|
147
|
-
|
|
148
|
-
**MCP**
|
|
149
|
-
|
|
150
|
-
- Run the stdio server via `oracle-mcp`.
|
|
151
|
-
- Configure clients via [steipete/mcporter](https://github.com/steipete/mcporter) or `.mcp.json`; see [docs/mcp.md](docs/mcp.md) for connection examples.
|
|
152
|
-
- Claude Code on the same Mac as a signed-in ChatGPT browser can generate a local config directly:
|
|
27
|
+
Or install the npm package globally:
|
|
153
28
|
|
|
154
29
|
```bash
|
|
155
|
-
|
|
30
|
+
npm install -g @steipete/oracle
|
|
156
31
|
```
|
|
157
32
|
|
|
158
|
-
|
|
33
|
+
Oracle requires Node.js 24 or newer. To try it without installing:
|
|
159
34
|
|
|
160
35
|
```bash
|
|
161
|
-
npx -y @steipete/oracle
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
- Cursor setup (MCP): drop a `.cursor/mcp.json` like below, then pick “oracle” in Cursor’s MCP sources. See https://cursor.com/docs/context/mcp for UI steps.
|
|
165
|
-
[](https://cursor.com/en-US/install-mcp?name=oracle&config=eyJjb21tYW5kIjoibnB4IC15IEBzdGVpcGV0ZS9vcmFjbGUgb3JhY2xlLW1jcCJ9)
|
|
166
|
-
|
|
167
|
-
```json
|
|
168
|
-
{
|
|
169
|
-
"oracle": {
|
|
170
|
-
"command": "oracle-mcp",
|
|
171
|
-
"args": []
|
|
172
|
-
}
|
|
173
|
-
}
|
|
36
|
+
npx -y @steipete/oracle --help
|
|
174
37
|
```
|
|
175
38
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- Bundle once, reuse anywhere (API or experimental browser).
|
|
179
|
-
- Multi-model API runs with aggregated cost/usage, including OpenRouter IDs alongside first-party models.
|
|
180
|
-
- Claude Code / MCP browser consults can use the `chatgpt-pro-heavy` preset for a compact ChatGPT Pro second-opinion workflow.
|
|
181
|
-
- Render/copy bundles for manual paste into ChatGPT when automation is blocked.
|
|
182
|
-
- GPT‑5 Pro API runs detach by default; reattach via `oracle session <id>` / `oracle status` or block with `--wait`.
|
|
183
|
-
- Saved ChatGPT browser conversations and OpenAI/Azure API runs can continue from `--followup <sessionId|responseId>`; for multi-model API parents, add `--followup-model <model>`.
|
|
184
|
-
- Azure endpoints supported via `--azure-endpoint/--azure-deployment/--azure-api-version` or `AZURE_OPENAI_*` envs; use `--provider openai` / `--no-azure` to force first-party OpenAI when Azure env vars are present.
|
|
185
|
-
- Redacted provider checks via `oracle doctor --providers`, `--route`, and `--preflight` before spending API time.
|
|
186
|
-
- File safety: globs/excludes, size guards, `--files-report`.
|
|
187
|
-
- Sessions you can replay (`oracle status`, `oracle session <id> --render`).
|
|
188
|
-
- Session logs and bundles live in `~/.oracle/sessions` (override with `ORACLE_HOME_DIR`).
|
|
39
|
+
See the [installation guide](docs/install.md) for pnpm, updates, API keys, and storage paths.
|
|
189
40
|
|
|
190
|
-
##
|
|
41
|
+
## Quick start
|
|
191
42
|
|
|
192
|
-
|
|
43
|
+
Build a review bundle locally before connecting any model:
|
|
193
44
|
|
|
194
45
|
```bash
|
|
195
|
-
oracle
|
|
196
|
-
|
|
197
|
-
|
|
46
|
+
oracle --render \
|
|
47
|
+
-p "Review the package metadata for release risks" \
|
|
48
|
+
--file package.json
|
|
198
49
|
```
|
|
199
50
|
|
|
200
|
-
|
|
51
|
+
This prints the exact prompt and numbered file contents Oracle would send. It does not need credentials and does not contact a model.
|
|
201
52
|
|
|
202
|
-
|
|
53
|
+
When an engine is configured, remove `--render` to request an answer:
|
|
203
54
|
|
|
204
55
|
```bash
|
|
205
56
|
oracle \
|
|
206
|
-
|
|
207
|
-
--
|
|
208
|
-
--
|
|
209
|
-
-p "Compare these naming options"
|
|
57
|
+
-p "Audit the model runner for race conditions" \
|
|
58
|
+
--file "src/oracle/**/*.ts" \
|
|
59
|
+
--file "!**/*.test.ts"
|
|
210
60
|
```
|
|
211
61
|
|
|
212
|
-
|
|
62
|
+
Oracle chooses API mode when an OpenAI key is available and browser mode otherwise. Use `--engine api` or `--engine browser` to make the choice explicit. The [quickstart](docs/quickstart.md) covers the first API and browser runs.
|
|
213
63
|
|
|
214
|
-
##
|
|
215
|
-
|
|
216
|
-
Use `--followup` to continue a saved ChatGPT browser conversation or an existing OpenAI/Azure Responses API run with additional context/files:
|
|
217
|
-
|
|
218
|
-
```bash
|
|
219
|
-
oracle \
|
|
220
|
-
--followup <browser-session-id-or-slug> \
|
|
221
|
-
--slug "my-browser-followup" \
|
|
222
|
-
-p "Follow-up: review this additional file in the same conversation." \
|
|
223
|
-
--file "server/src/strategy/plan.ts"
|
|
224
|
-
```
|
|
64
|
+
## Choose an engine
|
|
225
65
|
|
|
226
|
-
|
|
66
|
+
| Path | Use it when | Setup |
|
|
67
|
+
| ------- | --------------------------------------------------------------------------- | ---------------------------------------------------- |
|
|
68
|
+
| API | You want provider APIs, reliable automation, or multiple models in one run. | Set the key for the provider you use. |
|
|
69
|
+
| Browser | You want Oracle to use a signed-in ChatGPT or Gemini browser session. | Install Chrome and complete the one-time login flow. |
|
|
70
|
+
| Render | You want to inspect, copy, or paste the bundle yourself. | No account or key is required. |
|
|
227
71
|
|
|
228
|
-
|
|
229
|
-
oracle \
|
|
230
|
-
--engine api \
|
|
231
|
-
--model gpt-5.2-pro \
|
|
232
|
-
--followup <existing-session-id-or-resp_id> \
|
|
233
|
-
--followup-model gpt-5.2-pro \
|
|
234
|
-
--slug "my-followup-run" \
|
|
235
|
-
--wait \
|
|
236
|
-
-p "Follow-up: re-evaluate the previous recommendation with the attached files." \
|
|
237
|
-
--file "server/src/strategy/plan.ts" \
|
|
238
|
-
--file "server/src/strategy/executor.ts"
|
|
239
|
-
```
|
|
72
|
+
API mode supports OpenAI, Azure OpenAI, Anthropic, Gemini, xAI, OpenRouter, and compatible endpoints. Browser mode uses Chrome automation for ChatGPT and a cookie-based Gemini client. See [browser mode](docs/browser-mode.md) and [provider endpoints](docs/openai-endpoints.md) for setup and limits.
|
|
240
73
|
|
|
241
|
-
|
|
242
|
-
Custom `--base-url` providers plus Gemini/Claude API runs are excluded here because they do not preserve `previous_response_id` in Oracle.
|
|
74
|
+
## Control the context
|
|
243
75
|
|
|
244
|
-
`
|
|
76
|
+
`--file` accepts files, directories, globs, and `!` exclusions. Repeat it to compose the context you want reviewed. Preview the resolved files and token estimate before sending:
|
|
245
77
|
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
running gpt-5.2-pro api 03/01/2026 09:22 AM 1400 - │ └─ architecture-review-implementation-pass
|
|
252
|
-
pending gpt-5.2-pro api 03/01/2026 09:25 AM 900 - └─ architecture-review-risk-check
|
|
78
|
+
```bash
|
|
79
|
+
oracle --dry-run summary --files-report \
|
|
80
|
+
-p "Audit the model runner for race conditions" \
|
|
81
|
+
--file "src/oracle/**/*.ts" \
|
|
82
|
+
--file "!**/*.test.ts"
|
|
253
83
|
```
|
|
254
84
|
|
|
255
|
-
|
|
85
|
+
Generated text bundles include stable line numbers so answers can cite `path:line`. Binary and large browser inputs can be uploaded or bundled without converting their contents. The [CLI reference](docs/cli-reference.md) lists the file, size, output, and browser controls.
|
|
256
86
|
|
|
257
|
-
|
|
87
|
+
## Sessions and follow-ups
|
|
258
88
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
- `--browser-auto-reattach-delay` — wait before the first retry (e.g. `30s`)
|
|
262
|
-
- `--browser-auto-reattach-interval` — how often to retry (e.g. `2m`)
|
|
263
|
-
- `--browser-auto-reattach-timeout` — per-attempt budget (default `2m`)
|
|
89
|
+
Oracle stores runs under `~/.oracle/sessions` so long responses can finish in the background and completed answers can be replayed. List recent work with:
|
|
264
90
|
|
|
265
91
|
```bash
|
|
266
|
-
oracle --
|
|
267
|
-
--browser-timeout 6m \
|
|
268
|
-
--browser-auto-reattach-delay 30s \
|
|
269
|
-
--browser-auto-reattach-interval 2m \
|
|
270
|
-
--browser-auto-reattach-timeout 2m \
|
|
271
|
-
-p "Run the long UI audit" --file "src/**/*.ts"
|
|
92
|
+
oracle status --hours 72
|
|
272
93
|
```
|
|
273
94
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
Browser automation can open or control Chrome, so dry-runs and live runs print a short browser control plan before touching ChatGPT. Use it to choose the least disruptive path for shared desktops and agent-driven consults.
|
|
277
|
-
|
|
278
|
-
- `--dry-run summary --engine browser ...` previews whether Oracle will launch visible Chrome, hide a new window, attach to an existing browser, or use remote Chrome.
|
|
279
|
-
- `--browser-attach-running` and `--remote-chrome <host:port>` are the calmest options when a signed-in Chrome is already running with DevTools enabled.
|
|
280
|
-
- `--browser-hide-window` is best-effort: Chrome can briefly take focus before Oracle hides it.
|
|
281
|
-
- Long GPT-5.5 Pro browser consults are normal. Use `--heartbeat`, `oracle status`, and `oracle session <id>` instead of starting a duplicate run if the host agent appears to be waiting.
|
|
282
|
-
- Successful manual-profile runs close Oracle's own ChatGPT tab and clean up leftover blank startup tabs when no other Oracle browser slots are active. Incomplete runs leave the tab open so `oracle session <id>` can reattach.
|
|
283
|
-
|
|
284
|
-
## Flags you’ll actually use
|
|
285
|
-
|
|
286
|
-
| Flag | Purpose |
|
|
287
|
-
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
288
|
-
| `-p, --prompt <text>` | Required prompt. |
|
|
289
|
-
| `-f, --file <paths...>` | Attach files/dirs (globs + `!` excludes). |
|
|
290
|
-
| `-e, --engine <api\|browser>` | Choose API or browser (browser is experimental). |
|
|
291
|
-
| `-m, --model <name>` | Built-ins (`gpt-5.5-pro` default, `gpt-5.5`, `gpt-5.4-pro`, `gpt-5.4`, `gpt-5.1-pro`, `gpt-5-pro`, `gpt-5.1`, `gpt-5.1-codex`, `gpt-5.2`, `gpt-5.2-instant`, `gpt-5.2-pro`, `gemini-3.1-pro` API + UI, `gemini-3-pro`, `claude-4.6-sonnet`, `claude-4.1-opus`) plus any OpenRouter id (e.g., `minimax/minimax-m2`, `openai/gpt-4o-mini`). |
|
|
292
|
-
| `--models <list>` | Comma-separated API models (mix built-ins and OpenRouter ids) for multi-model runs. |
|
|
293
|
-
| `--followup <sessionId\|responseId>` | Continue a saved ChatGPT browser conversation or an OpenAI/Azure Responses API run from a stored Oracle session or `resp_...` response id. |
|
|
294
|
-
| `--followup-model <model>` | For multi-model OpenAI/Azure parent sessions, choose which model response to continue from. |
|
|
295
|
-
| `--base-url <url>` | Point API runs at LiteLLM/Azure/OpenRouter/etc. |
|
|
296
|
-
| `--chatgpt-url <url>` | Target a ChatGPT workspace/folder or Temporary Chat URL (browser). |
|
|
297
|
-
| `--browser-model-strategy <select\|current\|ignore>` | Control ChatGPT model selection in browser mode. Explicit `current` keeps the active model without inheriting configured thinking time; pass `--browser-thinking-time` to change effort. `ignore` skips the picker. |
|
|
298
|
-
| `--browser-manual-login` | Skip cookie copy; reuse a persistent automation profile and wait for manual ChatGPT login. |
|
|
299
|
-
| `--browser-attach-running` | Reuse your current local browser session through local `DevToolsActivePort` discovery; Oracle opens a dedicated tab instead of launching Chrome (defaults to `127.0.0.1:9222`, or combine with `--remote-chrome <host:port>` to hint a different local endpoint). |
|
|
300
|
-
| `--browser-tab <ref>` | Reuse an existing ChatGPT tab by `current`, target id, URL, or title substring instead of opening a new tab. |
|
|
301
|
-
| `--browser-thinking-time <light\|standard\|extended\|heavy>` | Set ChatGPT thinking-time intensity (browser; Thinking/Pro models only). |
|
|
302
|
-
| `--browser-research deep` | Activate ChatGPT Deep Research for broad web research and cited reports (browser only). |
|
|
303
|
-
| `--browser-follow-up <prompt>` | Browser-only multi-turn consult: submit an additional prompt in the same ChatGPT conversation after the initial answer. Repeat for challenge/revision/final-decision passes. Not supported with Deep Research mode. |
|
|
304
|
-
| `--browser-archive <auto\|always\|never>` | Archive completed ChatGPT browser conversations after local artifacts are saved. `auto` archives successful one-shot chats only, and skips project, Deep Research, multi-turn, failed, and incomplete sessions. |
|
|
305
|
-
| `--browser-attachments <auto\|never\|always>` | Control browser file delivery: `auto` pastes small text files inline and uploads larger or raw files, `never` requires inline-compatible text files, and `always` uploads files as ChatGPT attachments. |
|
|
306
|
-
| `--browser-bundle-files`, `--browser-bundle-format <auto\|text\|zip>` | Bundle browser uploads into one attachment. `auto` uses a text bundle for text-only inputs and a byte-preserving ZIP when bundled inputs include raw files; `text` writes a Markdown-style text bundle; `zip` archives the original file bytes. |
|
|
307
|
-
| `--browser-port <port>` | Pin the Chrome DevTools port (WSL/Windows firewall helper). |
|
|
308
|
-
| `--browser-inline-cookies[(-file)] <payload \| path>` | Supply cookies without Chrome/Keychain (browser). |
|
|
309
|
-
| `--browser-timeout`, `--browser-input-timeout`, `--browser-attachment-timeout` | Control overall/browser input/attachment readiness timeouts (supports h/m/s/ms). |
|
|
310
|
-
| `--browser-recheck-delay`, `--browser-recheck-timeout` | Delayed recheck for long Pro runs: wait then retry capture after timeout (supports h/m/s/ms). |
|
|
311
|
-
| `--heartbeat <seconds>` | Emit API and browser progress heartbeats. Browser mode reports ChatGPT Thinking/Reasoning sidecar liveness metadata when available, without logging reasoning text. |
|
|
312
|
-
| `--browser-reuse-wait` | Wait for a shared Chrome profile before launching (parallel browser runs). |
|
|
313
|
-
| `--browser-profile-lock-timeout` | Wait for the shared manual-login profile lock before sending (serializes parallel runs). |
|
|
314
|
-
| `--browser-max-concurrent-tabs` | Soft limit for simultaneous ChatGPT tabs sharing one manual-login profile (default 3). |
|
|
315
|
-
| `--render`, `--copy` | Print and/or copy the assembled markdown bundle. |
|
|
316
|
-
| `--wait` | Block for background API runs (e.g., GPT‑5.1 Pro) instead of detaching. |
|
|
317
|
-
| `--timeout <seconds\|duration\|auto>` | Overall API deadline (auto = 60m for pro, 120s otherwise; durations like `10m` derive HTTP/stale-session timeouts unless overridden). |
|
|
318
|
-
| `--background`, `--no-background` | Force Responses API background mode (create + retrieve) for API runs. |
|
|
319
|
-
| `--http-timeout <ms\|s\|m\|h>` | Override the HTTP client timeout; if omitted, explicit `--timeout` values are reused for transport. |
|
|
320
|
-
| `--zombie-timeout <ms\|s\|m\|h>` | Override stale-session cutoff used by `oracle status`. |
|
|
321
|
-
| `--zombie-last-activity` | Use last log activity to detect stale sessions. |
|
|
322
|
-
| `--write-output <path>` | Save only the final answer (multi-model adds `.<model>` and writes `<stem>.oracle.json`). Browser sessions also save transcripts and generated artifacts under `~/.oracle/sessions/<id>/artifacts/`. |
|
|
323
|
-
| `--allow-partial`, `--partial <fail\|ok>` | Multi-model failure policy. Default `fail` exits 1 after printing a structured partial summary; `ok` exits 0 when at least one model succeeds. |
|
|
324
|
-
| `--preflight` | Check redacted provider readiness for requested API model(s), then exit without creating a session. |
|
|
325
|
-
| `--perf-trace`, `--perf-trace-path <path>` | Write startup/first-output timing trace JSON; also accepts `--perf-trace=/tmp/oracle.json`, `ORACLE_PERF_TRACE=1`, or `ORACLE_PERF_TRACE=/tmp/oracle.json`. |
|
|
326
|
-
| `--files-report` | Print per-file token usage. |
|
|
327
|
-
| `--dry-run [summary\|json\|full]` | Preview without sending. |
|
|
328
|
-
| `--remote-host`, `--remote-token` | Use a remote `oracle serve` host (browser). |
|
|
329
|
-
| `--remote-chrome <host:port>` | Attach to an existing remote Chrome session (browser), or when combined with `--browser-attach-running` use this host:port as the local attach hint. |
|
|
330
|
-
| `--youtube <url>` | YouTube video URL to analyze (Gemini browser mode). |
|
|
331
|
-
| `--generate-image <file>` | Generate image and save to file (Gemini browser mode; ChatGPT browser mode saves downloadable image artifacts when present). Extra ChatGPT images save as numbered siblings. |
|
|
332
|
-
| `--edit-image <file>` | Edit existing image with `--output` (Gemini browser mode). For ChatGPT browser mode, attach source images with `--file` and use `--generate-image` for the output path. |
|
|
333
|
-
| `--provider openai\|azure\|auto`, `--no-azure`, `--route` | Choose or inspect API provider routing; `openai` / `--no-azure` ignores Azure env/config for the run. |
|
|
334
|
-
| `--azure-endpoint`, `--azure-deployment`, `--azure-api-version` | Target Azure OpenAI endpoints (picks Azure client automatically). |
|
|
335
|
-
|
|
336
|
-
## Configuration
|
|
337
|
-
|
|
338
|
-
Put defaults in `~/.oracle/config.json` (JSON5). Example:
|
|
339
|
-
|
|
340
|
-
```json5
|
|
341
|
-
{
|
|
342
|
-
model: "gpt-5.5-pro",
|
|
343
|
-
engine: "api",
|
|
344
|
-
filesReport: true,
|
|
345
|
-
browser: {
|
|
346
|
-
chatgptUrl: "https://chatgpt.com/g/g-p-691edc9fec088191b553a35093da1ea8-oracle/project",
|
|
347
|
-
archiveConversations: "auto",
|
|
348
|
-
},
|
|
349
|
-
}
|
|
350
|
-
```
|
|
95
|
+
Use `oracle session` to reattach to a run, `oracle restart` to repeat one, or `--followup` to continue a supported API or ChatGPT conversation with more context. See [sessions](docs/sessions.md) and [follow-ups](docs/followup.md) for the lifecycle and provider limits.
|
|
351
96
|
|
|
352
|
-
|
|
353
|
-
See [docs/configuration.md](docs/configuration.md) for precedence and full schema.
|
|
97
|
+
## Multiple models and automation
|
|
354
98
|
|
|
355
|
-
|
|
99
|
+
`--models` runs an API panel and records per-model usage, cost, output, and partial failures in one session. `oracle doctor --providers` inspects readiness for the selected models without exposing credentials. The [multi-model guide](docs/multimodel.md) covers routing and output files.
|
|
356
100
|
|
|
357
|
-
|
|
101
|
+
For agent integrations, run the `oracle-mcp` stdio server or install the Oracle skill from this repository. See [MCP setup](docs/mcp.md) and [agent setup](docs/agents.md) for Claude Code, Codex, Cursor, and other MCP clients.
|
|
358
102
|
|
|
359
|
-
|
|
360
|
-
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
361
|
-
| Browser | `--browser-manual-login`, `--browser-attach-running`, `--browser-thinking-time`, `--browser-research`, `--browser-follow-up`, `--browser-archive`, `--browser-timeout`, `--browser-input-timeout`, `--browser-attachment-timeout`, `--browser-recheck-delay`, `--browser-recheck-timeout`, `--browser-reuse-wait`, `--browser-profile-lock-timeout`, `--browser-max-concurrent-tabs`, `--browser-auto-reattach-delay`, `--browser-auto-reattach-interval`, `--browser-auto-reattach-timeout`, `--browser-cookie-wait`, `--browser-inline-cookies[(-file)]`, `--browser-attachments`, `--browser-inline-files`, `--browser-bundle-files`, `--browser-bundle-format`, `--browser-keep-browser`, `--browser-headless`, `--browser-hide-window`, `--browser-no-cookie-sync`, `--browser-allow-cookie-errors`, `--browser-chrome-path`, `--browser-cookie-path`, `--chatgpt-url` |
|
|
362
|
-
| Run control | `--background`, `--no-background`, `--http-timeout`, `--zombie-timeout`, `--zombie-last-activity` |
|
|
363
|
-
| Azure/OpenAI | `--azure-endpoint`, `--azure-deployment`, `--azure-api-version`, `--base-url` |
|
|
103
|
+
## Documentation
|
|
364
104
|
|
|
365
|
-
|
|
105
|
+
| Topic | Guide |
|
|
106
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
107
|
+
| Installation and first run | [Install](docs/install.md) · [Quickstart](docs/quickstart.md) |
|
|
108
|
+
| Browser automation | [Browser mode](docs/browser-mode.md) · [Linux](docs/linux.md) · [Windows](docs/windows.md) |
|
|
109
|
+
| Providers | [OpenAI and Azure](docs/openai-endpoints.md) · [Anthropic](docs/anthropic.md) · [Gemini](docs/gemini.md) · [OpenRouter](docs/openrouter.md) |
|
|
110
|
+
| Runs and models | [Sessions](docs/sessions.md) · [Follow-ups](docs/followup.md) · [Multi-model](docs/multimodel.md) |
|
|
111
|
+
| Configuration and commands | [Configuration](docs/configuration.md) · [CLI reference](docs/cli-reference.md) |
|
|
112
|
+
| Agent integrations | [Agents](docs/agents.md) · [MCP](docs/mcp.md) · [Bridge](docs/bridge.md) |
|
|
366
113
|
|
|
367
|
-
|
|
368
|
-
# Host (signed-in Chrome): launch serve
|
|
369
|
-
oracle serve --host 0.0.0.0:9473 --token secret123
|
|
114
|
+
## Related projects
|
|
370
115
|
|
|
371
|
-
|
|
372
|
-
|
|
116
|
+
- [Trimmy](https://trimmy.app) — Flatten multiline shell snippets so they paste and run once.
|
|
117
|
+
- [CodexBar](https://codexbar.app) — Keep Codex token windows visible in the macOS menu bar.
|
|
118
|
+
- [MCPorter](https://mcporter.dev) — TypeScript toolkit and CLI for Model Context Protocol servers.
|
|
373
119
|
|
|
374
|
-
|
|
375
|
-
oracle --engine browser --browser-inline-cookies-file ~/.oracle/cookies.json -p "Run the UI smoke" --file "src/**/*.ts"
|
|
376
|
-
```
|
|
120
|
+
The name was inspired by [Amp's Oracle](https://ampcode.com/news/oracle).
|
|
377
121
|
|
|
378
|
-
|
|
122
|
+
## Development
|
|
379
123
|
|
|
380
124
|
```bash
|
|
381
|
-
|
|
382
|
-
|
|
125
|
+
pnpm install
|
|
126
|
+
pnpm check
|
|
127
|
+
pnpm test
|
|
128
|
+
pnpm build
|
|
129
|
+
pnpm docs:check
|
|
383
130
|
```
|
|
384
131
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
- Bridge (Windows host → Linux client): [docs/bridge.md](docs/bridge.md)
|
|
388
|
-
- Browser mode & forks: [docs/browser-mode.md](docs/browser-mode.md) (includes `oracle serve` remote service), [docs/chromium-forks.md](docs/chromium-forks.md), [docs/linux.md](docs/linux.md)
|
|
389
|
-
- MCP: [docs/mcp.md](docs/mcp.md)
|
|
390
|
-
- OpenAI/Azure/OpenRouter endpoints: [docs/openai-endpoints.md](docs/openai-endpoints.md), [docs/openrouter.md](docs/openrouter.md)
|
|
391
|
-
- Manual smokes: [docs/manual-tests.md](docs/manual-tests.md)
|
|
392
|
-
- Testing: [docs/testing.md](docs/testing.md)
|
|
393
|
-
|
|
394
|
-
If you’re looking for an even more powerful context-management tool, check out https://repoprompt.com
|
|
395
|
-
Name inspired by: https://ampcode.com/news/oracle
|
|
132
|
+
Manual browser and provider tests are documented in [docs/manual-tests.md](docs/manual-tests.md).
|
|
396
133
|
|
|
397
|
-
##
|
|
134
|
+
## License
|
|
398
135
|
|
|
399
|
-
|
|
400
|
-
- 🟦🟩 [CodexBar](https://codexbar.app) — Keep Codex token windows visible in your macOS menu bar.
|
|
401
|
-
- 🧳 [MCPorter](https://mcporter.dev) — TypeScript toolkit + CLI for Model Context Protocol servers.
|
|
136
|
+
MIT. See [LICENSE](LICENSE).
|