Generate social media posts from source content, publish to 33+ platforms via Postiz.
Write once, post everywhere. PosTree generates platform-specific content from articles, papers, or any text using LLMs (Claude, GPT-4, Gemini). Postiz handles OAuth, scheduling via Temporal, and platform management.
Source content (markdown, paper, text)
↓
postree generate → platform-specific posts in ./posts/
↓
postree publish → sends to Postiz with schedule dates
↓
Postiz Temporal → publishes at scheduled time
↓
LinkedIn, Twitter/X, Mastodon, Bluesky, Instagram, YouTube, TikTok, ...
npm install -g @yonedaai/postreeThis installs the postree CLI with bundled Postiz CLI, Anthropic SDK, OpenAI SDK, and Gemini SDK.
claude plugin add /path/to/PosTreeThis adds /postree and /postree-publish commands plus the social-content skill to Claude Code. Works in any repo — just run postree init in each repo to create .env and posts/.
PosTree requires a Postiz instance to publish. Two options:
After deploy:
- Open your Postiz dashboard
- Connect your social accounts (LinkedIn, Twitter/X, etc.)
- Settings -> API Keys -> Generate a key
git clone https://github.com/gitroomhq/postiz-app && cd postiz-app
docker-compose -f docker/docker-compose.yml up -d
# Dashboard at http://localhost:5000# 1. Initialize repo
cd my-project
postree init
# Edit .env: add POSTIZ_API_URL, POSTIZ_API_KEY, ANTHROPIC_API_KEY
# 2. Run init again to auto-populate channel IDs from Postiz
postree init
# 3. Generate posts from your content
postree generate --from paper.md --platforms linkedin,twitter
# 4. Review posts in ./posts/, then publish
postree publish# From a file
postree generate --from paper.md --platforms twitter,linkedin,mastodon
# From raw text
postree generate --text "We just released v2.0" --platforms linkedin,twitter
# With scheduling (natural language)
postree generate --from paper.md --platforms linkedin,twitter --schedule "next monday 10am" --spread 7# Auto-assign dates to existing posts in ./posts/
postree schedule assign --start tomorrow --spread 14 --time 10:00
# List scheduled posts
postree schedule list# Publish all pending posts (sends to Postiz with schedule dates)
postree publish
# Publish specific file
postree publish --file posts/linkedin-announcement.md
# Only posts whose schedule has passed
postree publish --pendingPosts with a schedule: date are sent to Postiz Temporal, which publishes them at the scheduled time. Posts without a schedule are published immediately (5s delay for Temporal).
# List published posts
postree list --startDate 2026-03-01 --endDate 2026-04-01
# Delete a post from platform
postree delete <post-id>
# Upload media
postree upload <file>
# Post analytics
postree analytics <post-id>
# Connected platforms
postree channelsPosts are markdown files with YAML frontmatter in ./posts/:
---
platform: linkedin
type: post
status: pending
schedule: 2026-04-01T15:00:00Z
---
Your post content here. #hashtags #includedPlatform values: linkedin, linkedin_page, twitter, mastodon, bluesky, instagram, facebook, youtube, tiktok, threads, reddit, discord, telegram, devto, medium, hashnode, wordpress, pinterest, slack, and more.
postree init creates a .env file per repo:
# Postiz instance
POSTIZ_API_URL=https://your-instance.up.railway.app/api
POSTIZ_API_KEY=your-key
# LLM for content generation (at least one)
ANTHROPIC_API_KEY=your-key
# OPENAI_API_KEY=
# GEMINI_API_KEY=
# Channel IDs (auto-populated by postree init)
# POSTIZ_LINKEDIN=abc123...
# POSTIZ_LINKEDIN_PAGE=def456...
# POSTIZ_TWITTER=ghi789...Channel IDs are auto-populated when you run postree init with valid Postiz credentials.
PosTree includes a Claude Code plugin for conversational content creation. When working in a repo with PosTree:
You: create linkedin and twitter posts about our JAPL v0.1 release,
schedule starting next monday, spread across the week
Claude: [reads platform constraints from plugin]
[generates platform-specific posts]
[writes to ./posts/ with schedule dates]
Created:
posts/linkedin-japl-release.md (Mon 10am)
posts/twitter-japl-release.md (Wed 10am)
Want me to publish?
You: yes
Claude: [runs postree publish]
Published 2 posts via Postiz.
LinkedIn scheduled for Mon, Twitter for Wed.
The plugin provides skills for platform constraints and commands for /postree and /postree-publish.
PosTree generates content. Postiz manages everything else.
| PosTree | Postiz |
|---|---|
| LLM content generation (Claude, GPT-4, Gemini) | OAuth for 33+ platforms |
| Platform-specific formatting | Temporal scheduling & publishing |
| Natural language scheduling | Platform-side delete |
| Per-repo markdown posts | Analytics, media upload |
Zero OAuth in PosTree. Postiz holds all tokens and handles all platform APIs.