@steipete/oracle 0.4.0 → 0.4.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.
Files changed (2) hide show
  1. package/README.md +45 -16
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -19,52 +19,53 @@ Install globally: `npm install -g @steipete/oracle`
19
19
 
20
20
  ```bash
21
21
  # Copy the bundle and paste into ChatGPT
22
- npx -y @steipete/oracle --render --copy -p "Review the TS data layer for schema drift" --file "src/**/*.ts,*/*.test.ts"
22
+ npx @steipete/oracle --render --copy -p "Review the TS data layer for schema drift" --file "src/**/*.ts,*/*.test.ts"
23
23
 
24
24
  # Minimal API run (expects OPENAI_API_KEY in your env)
25
- npx -y @steipete/oracle -p "Write a concise architecture note for the storage adapters" --file src/storage/README.md
25
+ npx @steipete/oracle -p "Write a concise architecture note for the storage adapters" --file src/storage/README.md
26
26
 
27
27
  # Multi-model API run
28
- npx -y @steipete/oracle -p "Cross-check the data layer assumptions" --models gpt-5.1-pro,gemini-3-pro --file "src/**/*.ts"
28
+ npx @steipete/oracle -p "Cross-check the data layer assumptions" --models gpt-5.1-pro,gemini-3-pro --file "src/**/*.ts"
29
+
30
+ # Preview without spending tokens
31
+ npx @steipete/oracle --dry-run summary -p "Check release notes" --file docs/release-notes.md
29
32
 
30
33
  # Experimental browser run (no API key, will open ChatGPT)
31
- npx -y @steipete/oracle --engine browser -p "Walk through the UI smoke test" --file "src/**/*.ts"
34
+ npx @steipete/oracle --engine browser -p "Walk through the UI smoke test" --file "src/**/*.ts"
32
35
 
33
36
  # Sessions (list and replay)
34
- npx -y @steipete/oracle status --hours 72
35
- npx -y @steipete/oracle session <id> --render
37
+ npx @steipete/oracle status --hours 72
38
+ npx @steipete/oracle session <id> --render
36
39
 
37
40
  # TUI (interactive, only for humans)
38
- npx -y @steipete/oracle
41
+ npx @steipete/oracle
39
42
  ```
40
43
 
44
+ Engine auto-picks API when `OPENAI_API_KEY` is set, otherwise browser; browser is stable on macOS, works on Linux with `--browser-chrome-path/--browser-cookie-path`, and is partial/experimental on Windows.
45
+
41
46
  ## Integration
42
47
 
43
48
  **CLI**
44
49
  - API mode expects API keys in your environment: `OPENAI_API_KEY` (GPT-5.x), `GEMINI_API_KEY` (Gemini 3 Pro), `ANTHROPIC_API_KEY` (Claude Sonnet 4.5 / Opus 4.1).
45
50
  - Prefer API mode or `--copy` + manual paste; browser automation is experimental.
51
+ - Browser support: stable on macOS; works on Linux with `--browser-chrome-path/--browser-cookie-path`; Windows is partial/experimental.
46
52
  - Remote browser service: `oracle serve` on a signed-in host; clients use `--remote-host/--remote-token`.
47
53
  - AGENTS.md/CLAUDE.md:
48
54
  ```
49
55
  - Oracle bundles a prompt plus the right files so another AI (GPT 5 Pro + more) can answer. Use when stuck/bugs/reviewing.
50
56
  - Run `npx -y @steipete/oracle --help` once per session before first use.
51
57
  ```
58
+ - Tip: set `chatgptUrl` in config (or `--chatgpt-url`) to a dedicated ChatGPT project folder so work runs don’t clutter your main history.
52
59
 
53
60
  **MCP**
54
61
  - Run the stdio server via `oracle-mcp`.
55
- - Configure clients via [steipete/mcporter](https://github.com/steipete/mcporter) or `.mcp.json`; see [docs/mcp.md](docs/mcp.md) for connection examples and scope options.
62
+ - Configure clients via [steipete/mcporter](https://github.com/steipete/mcporter) or `.mcp.json`; see [docs/mcp.md](docs/mcp.md) for connection examples.
56
63
  ```bash
57
64
  npx -y @steipete/oracle oracle-mcp
58
65
  ```
59
66
  - 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.
60
67
  [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=oracle&config=eyJjb21tYW5kIjoibnB4IC15IEBzdGVpcGV0ZS9vcmFjbGUgb3JhY2xlLW1jcCJ9)
61
68
 
62
- ## Related
63
- - CodexBar: keep Codex and Claude usage visible from the menu bar. Download at <https://codexbar.app>.
64
- - Trimmy: clipboard flattener for multi-line shell snippets. Download at <https://trimmy.app>.
65
- - MCPorter: TypeScript runtime/CLI/codegen for MCP. <https://mcporter.dev>.
66
- - AskOracle: browser UI for Oracle sessions. <https://askoracle.dev>.
67
-
68
69
  ```json
69
70
  {
70
71
  "oracle": {
@@ -80,8 +81,10 @@ npx -y @steipete/oracle oracle-mcp
80
81
  - Multi-model API runs with aggregated cost/usage.
81
82
  - Render/copy bundles for manual paste into ChatGPT when automation is blocked.
82
83
  - GPT‑5 Pro API runs detach by default; reattach via `oracle session <id>` / `oracle status` or block with `--wait`.
84
+ - Azure endpoints supported via `--azure-endpoint/--azure-deployment/--azure-api-version` or `AZURE_OPENAI_*` envs.
83
85
  - File safety: globs/excludes, size guards, `--files-report`.
84
86
  - Sessions you can replay (`oracle status`, `oracle session <id> --render`).
87
+ - Session logs and bundles live in `~/.oracle/sessions` (override with `ORACLE_HOME_DIR`).
85
88
 
86
89
  ## Flags you’ll actually use
87
90
 
@@ -94,6 +97,8 @@ npx -y @steipete/oracle oracle-mcp
94
97
  | `--models <list>` | Comma-separated API models for multi-model runs. |
95
98
  | `--base-url <url>` | Point API runs at LiteLLM/Azure/etc. |
96
99
  | `--chatgpt-url <url>` | Target a ChatGPT workspace/folder (browser). |
100
+ | `--browser-inline-cookies[(-file)] <payload|path>` | Supply cookies without Chrome/Keychain (browser). |
101
+ | `--browser-timeout`, `--browser-input-timeout` | Control overall/browser input timeouts (supports h/m/s/ms). |
97
102
  | `--render`, `--copy` | Print and/or copy the assembled markdown bundle. |
98
103
  | `--wait` | Block for background API runs (e.g., GPT‑5.1 Pro) instead of detaching. |
99
104
  | `--write-output <path>` | Save only the final answer (multi-model adds `.<model>`). |
@@ -101,6 +106,7 @@ npx -y @steipete/oracle oracle-mcp
101
106
  | `--dry-run [summary\|json\|full]` | Preview without sending. |
102
107
  | `--remote-host`, `--remote-token` | Use a remote `oracle serve` host (browser). |
103
108
  | `--remote-chrome <host:port>` | Attach to an existing remote Chrome session (browser). |
109
+ | `--azure-endpoint`, `--azure-deployment`, `--azure-api-version` | Target Azure OpenAI endpoints (picks Azure client automatically). |
104
110
 
105
111
  ## Configuration
106
112
 
@@ -109,11 +115,34 @@ Put defaults in `~/.oracle/config.json` (JSON5). Example:
109
115
  {
110
116
  model: "gpt-5.1-pro",
111
117
  engine: "api",
112
- filesReport: true
118
+ filesReport: true,
119
+ chatgptUrl: "https://chatgpt.com/g/your-project-folder"
113
120
  }
114
121
  ```
115
122
  See [docs/configuration.md](docs/configuration.md) for precedence and full schema.
116
123
 
124
+ Advanced flags
125
+ - Browser: `--browser-timeout`, `--browser-input-timeout`, `--browser-inline-cookies[(-file)]`, `--browser-inline-files`, `--browser-bundle-files`, `--browser-keep-browser`, `--browser-headless`, `--browser-hide-window`, `--browser-no-cookie-sync`, `--browser-allow-cookie-errors`, `--browser-chrome-path`, `--browser-cookie-path`, `--chatgpt-url`.
126
+ - Azure/OpenAI compatibility: `--azure-endpoint`, `--azure-deployment`, `--azure-api-version`, `--base-url`.
127
+
128
+ Remote browser example
129
+ ```bash
130
+ # Host (signed-in Chrome): launch serve
131
+ oracle serve --host 0.0.0.0:9473 --token secret123
132
+
133
+ # Client: target that host
134
+ oracle --engine browser --remote-host 192.168.1.10:9473 --remote-token secret123 -p "Run the UI smoke" --file "src/**/*.ts"
135
+
136
+ # If cookies can’t sync, pass them inline (JSON/base64)
137
+ oracle --engine browser --browser-inline-cookies-file ~/.oracle/cookies.json -p "Run the UI smoke" --file "src/**/*.ts"
138
+ ```
139
+
140
+ Session management
141
+ ```bash
142
+ # Prune stored sessions (default path ~/.oracle/sessions; override ORACLE_HOME_DIR)
143
+ oracle status --clear --hours 168
144
+ ```
145
+
117
146
  ## More docs
118
147
  - 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)
119
148
  - MCP: [docs/mcp.md](docs/mcp.md)
@@ -123,7 +152,7 @@ See [docs/configuration.md](docs/configuration.md) for precedence and full schem
123
152
  If you’re looking for an even more powerful context-management tool, check out https://repoprompt.com
124
153
  Name inspired by: https://ampcode.com/news/oracle
125
154
 
126
- ## More awesome stuff from steipete
155
+ ## More free stuff from steipete
127
156
  - ✂️ [Trimmy](https://trimmy.app) — “Paste once, run once.” Flatten multi-line shell snippets so they paste and run.
128
157
  - 🟦🟩 [CodexBar](https://codexbar.app) — Keep Codex token windows visible in your macOS menu bar.
129
158
  - 🧳 [MCPorter](https://mcporter.dev) — TypeScript toolkit + CLI for Model Context Protocol servers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steipete/oracle",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "CLI wrapper around OpenAI Responses API with GPT-5.1 Pro, GPT-5.1, and GPT-5.1 Codex high reasoning modes.",
5
5
  "type": "module",
6
6
  "main": "dist/bin/oracle-cli.js",
@@ -46,6 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/steipete/oracle#readme",
48
48
  "dependencies": {
49
+ "@anthropic-ai/tokenizer": "^0.0.4",
49
50
  "@google/genai": "^1.30.0",
50
51
  "@google/generative-ai": "^0.24.1",
51
52
  "@modelcontextprotocol/sdk": "^1.22.0",