python-substack

Safe Substack draft automation from Markdown with Python, CLI, and MCP.

View the Project on GitHub ma2za/python-substack

Legacy CLI commands

The original standalone console commands remain supported for compatibility. New automation should prefer the unified substack command.

Check authentication:

substack-auth-check
substack-auth-check --cookies cookies.json

Create a Markdown draft:

substack-publish-markdown post.md --title "My Post"

Create and publish only when explicitly requested:

substack-publish-markdown post.md --title "My Post" --publish

Create or publish from YAML:

substack-publish-yaml draft.yaml

Markdown options:

substack-publish-markdown post.md \
  --title "My Post" \
  --subtitle "Optional subtitle" \
  --tag python \
  --tag substack \
  --slug my-post \
  --search-engine-title "SEO title" \
  --search-engine-description "SEO description"

Both publishing commands create drafts by default. --publish opts into publishing. --no-send prevents email delivery when publishing.