patreon-cli
v0.0.1
Published
Interact with Patreon via the terminal
Downloads
137
Readme
██████ █████ ████████ ██████ ███████ ██████ ███ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██
██████ ███████ ██ ██████ █████ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ███████ ██████ ██ ████Interact with Patreon via the terminal. Built with Node.js, tsx and Playwright.
Install
npm install -g patreon-cliOr run without installing:
npx patreon-cli helpPrerequisites
- Node.js 18+
- Google Chrome installed (used by Playwright)
- After installing, run
npx playwright install chromiumif Chrome is not detected
Quick Start
# 1. Log in to Patreon
patreon login
# 2. Select your Creator account
patreon select-account
# 3. Create a post
patreon create-post --title "Hello World" --description "My first automated post"Commands
Account
patreon login
Opens a browser window where you log in to Patreon. Once authenticated, your session cookies are saved for use by other commands.
patreon select-account
Switch between Creator and Member accounts. Required before using Creator commands.
patreon playground [url]
Opens a browser with your saved session loaded. Useful for exploring Patreon's UI and inspecting elements.
patreon playground
patreon playground https://www.patreon.com/c/mypage/shopCreator
patreon create-post
Publish a new post with full control over media, access, pricing, and settings.
# Simple text post
patreon create-post --title "My Post" --description "Post content"
# Post with image
patreon create-post --title "Art Drop" --description "New piece" --image ./art.png
# Post with video
patreon create-post --title "Tutorial" --description "Watch this" --video-file ./video.mp4
patreon create-post --title "Tutorial" --description "Watch this" --video-url https://youtu.be/xxx
# Free access post
patreon create-post --title "Free Post" --description "For everyone" --access free
# Paid post with price and specific tiers
patreon create-post --title "Exclusive" --description "Premium content" \
--access paid --price 5 --tiers "Gold,Platinum"
# Post with tags, no comments, no notifications
patreon create-post --title "Update" --description "Quick update" \
--tags "art,digital" --no-comments --no-notify
# Post with email preview only
patreon create-post --title "Newsletter" --description "Monthly update" --email-preview| Flag | Description |
|------|-------------|
| --title <text> | Post title (required) |
| --description <text> | Post body (required) |
| --image <path> | Attach an image file |
| --video-file <path> | Upload a video file |
| --video-url <url> | Embed a video URL |
| --access free\|paid | Access type (default: paid) |
| --tiers <name,...> | Select specific tiers (paid only) |
| --price <amount> | Sell post at a price (paid only) |
| --tags <name,...> | Add tags to the post |
| --no-notify | Disable member notifications |
| --email-preview | Send email preview only (conflicts with --no-notify) |
| --no-comments | Disable comments on the post |
patreon list-tiers
List available membership tiers for the selected Creator account.
patreon list-tierspatreon list-shop
List shop products for the selected Creator account.
patreon list-shop
patreon list-shop --page 2
patreon list-shop --search "sticker"| Flag | Description |
|------|-------------|
| --page <n> | Page number (default: 1) |
| --search <query> | Filter products by search term |
Architecture
patreon-cli/
├── bin.mjs # Node.js entry point (bin)
├── index.ts # CLI router & help text
├── src/
│ ├── constants.ts # Patreon URLs & config
│ ├── config.ts # Load/save .patreon-config.json
│ ├── schemas/
│ │ └── config.ts # Zod schemas for config
│ ├── commands/
│ │ ├── login.ts # Browser-based login
│ │ ├── playground.ts # Open browser with saved session
│ │ ├── select-account.ts # Account selection
│ │ ├── create-post.ts # Post creation with all options
│ │ ├── list-tiers.ts # List membership tiers
│ │ └── list-shop.ts # List shop products
│ └── ui/
│ ├── index.ts # UI exports
│ ├── chalk.ts # Colors (Patreon coral #FF424D)
│ ├── spinner.ts # Loading spinner
│ ├── banner.ts # ASCII art banner
│ └── table.ts # Table formattingHow Auth Works
- Run
patreon login— Playwright opens Chrome topatreon.com/login - Log in manually (email/password, Google, etc.)
- After redirect, all Patreon cookies are captured and saved to
.patreon-config.json - Other commands restore these cookies to authenticate headless sessions
License
MIT
