agbrowse docs

Guide

Generate ChatGPT code zips and recover them without clicking download buttons.

web-ai code is ChatGPT-only. It uploads the saved dev-agent context, sends a strict contract prompt, waits for sandbox zip output, retrieves it through the provider download API, and verifies the local zip.

Plan file requirement

New code artifacts must contain PLAN.md or 00_plan.md. The code-mode pipeline fails closed if the recovered zip does not include one of these plan files. Old artifacts created before this requirement may not have a plan file; code-extract can still recover them, but the plan-file contract will not be enforced for pre-existing conversations.

Single artifact

agbrowse web-ai code \
  --vendor chatgpt \
  --model thinking \
  --effort medium \
  --prompt "Build the app described here." \
  --output-zip ./result.zip

If --output-zip is omitted, the zip is saved as code-artifact-<conversation>.zip in the current working directory.

Multiple artifacts

agbrowse web-ai code \
  --vendor chatgpt \
  --model thinking \
  --effort medium \
  --multi-zip \
  --output-dir ./artifacts \
  --prompt "Create backend.zip and frontend.zip."

--multi-zip cannot be combined with --output-zip. Use --output-dir to specify where the multiple zip files are saved. If --output-dir is omitted, artifacts are written to the current working directory.

Later extraction

code-extract re-retrieves existing zip artifacts from an accessible ChatGPT conversation without sending a new prompt. Four selectors are available:

SelectorUsage
--urlFull ChatGPT conversation URL
--conversationConversation ID only
--sessionagbrowse session ID (if the conversation was created by agbrowse)
(none)Uses the current ChatGPT conversation tab
# By URL
agbrowse web-ai code-extract \
  --vendor chatgpt \
  --url "https://chatgpt.com/c/<conversation-id>" \
  --output-zip ./result.zip

# By session ID
agbrowse web-ai code-extract \
  --vendor chatgpt \
  --session "$SID" \
  --output-zip ./result.zip

# Multiple zips from one conversation
agbrowse web-ai code-extract \
  --vendor chatgpt \
  --url "https://chatgpt.com/c/<conversation-id>" \
  --multi-zip \
  --output-dir ./artifacts

The extractor scans the saved conversation JSON for /mnt/data/*.zip, mints the provider download URL, fetches the cookie-bound payload inside the page, validates the zip, and writes it locally. The original conversation URL/session/current tab plus a logged-in ChatGPT browser profile are required.