cgpro
GPT-6 Astra Pro from your terminal. Drives chatgpt.com with a real
Chrome session to expose your account's Pro-tier model (extended
reasoning + live web search) using your existing ChatGPT subscription.
$ cgpro ask "top story on Hacker News, in 2 lines"
gpt ▸ "OpenAI ships GPT-6 Astra to the API" (892 pts) — discussion of the
rollout and pricing announced this morning.
Why this exists
The ChatGPT app's Pro-tier model reaches the public API late, if at
all. The only way to script it from a shell today is to drive the same
UI a logged-in user clicks on. That is what cgpro does.
The model is resolved, never hardcoded
cgpro asks /backend-api/models what your account actually has, ranks
the catalogue by generation and tier, and uses the newest Pro-tier
entry. On a live ChatGPT Pro account checked on 10 September 2026 that
resolves to slug gpt-6-pro, titled "GPT-6 Pro", the chat-side name for
GPT-6 Astra. It is available on Pro, Business and Enterprise plans.
This matters because cgpro previously pinned gpt-5-5-pro. When that
slug retired, chatgpt.com accepted the dead ?model= parameter, ignored
it, and served the account default instead — the CLI kept printing
answers from the wrong model with no error. Resolution now happens at
runtime, the result is cached for 6 hours, and every turn verifies which
model actually replied.
Override it when you need to:
cgpro ask -m gpt-5-6-pro "..." # pin one model for a call
CGPRO_MODEL=gpt-5-6-pro cgpro ask "..."
cgpro ask --refresh-models "..." # ignore the cache after a rollout
Status
v0.4.0 — works end-to-end on Windows. GPT-6 Astra support and the
hardened auth layer are new in 0.4.
Install
Prerequisites: Node.js ≥ 20 and (optionally) the ChatGPT desktop
app signed in on this machine.
git clone https://github.com/yannabadie/CGPro4Code.git cgpro
cd cgpro
npm install
npm run build
npm link # puts `cgpro` on your PATH
npm install downloads the bundled Chromium via a postinstall step. No
system Chrome is required. The download is skipped when CI is set; if
it was skipped or failed, run it by hand:
npx patchright install chromium
Running cgpro without that browser now fails with one line naming the
command, not a patchright stack trace.
First run
Pick one of these two paths:
A) Adopt the desktop app's session (recommended)
If you already have the ChatGPT desktop app installed and signed in on
this machine, the fastest path is to import its session into cgpro's
profile — no second sign-in required.
cgpro adopt --kill-app
This kills the desktop app (so the cookie database isn't locked),
copies its Local State, Cookies, IndexedDB, and friends into
~/.cgpro/profile/Default/, and verifies the resulting session is
authenticated.
B) Sign in interactively
If you don't have the desktop app:
cgpro login
Chromium opens on chatgpt.com. Sign in (password, 2FA, Cloudflare if
needed). The browser auto-closes the moment authentication is detected.
Verify
cgpro status
# Account: [email protected]
# Plan: pro
# Token: valid for 89d 23h
# Models: 21 available
# Using: gpt-6-pro (auto)
# Pro tier: ✓ GPT-6 Pro
cgpro status exits 0 whenever the session itself is healthy, and
non-zero with a specific message when it is not: anonymous trial mode,
an expired token, or the "Welcome back" re-authentication modal each
report differently so you know whether cgpro login will help.
Add --json for a machine-readable report.
Commands
| Command | Purpose |
|---|
cgpro adopt | Import the desktop ChatGPT app's session. |
cgpro login | Interactive sign-in via Chromium. |
cgpro logout | Wipe the local profile (forces re-login). |
cgpro status | Verify the session: account, plan, token lifetime, resolved model. |
cgpro models | List available models and show which one cgpro will use. |
cgpro ask "..." | One-shot prompt; streams the answer. |
cgpro chat | Multi-turn REPL. |
cgpro thread list / show / save / rm / rename | Bookmark conversations by name. |
cgpro thread sync / list --remote | Mirror your chatgpt.com sidebar locally. |
cgpro daemon start / stop / status | Long-lived browser for instant first-token. |
cgpro plugins | List the ChatGPT plugins the @ picker offers for this account. |
cgpro project list / link / show / digest | Mirror this directory into a ChatGPT Project. |
cgpro doctor | Audit auth health, model resolution and selectors against the live DOM. |
ask