Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By griffinwork40v1.0.0MIT
CLI for Substack's unofficial private API — read publication content (archive, posts, feed, comments, search, analytics) and manage a publication you own (drafts, publishing, comments, subscribers, recommendations, tags).
Claude loads one when your task matches it, or you run it by name.
An AFK plugin (and standalone CLI) for reading and managing Substack publications, wrapping Substack's undocumented private API — the same /api/v1/ endpoints the Substack web app itself uses.
Read-only endpoints (archive, single post, RSS feed) work anonymously. Everything else — publishing drafts, moderating comments, managing subscribers, pulling analytics — uses your browser session cookie.
⚠️ Unofficial. Substack publishes no public API for content, publishing, or subscriber automation. This tool reverse-engineers the private endpoints, so it can break without notice if Substack changes them. Use it on publications you own, and review Substack's Terms of Use before automating against your account.
afk plugin install griffinwork40/substack-cli
This registers the substack skill, available in every AFK session. The CLI's Python dependencies (typer, httpx, rich) install once from the plugin's bundled requirements file:
pip install -r ~/.afk/plugins/substack-cli/skills/substack/scripts/requirements.txt
Requires Python 3.11+.
git clone https://github.com/griffinwork40/substack-cli.git
cd substack-cli/skills/substack/scripts
pip install -r requirements.txt
# Optional: put `substack` on your PATH
ln -s "$(pwd)/substack" /usr/local/bin/substack
substack --help
comments reactions), report spam/impersonation, ban commenters, and look up existing bans.--all with --since + --max-pages), read, delete, and fetch replies (notes replies --all --descendants) on Substack Notes. All Notes endpoints use substack.com (host A), not the publication subdomain.substack automations --help. GET only: nothing that edits, starts, or sends.--pretty for a Rich table/panel); errors are JSON on stderr with a nonzero exit code.Full command list: substack --help.
Authenticated operations need your Substack session cookie (Substack uses cookies, not API tokens). Full extraction walkthrough: skills/substack/references/auth-setup.md.
In short:
# Extract connect.sid (+ optionally substack.sid / substack.lli) from your
# browser DevTools while logged into Substack, then:
export SUBSTACK_COOKIES_STRING="connect.sid=...; substack.sid=..."
export SUBSTACK_PUBLICATION_URL="https://yourname.substack.com"
# Or persist to ~/.config/substack-cli/config.json:
substack config set-cookies "connect.sid=...; substack.sid=..."
# Verify:
substack whoami
Write operations are gated. Any mutating command (publish, delete, remove) requires SUBSTACK_ENABLE_WRITE=true (or enable_write: true in config) and an explicit --yes on destructive commands. This is a deliberate guardrail against accidental changes to a live publication.
Cookies are stored at ~/.config/substack-cli/config.json — outside this repo — and are never committed. Treat the cookie string like a password; it grants full access to your account.
substack-cli/
├── .claude-plugin/plugin.json # AFK plugin manifest
├── skills/substack/
│ ├── SKILL.md # skill manifest (agent-facing usage)
│ ├── references/ # API map + auth-setup guide
│ └── scripts/ # the Python CLI (substack_cli/ + tests/)
├── docs/DEVELOPMENT.md # architecture & contributor guide
├── README.md
└── LICENSE
cd skills/substack/scripts
pip install -r requirements-dev.txt
pytest -q # 439 tests, all HTTP mocked — no real network calls
Generated from the plugin's indexed repository (griffinwork40/substack-cli) — no native marketplace selected
npx claudepluginhub p/griffinwork40-substack-cliPlugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.