Skip to content

Add SUBSTACK_EMAIL/SUBSTACK_PASSWORD environment variables#47

Open
io12 wants to merge 1 commit into
timf34:mainfrom
io12:env-var-credentials
Open

Add SUBSTACK_EMAIL/SUBSTACK_PASSWORD environment variables#47
io12 wants to merge 1 commit into
timf34:mainfrom
io12:env-var-credentials

Conversation

@io12

@io12 io12 commented Jul 7, 2026

Copy link
Copy Markdown

Currently the only way to supply premium-login credentials is by editing config.py, which is committed to the repo with placeholder values. This makes the tool awkward to use from contexts where the source isn't writable (e.g. packaged/installed rather than run from a live checkout) and encourages people to accidentally commit real credentials into config.py (as happened in PR #36).

SUBSTACK_EMAIL and SUBSTACK_PASSWORD now take precedence over config.py if set, and config.py itself becomes optional: the import no longer fails if the file is missing.

Also fail fast with a clear error when --premium is used without --skip-login and no real credentials are configured anywhere. Previously this silently sent empty/placeholder strings into the Substack login form, launched a real browser, waited 30 seconds, and then either printed a generic "Login unsuccessful" message or, if the browser's own client-side validation blocked the empty submission, incorrectly reported success.

Currently the only way to supply premium-login credentials is by
editing config.py, which is committed to the repo with placeholder
values. This makes the tool awkward to use from contexts where the
source isn't writable (e.g. packaged/installed rather than run from
a live checkout) and encourages people to accidentally commit real
credentials into config.py (as happened in PR timf34#36).

SUBSTACK_EMAIL and SUBSTACK_PASSWORD now take precedence over
config.py if set, and config.py itself becomes optional: the import
no longer fails if the file is missing.

Also fail fast with a clear error when --premium is used without
--skip-login and no real credentials are configured anywhere.
Previously this silently sent empty/placeholder strings into the
Substack login form, launched a real browser, waited 30 seconds, and
then either printed a generic "Login unsuccessful" message or, if the
browser's own client-side validation blocked the empty submission,
incorrectly reported success.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant