chatgpt
A neutral Claude Code plugin that forwards a prompt to a logged-in subscription
ChatGPT Pro browser session and returns the response as Markdown — or, with
--image, the images ChatGPT's image tool generates. No review framing, no
templates, no repomix packing, no connector manipulation — just a bridge. The
composer is driven in Chat mode with the GPT-6 model at Pro
reasoning effort, and the run is fail-closed: GPT-6 must be the checked entry
of the opened model menu's model list (the entry name carries the version) and
the menu's model row must read exactly Pro at the maximum-effort tick before
anything is sent, otherwise the run stops with exit 2. A model list without a
GPT-6 entry fails closed the same way. A composer left in Work mode or on
another model is switched back first; Work mode's top tier (Ultra, a
multi-turn agentic mode) is deliberately not used.
Two skills ship with it:
chatgpt:pro — offloading ultra-hard analysis / design / research /
verification tasks that take tens of minutes or more of Pro-tier reasoning.
chatgpt:image-gen — generating or editing images (chatgpt --image,
effort medium unless --effort says otherwise).
Install
claude plugin marketplace add Dev-Jahn/jahns-cc-marketplace
claude plugin install chatgpt@jahns-cc-marketplace
Once the plugin is installed, its bin/ directory is automatically added to
PATH in Claude Code sessions — just call chatgpt. No symlinks needed.
On a fresh Linux x86_64 host with apt (Debian/Ubuntu, WSL2 included),
chatgpt-setup installs everything listed under Environment and
then walks you through the one manual step, signing in:
chatgpt-setup --check # report what is present / missing; no sudo, no network
chatgpt-setup # install the missing pieces (apt via sudo, Chrome .deb; uv when needed)
chatgpt-setup --login # start VNC + Chrome + noVNC and print a URL + one-time password
--login prints an ssh -L tunnel line and a http://localhost:6080/vnc.html?…
URL; sign in to chatgpt.com in that Chrome window once and the profile keeps the
session. On WSLg there is no tunnel: --login opens Chrome on the Windows
desktop — sign in there. Other platforms exit 2 — install by hand from the list
below.
Usage
chatgpt "your question"
chatgpt -f prompt.md
echo "your question" | chatgpt -
chatgpt --effort pro --attach context.pdf --max-wait 7200 --out answer.md "question"
chatgpt --continue "follow-up question" # most recent thread from this folder
chatgpt --resume 6a9b8621 "follow-up question" # a specific thread, by its handle
chatgpt --image "a watercolor fox reading a newspaper" # effort medium
chatgpt --image --effort high --attach ref.png --out fox.png "restyle this as a woodcut"
- stdout carries the response body, then a blank line and a short trailer
(
---, Thread <handle> · <url>, and one sentence on how to follow up);
progress and diagnostics go to stderr. --quiet replaces the body with the
saved-file path but keeps the trailer. The saved file (--out, default
~/.chatgpt/out/<timestamp>.md) holds the body only.
- Follow-ups keep the thread's context:
--continue reopens the most recent
thread started from this folder; --resume <handle> picks one by the 8-hex
handle a previous trailer printed (a chatgpt.com conversation URL is accepted
too, for a chat this tool did not start). Threads are remembered in
~/.chatgpt/threads.json (CHATGPT_STATE_DIR relocates it); a handle that
is not in it — or matches more than one thread — is exit 64 with nothing
opened. Project grouping does not apply to a follow-up (--project/
--no-project are rejected alongside it). A deleted or foreign thread is
reported before anything is typed (exit 1), and so is a thread whose previous
reply is still being generated — judged by the page's stop button and, just
before typing, by ChatGPT's server record of the thread's latest exchange: a
prompt sent then would join that reply instead of starting a new turn.
- One run per thread on this machine: a run holds a lock on its conversation
(
~/.chatgpt/conversations/<id>.lock) from before it types until its reply is
harvested or it gives up; a fresh chat takes it as soon as the new thread
exists. A follow-up into a thread whose lock is held exits 1 at once with
"another bridge run is waiting for a reply in this conversation; nothing
sent" — nothing is opened or typed, and it does not wait.
- The reply printed is always the answer to this run's own prompt: the run finds
its own turn by message id and prompt text, reads only that exchange, and
before printing checks with ChatGPT's server that the answer belongs to that
exchange, follows that prompt and has ended its turn (answers that use tools
and sub-agents pass the same check). When the answer cannot be found or