CLI tool for AI-powered social media content generation and publishing
Project description
Social Plugin
AI-powered CLI tool for social media content generation and publishing, focused on Physical AI & Robotics.
Discovers trending topics via RSS feeds, reads reference content from local files/Google Docs/PDFs, uses AI to generate tweet and LinkedIn post drafts, and posts approved content.
Quick Start
macOS / Linux:
pipx install social-plugin
social-plugin init
Windows (PowerShell):
pipx install social-plugin
social-plugin init
The init wizard walks you through choosing an AI provider, entering API keys, setting your local docs folder, and configuring your topics.
Prerequisites
You need an API key from at least one provider:
| Provider | Get API Key | Models |
|---|---|---|
| Anthropic | console.anthropic.com | claude-sonnet-4-5-20250929, claude-opus-4-6 |
| OpenAI | platform.openai.com | gpt-4o, gpt-4o-mini, o1, o3-mini |
| aistudio.google.com | gemini-2.0-flash, gemini-2.5-pro |
For posting to Twitter/X, you also need API keys from developer.x.com.
Manual Install (from source)
git clone https://github.com/nirmalsharma/social-plugin.git
cd social-plugin
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
cp config/config.example.yaml config/config.yaml
cp .env.example .env
# Edit .env with your API keys
social-plugin --help
Configuration
After running social-plugin init, config is stored in:
- macOS:
~/Library/Application Support/social-plugin/config.yaml - Linux:
~/.config/social-plugin/config.yaml - Windows:
%APPDATA%\social-plugin\config.yaml
If running from the repo directory, ./config/config.yaml takes priority (development mode).
Multi-Provider Config
generation:
provider: "anthropic" # "anthropic", "openai", or "google"
model: "claude-sonnet-4-5-20250929" # or "gpt-4o", "gemini-2.0-flash"
max_tokens: 4096
temperature: 0.7
Provider is auto-detected from the model name if not set. Set the matching env var:
ANTHROPIC_API_KEYfor Claude modelsOPENAI_API_KEYfor GPT/o1/o3 modelsGOOGLE_API_KEYfor Gemini models
Usage
Typical Workflow
social-plugin fetch-trends # 1. Get latest trending topics
social-plugin fetch-sources # 2. Read local docs/PDFs
social-plugin generate # 3. Generate AI drafts
social-plugin drafts # 4. Review pending drafts
social-plugin approve <id> # 5. Approve a draft
social-plugin post --id <id> # 6. Post to Twitter/LinkedIn
Or run steps 1-3 in one command:
social-plugin run-all
All Commands
| Command | Description |
|---|---|
init |
Interactive setup wizard |
config --show |
Show config paths and active provider |
fetch-trends |
Fetch trending topics from RSS feeds |
fetch-sources |
Read configured Google Docs, PDFs, local files |
generate |
Generate 1 tweet + 1 LinkedIn draft |
generate --dry-run |
Preview without saving |
drafts |
List pending drafts |
drafts --status all |
List all drafts |
show <id> |
Full draft details |
review <id> |
Interactive review (approve/edit/regen/reject) |
approve <id> |
Approve for posting |
reject <id> -n "reason" |
Reject with notes |
edit <id> |
Open in $EDITOR |
regen <id> -t "casual" |
Regenerate with new tone |
post --id <id> |
Post specific draft |
post --all-approved |
Post all approved drafts |
run-all |
Full pipeline: trends + sources + generate |
stats |
Analytics dashboard |
history --days 30 |
Content history |
expire |
Expire old pending drafts |
auth-check |
Verify API credentials |
Draft Lifecycle
PENDING → approve → APPROVED → post → POSTED
↓ ↑ ↓
reject regen(tone) FAILED
↓
REJECTED
↓
expire (7 days) → EXPIRED
Development
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
python -m pytest tests/ -v
Install from TestPyPI
To test a pre-release build before it goes to PyPI:
pipx install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ social-plugin
Publishing
CI publishes automatically on tag push via GitHub Actions:
git tag v0.1.0
git push --tags
This triggers: build → TestPyPI → PyPI (sequential, OIDC trusted publishing).
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file
social_plugin-0.1.6.tar.gz.File metadata
File hashes
a3b8d069e45342dccbc964da238111ffd0cb65c3c46045ecd32c90304db3e0859be01b7a0988bfed9851d49748d084d63d9c5bb1e103b065adbc2d135a90105bc4156977ed53ea2f8f1627d6dc4f74dcSee more details on using hashes here.
Provenance
The following attestation bundles were made for
social_plugin-0.1.6.tar.gz:Publisher:
Attestations: Values shown here reflect the state when the release was signed and may no longer be current.publish.ymlon sharmanirmal/social-plugin-
Statement type:
-
Predicate type:
-
Subject name:
-
Subject digest:
-
Sigstore transparency entry: 1001681387
- Sigstore integration time:
Source repository:https://in-toto.io/Statement/v1https://docs.pypi.org/attestations/publish/v1social_plugin-0.1.6.tar.gza3b8d069e45342dccbc964da238111ffd0cb65c3c46045ecd32c90304db3e085-
Permalink:
-
Branch / Tag:
-
Owner: https://github.com/sharmanirmal
-
Access:
Publication detail:sharmanirmal/social-plugin@f2d43a479118a639954ef8ec99eefa8168229d89refs/tags/v0.1.6publichttps://token.actions.githubusercontent.comgithub-hostedpublish.yml@f2d43a479118a639954ef8ec99eefa8168229d89push