🚀 PostPilot (X-PostPilot)
Your Personal AI Content Management & Publishing Copilot for X (Twitter).
One Engine. Dual Interfaces (CLI + Telegram). 100% $0-First & Ban-Proof.
💡 The Reality: Standard social tools either lock you into $30-$100/mo subscriptions, require expensive pay-per-use X API credits ($0.015/post or $0.20/link post), or use unofficial browser scrapers that get your personal account banned.
PostPilot fixes this. It lets you brainstorm, draft, review, schedule, and publish high-impact X content using free AI quotas (Groq / Gemini / local Ollama), a crash-proof local scheduler, and a private Telegram control room — with zero required API fees.
Features • Architecture • Quickstart • Telegram Setup • TweetDNA Intelligence • CLI Cheatsheet • Deploy to Render • Documentation • License
🔥 Key Features
🧠 Multi-Provider AI Brain ($0-First)
- Groq (Default): Generates high-velocity, scroll-stopping post variants in $<2$ seconds using LLaMA-3 / GPT-OSS models.
- Google Gemini: Deep content planning and long-form breakdown using Gemini's generous free tier.
- Ollama: 100% private, offline generation with zero internet reliance.
- Strict Guardrails: Built-in validator guarantees every post stays strictly under 280 characters with no corporate fluff or repetitive buzzwords.
🧬 TweetDNA Creator Intelligence & Style Cloning
- Anonymous Public Tweet Scraping ($0 Ban-Proof): Scrapes recent public tweets from creators you admire (
@levelsio,@swyx,@shl,@karpathy) without using your personal account or paid APIs. - 4-Layer DNA Extraction: Deconstructs Content Pillars, Tweet Formats, Writing Rhythm, and Hook Formulas.
- Multi-Creator Synthesis: Blends the best traits of 5-10 creators into original content tailored to your niche.
⏰ Hourly Content Delivery (8:00 AM – 11:59 PM)
- Automatically delivers 4–5 fresh post cards every hour directly to your Telegram chat during active hours.
- Each card comes with a
[🚀 Post to X Now (Auto-Approves)]button that opens the pre-filled X composer on your phone in 1 tap! - On-demand requests anytime:
/ideas [count]or/inspire @creator [count].
🎭 CreatorDNA Content Profiling
- Generates posts that sound like you, not a boilerplate corporate bot.
- Configurable content pillars (e.g., Software Engineering, AI Tools, Building in Public), voice guidelines, and excluded phrases.
🛡️ $0 Dual-Mode Publishing (Zero Ban Risk)
- Method A: Manual Handoff ($0 Cost - Recommended):
When a scheduled post is due, PostPilot copies the post to your system clipboard and delivers a pre-formatted push notification to your phone via Telegram with a one-tap link to X's official web compose intent. No X API fees, zero chance of account suspension. - Method B: Official X API v2 (Optional):
Supports OAuth 1.0a User-Context authentication for full programmatic publishing when official credits are available. Automatically falls back to manual handoff if credits run out.
📱 Private Telegram Remote Control
- Single-user authenticated bot locked to your personal
TELEGRAM_OWNER_ID. - Generate, inspect, approve, reject, and schedule posts directly from your phone while on the go.
⚡ Autopilot with Emergency Kill-Switch
- Rotates content pillars throughout the day.
- Supports Assisted Autopilot (drafts content automatically and pings you on Telegram for one-tap approval) and Autonomous Autopilot (auto-schedules directly).
- Instant emergency pause button (
postpilot autopilot pauseor Telegram/pause).
🏛️ System Architecture
PostPilot is built on a clean, decoupled modular architecture: "One Engine, Multiple Interfaces."
+-------------------------------------------------------------------------+
| INTERFACES |
| |
| +---------------------------+ +--------------------------+ |
| | Typer CLI | | Telegram Bot Engine | |
| | (Rich terminal UI) | | (Long-polling, Inline KB)| |
| +-------------+-------------+ +------------+-------------+ |
+--------------------|--------------------------------|-------------------+
| |
+---------------+----------------+
|
+------------------------------------v------------------------------------+
| APPLICATION SERVICES |
| |
| +-------------------+ +-------------------+ +-------------------+ |
| | ContentService | | DraftService | | QueueService | |
| +-------------------+ +-------------------+ +-------------------+ |
| | ApprovalService | | SchedulingService | | DNAService | |
| +-------------------+ +-------------------+ +-------------------+ |
| | AutopilotService | | PublishingService | |
| +-------------------+ +------------------------------------------+ |
+--------------------|-------------------|--------------------|-----------+
| | |
+---------------+ | +---------------+
| | |
+----v-----------------+ +----------v----------+ +------------------v---+
| AI & TWEETDNA LAYER | | PUBLISHING LAYER | | DATA & SCHEDULER |
| | | | | |
| +------------------+ | | +-----------------+ | | +------------------+ |
| | TweetDNAAnalyzer | | | | BasePublisher | | | | APScheduler | |
| +------------------+ | | +--------+--------+ | | | (Hourly Drops) | |
| | TweetDNAGenerator| | | | | | +------------------+ |
| +------------------+ | | +-----+----+ | | | SQLite Store | |
| | AIRouter (Groq/ | | | +--v----+ +---v---+ | | +------------------+ |
| | Gemini/Ollama) | | | |Manual | |X API | | | | SQLAlchemy Repos | |
| +------------------+ | | |Handoff| | v2 | | | | (postpilot.db) | |
+----------------------+ +---------+ +-------+ + +----------------------+
⚡ 60-Second Quickstart
1. Installation
Option A: Install directly via PyPI (Recommended)
pip install postpilot
Option B: Clone for local development
git clone https://github.com/devFiend/X-PostPilot.git
cd X-PostPilot
python -m venv .venv
# Activate on Windows:
.venv\Scripts\activate
# Activate on macOS/Linux:
source .venv/bin/activate
# Install in editable mode
pip install -e .
3. Configure environment
Copy .env.example to .env:
cp .env.example .env
Open .env and add your free Groq API Key:
GROQ_API_KEY=gsk_your_free_key_here
4. Verify system with Doctor
python -m postpilot.cli doctor
🧬 TweetDNA Creator Intelligence
Reverse-engineer how your favorite creators write and synthesize their styles into your niche:
Track a Creator (CLI or Telegram)
postpilot dna track @levelsio
postpilot dna track @swyx
In Telegram, simply send:
/track @levelsio
PostPilot anonymously scrapes their recent public tweets, extracts their Tone, Hook Patterns, and Writing Frameworks, and adds them to your active creator intelligence pool!
Generate Posts From Your Creator Pool
# Generate 4 on-demand posts across your tracked creators
postpilot dna ideas --count 4
In Telegram:
/ideas 2— Returns 2 on-demand post cards./inspire @levelsio 2— Drafts 2 posts specifically mimicking@levelsio's voice./creators— Lists all creators in your active intelligence pool.
🤖 Linking Your Telegram Bot
Manage your queue and approve posts from your couch in under 2 minutes:
- Create Bot: Search for @BotFather on Telegram $\rightarrow$ send
/newbot$\rightarrow$ copy your API Token. - Get Your User ID: Search for @userinfobot on Telegram $\rightarrow$ click start $\rightarrow$ copy your numerical ID.
- Save to
.env:TELEGRAM_BOT_TOKEN=7123456789:AAFlM_... TELEGRAM_OWNER_ID=123456789
- Launch Bot:
python -m postpilot.cli telegram
- Open your bot in Telegram and send
/track @levelsioor/ideas.
☁️ Deploying to Render (24/7 Hosting)
PostPilot includes native Render support (render.yaml Blueprint) so your Telegram Bot and Hourly Drops run 24/7 in the cloud for free:
- Push this repository to your GitHub.
- Log into Render.com.
- Click New + $\rightarrow$ Blueprint.
- Connect your
X-PostPilotrepository. - Render will detect
render.yaml. Fill in your environment variables:GROQ_API_KEY: your free Groq keyTELEGRAM_BOT_TOKEN: your BotFather tokenTELEGRAM_OWNER_ID: your numerical Telegram ID
- Click Apply. Render will build and deploy PostPilot with automatic health checks!
💻 CLI Cheatsheet
| Command | Description | Example |
|---|---|---|
postpilot start |
Run unified daemon (Scheduler + Telegram + Health Check) | postpilot start |
postpilot doctor |
Run diagnostic check on AI keys, DB, and Telegram | postpilot doctor |
postpilot dna track |
Track and analyze a creator's Content DNA | postpilot dna track @levelsio |
postpilot dna list |
List all tracked creators in intelligence pool | postpilot dna list |
postpilot dna ideas |
Generate posts synthesized from creator pool | postpilot dna ideas --count 4 |
postpilot generate |
Generate multiple post options with AI | postpilot generate -t "Clean Architecture" -c 3 |
postpilot drafts |
Browse all saved drafts | postpilot drafts |
postpilot approve |
Approve a draft for scheduling | postpilot approve 1 |
postpilot schedule |
Schedule an approved post | postpilot schedule 1 --at "2026-11-25 18:30" |
postpilot queue |
View pending scheduled posts | postpilot queue |
postpilot publish |
Dispatch post (copies text & opens compose link) | postpilot publish 1 |
postpilot run |
Run background scheduler worker loop | postpilot run |
postpilot telegram |
Run Telegram bot long-polling daemon | postpilot telegram |
postpilot autopilot |
Manage autopilot states & cycles | postpilot autopilot run-cycle |
📚 Deep Documentation
Comprehensive architectural design, specifications, and test documentation:
- 📖 Product Requirements Document (PRD): Vision, functional scope, personas, and platform policies.
- 📐 System Architecture: Clean architecture layers, database schemas (ERD), and sequence diagrams.
- 🗺️ 2-Phase Development Flow: Full implementation roadmap and milestone verification.
- 🧪 Testing Strategy: Test suite design, invariant testing, and mocking guide.
🧪 Testing
PostPilot includes a complete test suite covering AI parsing, TweetDNA extraction, database repositories, state machine invariants, scheduler recovery, and security firewalls:
# Run full test suite
python -m pytest
# Run with verbose output
python -m pytest -v
📄 License
Distributed under the MIT License. See LICENSE for more information.
Give this repository a ⭐ if it helps your content workflow!
Metadata
Release files for postpilot 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| postpilot-0.1.0.tar.gz | 54.0 kB | With provenance | Details for postpilot-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| postpilot-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for postpilot-0.1.0-py3-none-any.whl |
Total release size: 112.9 kB
Release files / postpilot-0.1.0.tar.gz
| Download URL | postpilot-0.1.0.tar.gz |
|---|---|
| Size | 54.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2310914b1c235d69ecd1818d35431178eec370aaac87cf17ad26b1b302de880c
|
|
BLAKE2b-256 checksum How to use checksums |
544cfcfe7d5214d3d79dda1fd72a05741e5908d0f190278503bcb91f91f22c9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / postpilot-0.1.0-py3-none-any.whl
| Download URL | postpilot-0.1.0-py3-none-any.whl |
|---|---|
| Size | 59.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11f0b88384f7c06ca1e5d0e588a1b319c35534264aae32883243c867668fd333
|
|
BLAKE2b-256 checksum How to use checksums |
a521fea3307e9258a58ea72a1d0d0868661bcfbc280ec6733ea3815bc59f396e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for postpilot 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for postpilot-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.