AGENT SKILL

minipostiz-reddit-setup

Reddit OAuth setup for minipostiz-cli — create script app, get client credentials, store with username/password/subreddit

License 许可
MIT
所属仓库
javimosch/supercli
最近更新
2026-11-02
Stars
★ 57
Forks
5

01 前言 Front Matter

name
minipostiz-reddit-setup
type
setup
description
Reddit OAuth setup for minipostiz-cli — create script app, get client credentials, store with username/password/subreddit

03 SKILL.md 正文

minipostiz-cli — Reddit Setup

Reddit uses OAuth2 password grant for script-type apps. You need app credentials + your account credentials + a target subreddit.

Commands

  • minipostiz-cli <resource> <action> — Execute minipostiz-cli commands
  • minipostiz auth set-x — Store X/Twitter OAuth 1.0a credentials (apiKey, apiSecret, accessToken, accessSecret)
  • minipostiz auth set-bluesky — Store Bluesky credentials (handle + app password)
  • minipostiz auth set-discord — Store Discord webhook URL
  • minipostiz auth set-telegram — Store Telegram bot token and chat ID
  • minipostiz auth set-mastodon — Store Mastodon instance URL and access token
  • minipostiz auth set-devto — Store Dev.to API key
  • minipostiz auth set-linkedin — Store LinkedIn access token and person URN
  • minipostiz auth set-reddit — Store Reddit OAuth credentials and target subreddit
  • minipostiz auth set-facebook — Store Facebook page access token and page ID
  • minipostiz auth list — List all configured social media platform credentials
  • minipostiz auth remove — Remove stored credentials for a platform
  • minipostiz auth verify — Verify stored credentials for a platform are valid
  • minipostiz post publish — Publish a message immediately to one or more social media platforms
  • minipostiz post schedule — Schedule a post for future publication on a social media platform
  • minipostiz schedule list — List scheduled posts, optionally filtered by platform
  • minipostiz schedule cancel — Cancel a scheduled post by ID
  • minipostiz history list — Show post history with optional platform and status filters
  • minipostiz platforms list — List all supported platforms and their auth requirements
  • minipostiz daemon start — Start the background scheduler daemon
  • minipostiz daemon stop — Stop the background scheduler daemon
  • minipostiz daemon status — Check if the scheduler daemon is running
  • minipostiz self status — Show minipostiz-cli system status: version, db path, platforms, daemon

What you need

Credential Flag
Client ID --clientId
Client Secret --clientSecret
Reddit Username --username
Reddit Password --password
Target Subreddit --subreddit

Step 1 — Create a Reddit App

  1. Go to https://www.reddit.com/prefs/apps
  2. Scroll down → click Create another app...
  3. Fill in:
    • Name: minipostiz (or any name)
    • Type: select script (important — other types won't work with password grant)
    • Description: optional
    • Redirect URI: http://localhost (required, not used)
  4. Click Create app
  5. Note:
    • Client ID — the string under your app name (looks like abc123xyz)
    • Client Secret — shown as "secret" field

Step 2 — Check posting permissions

  • Your Reddit account must have sufficient karma to post to most subreddits
  • Some subreddits require account age minimums
  • Test with a subreddit you own or moderate first (e.g. u_yourname — your profile subreddit)

Step 3 — Store in minipostiz-cli

minipostiz auth --platform reddit \
  --clientId "abc123xyz" \
  --clientSecret "YOUR_CLIENT_SECRET" \
  --username "your_reddit_username" \
  --password "your_reddit_password" \
  --subreddit "test"

# Or via supercli
sc minipostiz auth set-reddit \
  --clientId "abc123xyz" \
  --clientSecret "YOUR_CLIENT_SECRET" \
  --username "your_reddit_username" \
  --password "your_reddit_password" \
  --subreddit "test"

Use your own subreddit u_yourusername (profile posts) or a subreddit you own for testing.


Step 4 — Test

minipostiz auth verify --platform reddit
minipostiz publish --platform reddit --message "# Test Post

This is a test post via minipostiz-cli."

Post format

Reddit posts are self (text) posts. minipostiz-cli maps:

  • First line → post title (markdown heading stripped)
  • Remaining lines → post body (markdown supported)
minipostiz publish --platform reddit --message "# Post Title

Post body with **markdown** support."

Posting to different subreddits

The subreddit stored in auth is the default. To override:

# Store multiple reddit auth entries by adding extra credentials
# (minipostiz stores one per platform — change subreddit in auth to switch)
minipostiz auth --platform reddit --clientId ID --clientSecret S \
  --username U --password P --subreddit "anothersubreddit"

Troubleshooting

Error Cause Fix
invalid_grant Wrong username/password, or 2FA enabled Disable 2FA or use password without special chars
403 Forbidden Subreddit posting restricted Try your profile subreddit u_yourusername
RATELIMIT Too many requests Reddit limits to ~1 post per 10 minutes
SUBREDDIT_NOTALLOWED Account karma/age too low Post to your own subreddit first
invalid_client Wrong app type Ensure app type is script, not web/installed

Token lifetime

Reddit password-grant tokens expire after 24 hours. minipostiz-cli re-authenticates automatically on each post using your stored credentials.

Security note

Storing your Reddit password in minipostiz-cli's SQLite DB (~/.minipostiz/minipostiz.db) is safe for personal use. For shared environments, use a dedicated alt account.

04 同仓库更多 Skills