ChatGPT Login Session
Use scripts/chatgpt-login-session.ts.
Goal
Produce a usable account directory containing:
storage_state.jsonsession.json
for a specific ChatGPT account.
Default workflow
- Resolve credentials for one account.
- Log into ChatGPT web ().
- Complete OTP if required.
- Save:
data/accounts/<account>/storage_state.jsondata/accounts/<account>/session.json
- Return the saved paths, email, plan, and debug dir.
Command
npm run chatgpt-login:session -- \
--account data/accounts/account-your-email@example.com \
--otp-provider mail.com \
--secrets-file /path/to/temp.env \
--channel chrome \
--verbose 1
Credentials
Compatible with the existing repo manifest and OTP flow:
CHATGPT_EMAILMAIL_COM_PASSWORD (if using mail.com)- optional
OPENAI_PASSWORD
If the repo uses encrypted credentials in secrets/chatgpt/accounts.yaml, a practical pattern is:
Create a temporary dotenv file containing CHATGPT_EMAIL and provider-specific secrets, then pass it via --secrets-file.
Notes
- This skill must target
chatgpt.com, notchatgpt.com. - Prefer visible Chrome for login stability.
chatgpt-auth:sessioncan still be used separately, but this skill should already persistsession.jsonafter a successful login.- If session extraction cannot produce
sessionToken + user + account, treat it as failure.
Handoff to Pro skill
After this skill succeeds, the resulting account dir can be used directly by:
npm run chatgpt-pro:submit -- --account account-your-email@example.com --prompt-file /path/to/prompt.md --json