Initial commit with translated description

This commit is contained in:
2026-03-29 13:08:26 +08:00
commit 2be840545d
26 changed files with 6593 additions and 0 deletions

View File

@@ -0,0 +1,342 @@
# Postiz CLI - Command Line Guide
## New Syntax: Multiple `-c` and `-m` Flags
The CLI now supports a much more intuitive syntax for creating posts with comments that have their own media.
## Basic Syntax
```bash
postiz posts:create \
-c "content" -m "media" \ # Can be repeated multiple times
-c "content" -m "media" \ # Each pair = one post/comment
-i "integration-id"
```
### How It Works
- **First `-c`**: Main post content
- **Subsequent `-c`**: Comments/replies
- **Each `-m`**: Media for the corresponding `-c`
- `-m` is optional (text-only posts/comments)
- Order matters: `-c` and `-m` are paired in order
## Examples
### 1. Simple Post
```bash
postiz posts:create \
-c "Hello World!" \
-i "twitter-123"
```
### 2. Post with Multiple Images
```bash
postiz posts:create \
-c "Check out these photos!" \
-m "photo1.jpg,photo2.jpg,photo3.jpg" \
-i "twitter-123"
```
**Result:**
- Main post with 3 images
### 3. Post with Comments, Each Having Their Own Media
```bash
postiz posts:create \
-c "Main post 🚀" \
-m "main-image1.jpg,main-image2.jpg" \
-c "First comment 📸" \
-m "comment1-image.jpg" \
-c "Second comment 🎨" \
-m "comment2-img1.jpg,comment2-img2.jpg" \
-i "twitter-123"
```
**Result:**
- Main post with 2 images
- First comment (posted 5s later) with 1 image
- Second comment (posted 10s later) with 2 images
### 4. Comments Can Contain Semicolons! 🎉
```bash
postiz posts:create \
-c "Main post" \
-c "First comment; with a semicolon!" \
-c "Second comment; with multiple; semicolons; works fine!" \
-i "twitter-123"
```
**No escaping needed!** Each `-c` is a separate argument, so special characters work perfectly.
### 5. Twitter Thread
```bash
postiz posts:create \
-c "🧵 Thread about X (1/5)" \
-m "thread1.jpg" \
-c "Key point 1 (2/5)" \
-m "thread2.jpg" \
-c "Key point 2 (3/5)" \
-m "thread3.jpg" \
-c "Key point 3 (4/5)" \
-m "thread4.jpg" \
-c "Conclusion 🎉 (5/5)" \
-m "thread5.jpg" \
-d 2000 \
-i "twitter-123"
```
**Result:** 5-part thread with 2-second delays between tweets
### 6. Mix: Some with Media, Some Without
```bash
postiz posts:create \
-c "Amazing sunset! 🌅" \
-m "sunset.jpg" \
-c "Taken at 6:30 PM" \
-c "Location: Santa Monica Beach" \
-c "Camera: iPhone 15 Pro" \
-i "twitter-123"
```
**Result:**
- Main post with 1 image
- 3 text-only comments
### 7. Multi-Platform with Same Content
```bash
postiz posts:create \
-c "Big announcement! 🎉" \
-m "announcement.jpg" \
-c "More details coming soon..." \
-i "twitter-123,linkedin-456,facebook-789"
```
**Result:** Same post + comment posted to all 3 platforms
### 8. Scheduled Post with Follow-ups
```bash
postiz posts:create \
-c "Product launching today! 🚀" \
-m "product-hero.jpg,product-features.jpg" \
-c "Special launch offer: 50% off!" \
-m "discount-banner.jpg" \
-c "Limited to first 100 customers!" \
-s "2024-12-25T09:00:00Z" \
-i "twitter-123"
```
**Result:** Scheduled main post with 2 follow-up comments
### 9. Product Tutorial
```bash
postiz posts:create \
-c "Tutorial: How to Use Feature X 📖" \
-m "tutorial-intro.jpg" \
-c "Step 1: Open the settings menu" \
-m "step1-screenshot.jpg" \
-c "Step 2: Toggle the feature on" \
-m "step2-screenshot.jpg" \
-c "Step 3: Customize your preferences" \
-m "step3-screenshot.jpg" \
-c "That's it! You're all set 🎉" \
-d 3000 \
-i "twitter-123"
```
## Options Reference
| Flag | Alias | Description | Multiple? |
|------|-------|-------------|-----------|
| `--content` | `-c` | Post/comment content | ✅ Yes |
| `--media` | `-m` | Comma-separated media URLs | ✅ Yes |
| `--integrations` | `-i` | Comma-separated integration IDs | ❌ No |
| `--schedule` | `-s` | ISO 8601 date (schedule post) | ❌ No |
| `--delay` | `-d` | Delay between comments (minutes) | ❌ No |
| `--shortLink` | - | Use URL shortener | ❌ No |
| `--json` | `-j` | Load from JSON file | ❌ No |
## How `-c` and `-m` Pair Together
```bash
postiz posts:create \
-c "First content" -m "first-media.jpg" \ # Pair 1 → Main post
-c "Second content" -m "second-media.jpg" \ # Pair 2 → Comment 1
-c "Third content" -m "third-media.jpg" \ # Pair 3 → Comment 2
-i "twitter-123"
```
**Pairing logic:**
- 1st `-c` pairs with 1st `-m` (if provided)
- 2nd `-c` pairs with 2nd `-m` (if provided)
- 3rd `-c` pairs with 3rd `-m` (if provided)
- If no `-m` for a `-c`, it's text-only
## Delay Between Comments
Use `-d` or `--delay` to set the delay (in minutes) between comments:
```bash
postiz posts:create \
-c "Main post" \
-c "Comment 1" \
-c "Comment 2" \
-d 10 \ # 10 minutes between each
-i "twitter-123"
```
**Default:** 0 (no delay)
## Comparison: Old vs New Syntax
### ❌ Old Way (Limited)
```bash
# Could only do simple comments without custom media
postiz posts:create \
-c "Main post" \
--comments "Comment 1;Comment 2;Comment 3" \
--image "main-image.jpg" \
-i "twitter-123"
```
**Problems:**
- Comments couldn't have their own media
- Semicolons in content would break it
- Less intuitive
### ✅ New Way (Flexible)
```bash
postiz posts:create \
-c "Main post" -m "main.jpg" \
-c "Comment 1; with semicolon!" -m "comment1.jpg" \
-c "Comment 2" -m "comment2.jpg" \
-i "twitter-123"
```
**Benefits:**
- ✅ Each comment can have its own media
- ✅ Semicolons work fine
- ✅ More readable
- ✅ More flexible
## When to Use JSON vs Command Line
### Use Command Line (`-c` and `-m`) When:
- ✅ Same content for all integrations
- ✅ Simple, straightforward posts
- ✅ Quick one-off posts
- ✅ Scripting with dynamic content
### Use JSON (`--json`) When:
- ✅ Different content per platform
- ✅ Complex settings or metadata
- ✅ Reusable post templates
- ✅ Very long or formatted content
## Tips for AI Agents
### Generate Commands Programmatically
```bash
# Generate a thread command with multiple tweets
postiz posts:create \
-c "Tweet 1/3" \
-m "img1.jpg" \
-c "Tweet 2/3" \
-m "img2.jpg" \
-c "Tweet 3/3" \
-m "img3.jpg" \
-i "twitter-123"
```
### Escape Special Characters
In bash, you may need to escape some characters:
```bash
# Single quotes prevent interpolation
postiz posts:create \
-c 'Message with $variables and "quotes"' \
-i "twitter-123"
# Or use backslashes
postiz posts:create \
-c "Message with \$variables and \"quotes\"" \
-i "twitter-123"
```
## Error Handling
### Missing Integration
```bash
postiz posts:create -c "Post" -m "img.jpg"
# ❌ Error: --integrations is required when not using --json
```
**Fix:** Add `-i` flag
### No Content
```bash
postiz posts:create -i "twitter-123"
# ❌ Error: Either --content or --json is required
```
**Fix:** Add at least one `-c` flag
### Mismatched Count (OK!)
```bash
# This is fine! Extra -m flags are ignored
postiz posts:create \
-c "Post 1" -m "img1.jpg" \
-c "Post 2" \
-c "Post 3" -m "img3.jpg" \
-i "twitter-123"
# Result:
# - Post 1 with img1.jpg
# - Post 2 with no media
# - Post 3 with img3.jpg
```
## Full Example: Product Launch
```bash
#!/bin/bash
export POSTIZ_API_KEY=your_key
postiz posts:create \
-c "🚀 Launching ProductX today!" \
-m "https://cdn.example.com/hero.jpg,https://cdn.example.com/features.jpg" \
-c "🎯 Key Features:\n• AI-powered\n• Cloud-native\n• Open source" \
-m "https://cdn.example.com/features-detail.jpg" \
-c "💰 Special launch pricing: 50% off for early adopters!" \
-m "https://cdn.example.com/pricing.jpg" \
-c "🔗 Get started: https://example.com/productx" \
-s "2024-12-25T09:00:00Z" \
-d 3600000 \
-i "twitter-123,linkedin-456,facebook-789"
echo "✅ Product launch scheduled!"
```
## See Also
- **EXAMPLES.md** - JSON file examples
- **SKILL.md** - AI agent patterns
- **README.md** - Full documentation
- **examples/*.json** - Template files

310
examples/EXAMPLES.md Normal file
View File

@@ -0,0 +1,310 @@
# Postiz CLI - Advanced Examples
This directory contains examples demonstrating the full capabilities of the Postiz CLI, including posts with comments and multiple media.
## Understanding the Post Structure
The Postiz API supports a rich post structure:
```typescript
{
type: 'now' | 'schedule' | 'draft' | 'update',
date: string, // ISO 8601 date
shortLink: boolean, // Use URL shortener
tags: Tag[], // Post tags
posts: [ // Can post to multiple platforms at once
{
integration: { id: string }, // Platform integration ID
value: [ // Main post + comments/thread
{
content: string, // Post/comment text
image: MediaDto[], // Multiple media attachments
delay?: number // Delay in minutes before posting (for comments)
},
// ... more comments
],
settings: { __type: 'EmptySettings' }
}
]
}
```
## Simple Usage Examples
### Basic Post
```bash
postiz posts:create \
-c "Hello World!" \
-i "twitter-123"
```
### Post with Multiple Images
```bash
postiz posts:create \
-c "Check out these images!" \
--image "https://example.com/img1.jpg,https://example.com/img2.jpg,https://example.com/img3.jpg" \
-i "twitter-123"
```
### Post with Comments (Simple)
```bash
postiz posts:create \
-c "Main post content" \
--comments "First comment;Second comment;Third comment" \
-i "twitter-123"
```
### Scheduled Post
```bash
postiz posts:create \
-c "Future post" \
-s "2024-12-31T12:00:00Z" \
-i "twitter-123,linkedin-456"
```
## Advanced JSON Examples
For complex posts with comments that have their own media, use JSON files:
### 1. Post with Comments and Media
**File:** `post-with-comments.json`
```bash
postiz posts:create --json examples/post-with-comments.json
```
This creates:
- Main post with 2 images
- First comment with 1 image (posted 5s after main)
- Second comment with 2 images (posted 10s after main)
### 2. Multi-Platform Campaign
**File:** `multi-platform-post.json`
```bash
postiz posts:create --json examples/multi-platform-post.json
```
This creates:
- Twitter post with main + comment
- LinkedIn post with single content
- Facebook post with main + comment
All scheduled for the same time with platform-specific content and media!
### 3. Twitter Thread
**File:** `thread-post.json`
```bash
postiz posts:create --json examples/thread-post.json
```
This creates a 5-part Twitter thread, with each tweet having its own image and a 2-second delay between tweets.
## JSON File Structure Explained
### Basic Structure
```json
{
"type": "now", // "now", "schedule", "draft", "update"
"date": "2024-01-15T12:00:00Z", // When to post (ISO 8601)
"shortLink": true, // Enable URL shortening
"tags": [], // Array of tags
"posts": [...] // Array of posts
}
```
### Post Structure
```json
{
"integration": {
"id": "twitter-123" // Get this from integrations:list
},
"value": [ // Array of content (main + comments)
{
"content": "Post text", // The actual content
"image": [ // Array of media
{
"id": "unique-id", // Unique identifier
"path": "https://..." // URL to the image
}
],
"delay": 5 // Optional delay in minutes
}
],
"settings": {
"__type": "EmptySettings" // Platform-specific settings
}
}
```
## Use Cases
### 1. Product Launch Campaign
Create a coordinated multi-platform launch:
```json
{
"type": "schedule",
"date": "2024-03-15T09:00:00Z",
"posts": [
{
"integration": { "id": "twitter-id" },
"value": [
{ "content": "🚀 Launching today!", "image": [...] },
{ "content": "Special features:", "image": [...], "delay": 3600000 },
{ "content": "Get it now:", "image": [...], "delay": 7200000 }
]
},
{
"integration": { "id": "linkedin-id" },
"value": [
{ "content": "Professional announcement...", "image": [...] }
]
}
]
}
```
### 2. Tutorial Series
Create an educational thread:
```json
{
"type": "now",
"posts": [
{
"integration": { "id": "twitter-id" },
"value": [
{ "content": "🧵 How to X (1/5)", "image": [...] },
{ "content": "Step 1: ... (2/5)", "image": [...], "delay": 2000 },
{ "content": "Step 2: ... (3/5)", "image": [...], "delay": 2000 },
{ "content": "Step 3: ... (4/5)", "image": [...], "delay": 2000 },
{ "content": "Conclusion (5/5)", "image": [...], "delay": 2000 }
]
}
]
}
```
### 3. Event Coverage
Live event updates with media:
```json
{
"type": "now",
"posts": [
{
"integration": { "id": "twitter-id" },
"value": [
{
"content": "📍 Event starting now!",
"image": [
{ "id": "1", "path": "venue-photo.jpg" }
]
},
{
"content": "First speaker taking stage",
"image": [
{ "id": "2", "path": "speaker-photo.jpg" }
],
"delay": 1800000
}
]
}
]
}
```
## Getting Integration IDs
Before creating posts, get your integration IDs:
```bash
postiz integrations:list
```
Output:
```json
[
{ "id": "abc-123-twitter", "provider": "twitter", "name": "@myaccount" },
{ "id": "def-456-linkedin", "provider": "linkedin", "name": "My Company" }
]
```
Use these IDs in your `integration.id` fields.
## Tips for AI Agents
1. **Use JSON for complex posts** - If you need comments with media, always use JSON files
2. **Delays matter** - Use appropriate delays between comments (Twitter: 2-5s, others: 30s-1min)
3. **Image IDs** - Generate unique IDs for each image (can use UUIDs or random strings)
4. **Validate before sending** - Check that all integration IDs exist
5. **Test with "draft" type** - Use `"type": "draft"` to create without posting
## Automation Scripts
### Batch Create from Directory
```bash
#!/bin/bash
# Create posts from all JSON files in a directory
for file in posts/*.json; do
echo "Creating post from $file..."
postiz posts:create --json "$file"
sleep 2
done
```
### Generate JSON Programmatically
```bash
# Generate a thread JSON file
cat > thread.json << 'EOF'
{
"type": "now",
"date": "2024-12-31T12:00:00Z",
"shortLink": true,
"tags": [],
"posts": [{
"integration": { "id": "twitter-123" },
"value": [
{ "content": "Tweet 1", "image": [] },
{ "content": "Tweet 2", "image": [], "delay": 2000 },
{ "content": "Tweet 3", "image": [], "delay": 2000 }
],
"settings": { "__type": "EmptySettings" }
}]
}
EOF
# Post using the JSON file
postiz posts:create --json thread.json
```
## Error Handling
Common errors and solutions:
1. **Invalid integration ID** - Run `integrations:list` to get valid IDs
2. **Invalid image path** - Ensure images are accessible URLs or uploaded to Postiz first
3. **Missing required fields** - Check that `type`, `date`, `shortLink`, `tags`, and `posts` are all present
4. **Invalid date format** - Use ISO 8601 format: `YYYY-MM-DDTHH:mm:ssZ`
## Further Reading
- See `SKILL.md` for AI agent patterns
- See `README.md` for installation and setup
- See `QUICK_START.md` for basic usage

42
examples/basic-usage.sh Normal file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
# Basic Postiz CLI Usage Example
# Make sure to set your API key first: export POSTIZ_API_KEY=your_key
echo "🚀 Postiz CLI Example Workflow"
echo ""
# Check if API key is set
if [ -z "$POSTIZ_API_KEY" ]; then
echo "❌ POSTIZ_API_KEY is not set!"
echo "Set it with: export POSTIZ_API_KEY=your_api_key"
exit 1
fi
echo "✅ API key is set"
echo ""
# 1. List integrations
echo "📋 Step 1: Listing connected integrations..."
postiz integrations:list
echo ""
# 2. Create a post
echo "📝 Step 2: Creating a test post..."
postiz posts:create \
-c "Hello from Postiz CLI! This is an automated test post." \
-s "$(date -u -v+1H +%Y-%m-%dT%H:%M:%SZ)" # Schedule 1 hour from now
echo ""
# 3. List posts
echo "📋 Step 3: Listing recent posts..."
postiz posts:list -l 5
echo ""
echo "✅ Example workflow completed!"
echo ""
echo "💡 Tips:"
echo " - Use -i flag to specify integrations when creating posts"
echo " - Upload images with: postiz upload ./path/to/image.png"
echo " - Delete posts with: postiz posts:delete <post-id>"
echo " - Get help: postiz --help"

View File

@@ -0,0 +1,153 @@
#!/bin/bash
# Postiz CLI - Command Line Examples
# Demonstrating the new -c and -m flag syntax
echo "🚀 Postiz CLI Command Line Examples"
echo ""
# Make sure API key is set
if [ -z "$POSTIZ_API_KEY" ]; then
echo "❌ POSTIZ_API_KEY is not set!"
echo "Set it with: export POSTIZ_API_KEY=your_api_key"
exit 1
fi
echo "✅ API key is set"
echo ""
# Example 1: Simple post
echo "📝 Example 1: Simple post"
echo "Command:"
echo 'postiz posts:create -c "Hello World!" -i "twitter-123"'
echo ""
# Example 2: Post with multiple images
echo "📸 Example 2: Post with multiple images"
echo "Command:"
echo 'postiz posts:create \'
echo ' -c "Check out these amazing photos!" \'
echo ' -m "photo1.jpg,photo2.jpg,photo3.jpg" \'
echo ' -i "twitter-123"'
echo ""
# Example 3: Post with comments, each having their own media
echo "💬 Example 3: Post with comments, each having different media"
echo "Command:"
echo 'postiz posts:create \'
echo ' -c "Main post content 🚀" \'
echo ' -m "main-image1.jpg,main-image2.jpg" \'
echo ' -c "First comment with its own image 📸" \'
echo ' -m "comment1-image.jpg" \'
echo ' -c "Second comment with different images 🎨" \'
echo ' -m "comment2-image1.jpg,comment2-image2.jpg" \'
echo ' -i "twitter-123"'
echo ""
# Example 4: Comments with semicolons (no escaping needed!)
echo "🎯 Example 4: Comments can contain semicolons!"
echo "Command:"
echo 'postiz posts:create \'
echo ' -c "Main post" \'
echo ' -c "First comment; notice the semicolon!" \'
echo ' -c "Second comment; with multiple; semicolons; works fine!" \'
echo ' -i "twitter-123"'
echo ""
# Example 5: Twitter thread with custom delay
echo "🧵 Example 5: Twitter thread with 2-second delays"
echo "Command:"
echo 'postiz posts:create \'
echo ' -c "🧵 How to use Postiz CLI (1/5)" \'
echo ' -m "thread-intro.jpg" \'
echo ' -c "Step 1: Install the CLI (2/5)" \'
echo ' -m "step1-screenshot.jpg" \'
echo ' -c "Step 2: Set your API key (3/5)" \'
echo ' -m "step2-screenshot.jpg" \'
echo ' -c "Step 3: Create your first post (4/5)" \'
echo ' -m "step3-screenshot.jpg" \'
echo ' -c "You'\''re all set! 🎉 (5/5)" \'
echo ' -m "done.jpg" \'
echo ' -d 2000 \'
echo ' -i "twitter-123"'
echo ""
# Example 6: Scheduled post with comments
echo "⏰ Example 6: Scheduled post with follow-up comments"
echo "Command:"
echo 'postiz posts:create \'
echo ' -c "Product launch! 🚀" \'
echo ' -m "product-hero.jpg,product-features.jpg" \'
echo ' -c "Special launch offer - 50% off!" \'
echo ' -m "discount-banner.jpg" \'
echo ' -c "Limited time only!" \'
echo ' -s "2024-12-25T09:00:00Z" \'
echo ' -i "twitter-123,linkedin-456"'
echo ""
# Example 7: Multi-platform with same content
echo "🌐 Example 7: Multi-platform posting"
echo "Command:"
echo 'postiz posts:create \'
echo ' -c "Exciting announcement! 🎉" \'
echo ' -m "announcement.jpg" \'
echo ' -c "More details in the comments..." \'
echo ' -m "details-infographic.jpg" \'
echo ' -i "twitter-123,linkedin-456,facebook-789"'
echo ""
# Example 8: Comments without media
echo "💭 Example 8: Main post with media, comments without media"
echo "Command:"
echo 'postiz posts:create \'
echo ' -c "Check out this amazing view! 🏔️" \'
echo ' -m "mountain-photo.jpg" \'
echo ' -c "Taken at sunrise this morning" \'
echo ' -c "Location: Swiss Alps" \'
echo ' -i "twitter-123"'
echo ""
# Example 9: Product tutorial series
echo "📚 Example 9: Product tutorial series"
echo "Command:"
echo 'postiz posts:create \'
echo ' -c "Tutorial: Getting Started with Our Product 📖" \'
echo ' -m "tutorial-cover.jpg" \'
echo ' -c "1. First, download and install the app" \'
echo ' -m "install-screen.jpg" \'
echo ' -c "2. Create your account and set up your profile" \'
echo ' -m "signup-screen.jpg" \'
echo ' -c "3. You'\''re ready to go! Start creating your first project" \'
echo ' -m "dashboard-screen.jpg" \'
echo ' -d 3000 \'
echo ' -i "twitter-123"'
echo ""
# Example 10: Event coverage
echo "📍 Example 10: Live event coverage"
echo "Command:"
echo 'postiz posts:create \'
echo ' -c "Conference 2024 is starting! 🎤" \'
echo ' -m "venue-photo.jpg" \'
echo ' -c "First speaker: Jane Doe talking about AI" \'
echo ' -m "speaker1-photo.jpg" \'
echo ' -c "Second speaker: John Smith on cloud architecture" \'
echo ' -m "speaker2-photo.jpg" \'
echo ' -c "Networking break! Great conversations happening" \'
echo ' -m "networking-photo.jpg" \'
echo ' -d 30000 \'
echo ' -i "twitter-123,linkedin-456"'
echo ""
echo "💡 Tips:"
echo " - Use multiple -c flags for main post + comments"
echo " - Use -m flags to specify media for each -c"
echo " - First -c is the main post, subsequent ones are comments"
echo " - -m is optional, can be omitted for text-only comments"
echo " - Use -d to set delay between comments (in milliseconds)"
echo " - Semicolons and special characters work fine in -c content!"
echo ""
echo "📖 For more examples, see:"
echo " - examples/EXAMPLES.md - Comprehensive guide"
echo " - examples/*.json - JSON file examples"
echo " - SKILL.md - AI agent patterns"

View File

@@ -0,0 +1,89 @@
{
"type": "schedule",
"date": "2024-12-25T12:00:00Z",
"shortLink": true,
"tags": [
{
"value": "holiday",
"label": "Holiday"
},
{
"value": "marketing",
"label": "Marketing"
}
],
"posts": [
{
"integration": {
"id": "twitter-integration-id"
},
"value": [
{
"content": "Happy Holidays! 🎄 Check out our special offers!",
"image": [
{
"id": "holiday1",
"path": "https://example.com/holiday-twitter.jpg"
}
]
},
{
"content": "Limited time offer - 50% off! 🎁",
"image": [],
"delay": 3600000
}
],
"settings": {
"__type": "EmptySettings"
}
},
{
"integration": {
"id": "linkedin-integration-id"
},
"value": [
{
"content": "Season's greetings from our team! We're offering exclusive holiday promotions.",
"image": [
{
"id": "holiday2",
"path": "https://example.com/holiday-linkedin.jpg"
}
]
}
],
"settings": {
"__type": "EmptySettings"
}
},
{
"integration": {
"id": "facebook-integration-id"
},
"value": [
{
"content": "🎅 Happy Holidays! Special announcement in the comments!",
"image": [
{
"id": "holiday3",
"path": "https://example.com/holiday-facebook-main.jpg"
}
]
},
{
"content": "Our holiday sale is now live! Visit our website for amazing deals 🎁",
"image": [
{
"id": "holiday4",
"path": "https://example.com/holiday-sale-banner.jpg"
}
],
"delay": 300000
}
],
"settings": {
"__type": "EmptySettings"
}
}
]
}

View File

@@ -0,0 +1,95 @@
{
"type": "schedule",
"date": "2024-03-15T09:00:00Z",
"shortLink": true,
"tags": [
{ "value": "product-launch", "label": "Product Launch" }
],
"posts": [
{
"integration": { "id": "reddit-integration-id" },
"value": [{
"content": "We're launching our new CLI tool today!\n\nIt's designed to make social media scheduling effortless for developers and AI agents. Built with TypeScript, supports 28+ platforms, and has a clean, intuitive API.\n\nFeatures:\n- Multi-platform posting\n- Thread creation\n- Scheduled posts\n- Comments with media\n- Provider-specific settings\n\nTry it out and let us know what you think!",
"image": [
{ "id": "r1", "path": "https://cdn.example.com/reddit-screenshot.jpg" }
]
}],
"settings": {
"__type": "reddit",
"subreddit": [{
"value": {
"subreddit": "programming",
"title": "Launching Postiz CLI - Social Media Automation for Developers",
"type": "text",
"url": "",
"is_flair_required": false
}
}]
}
},
{
"integration": { "id": "twitter-integration-id" },
"value": [
{
"content": "🚀 Launching Postiz CLI today!\n\nFinally, a developer-friendly way to automate social media. Built with TypeScript, supports 28+ platforms.\n\n✨ Features in thread below 👇",
"image": [
{ "id": "t1", "path": "https://cdn.example.com/twitter-banner.jpg" }
]
},
{
"content": "1⃣ Multi-platform posting\nPost to Twitter, LinkedIn, Reddit, TikTok, YouTube, and 23 more platforms with a single command",
"image": [
{ "id": "t2", "path": "https://cdn.example.com/multi-platform.jpg" }
],
"delay": 3000
},
{
"content": "2⃣ Thread creation\nEasily create Twitter threads, each tweet with its own media",
"image": [
{ "id": "t3", "path": "https://cdn.example.com/threads.jpg" }
],
"delay": 3000
},
{
"content": "3⃣ Provider-specific settings\nReddit subreddits, YouTube visibility, TikTok privacy - all configurable\n\nGet started: https://github.com/yourrepo",
"image": [],
"delay": 3000
}
],
"settings": {
"__type": "x",
"who_can_reply_post": "everyone"
}
},
{
"integration": { "id": "linkedin-integration-id" },
"value": [{
"content": "Excited to announce the launch of Postiz CLI! 🎉\n\nAs developers, we know how time-consuming social media management can be. That's why we built a powerful CLI tool that makes scheduling posts across 28+ platforms effortless.\n\nKey features:\n• Multi-platform support (Twitter, LinkedIn, Reddit, TikTok, YouTube, and more)\n• Thread and carousel creation\n• Scheduled posting with precise timing\n• Provider-specific settings and customization\n• Built for AI agents and automation\n\nWhether you're managing a personal brand, running marketing campaigns, or building AI-powered social media tools, Postiz CLI has you covered.\n\nCheck it out and let us know your thoughts!",
"image": [
{ "id": "l1", "path": "https://cdn.example.com/linkedin-slide1.jpg" },
{ "id": "l2", "path": "https://cdn.example.com/linkedin-slide2.jpg" },
{ "id": "l3", "path": "https://cdn.example.com/linkedin-slide3.jpg" }
]
}],
"settings": {
"__type": "linkedin",
"post_as_images_carousel": true,
"carousel_name": "Postiz CLI Launch"
}
},
{
"integration": { "id": "instagram-integration-id" },
"value": [{
"content": "🚀 New launch alert!\n\nPostiz CLI is here - automate your social media like a pro.\n\n✨ 28+ platforms\n📅 Scheduled posting\n🧵 Thread creation\n⚙ Full customization\n\nLink in bio! #developer #automation #socialmedia #tech",
"image": [
{ "id": "i1", "path": "https://cdn.example.com/instagram-post.jpg" }
]
}],
"settings": {
"__type": "instagram",
"post_type": "post",
"is_trial_reel": false
}
}
]
}

View File

@@ -0,0 +1,55 @@
{
"type": "now",
"date": "2024-01-15T12:00:00Z",
"shortLink": true,
"tags": [],
"posts": [
{
"integration": {
"id": "your-integration-id-here"
},
"value": [
{
"content": "This is the main post content 🚀",
"image": [
{
"id": "img1",
"path": "https://example.com/main-image.jpg"
},
{
"id": "img2",
"path": "https://example.com/secondary-image.jpg"
}
]
},
{
"content": "This is the first comment with its own media 📸",
"image": [
{
"id": "img3",
"path": "https://example.com/comment1-image.jpg"
}
],
"delay": 5000
},
{
"content": "This is the second comment with different media 🎨",
"image": [
{
"id": "img4",
"path": "https://example.com/comment2-image1.jpg"
},
{
"id": "img5",
"path": "https://example.com/comment2-image2.jpg"
}
],
"delay": 10000
}
],
"settings": {
"__type": "EmptySettings"
}
}
]
}

27
examples/reddit-post.json Normal file
View File

@@ -0,0 +1,27 @@
{
"type": "now",
"date": "2024-01-15T12:00:00Z",
"shortLink": true,
"tags": [],
"posts": [{
"integration": {
"id": "your-reddit-integration-id"
},
"value": [{
"content": "I built a CLI tool for Postiz that makes social media scheduling super easy!\n\nYou can create posts, schedule them, and even post to multiple platforms at once. It supports comments with their own media, threads, and much more.\n\nCheck it out and let me know what you think!",
"image": []
}],
"settings": {
"__type": "reddit",
"subreddit": [{
"value": {
"subreddit": "programming",
"title": "Built a CLI tool for social media scheduling with TypeScript",
"type": "text",
"url": "",
"is_flair_required": false
}
}]
}
}]
}

67
examples/thread-post.json Normal file
View File

@@ -0,0 +1,67 @@
{
"type": "now",
"date": "2024-01-15T12:00:00Z",
"shortLink": true,
"tags": [],
"posts": [
{
"integration": {
"id": "twitter-integration-id"
},
"value": [
{
"content": "🧵 Thread: How to use Postiz CLI for automated social media posting (1/5)",
"image": [
{
"id": "tutorial1",
"path": "https://example.com/tutorial-intro.jpg"
}
]
},
{
"content": "Step 1: Install the CLI and set your API key\n\nexport POSTIZ_API_KEY=your_key\npnpm install -g postiz (2/5)",
"image": [
{
"id": "tutorial2",
"path": "https://example.com/tutorial-install.jpg"
}
],
"delay": 2000
},
{
"content": "Step 2: List your connected integrations to get their IDs\n\npostiz integrations:list (3/5)",
"image": [
{
"id": "tutorial3",
"path": "https://example.com/tutorial-integrations.jpg"
}
],
"delay": 2000
},
{
"content": "Step 3: Create your first post\n\npostiz posts:create -c \"Hello World!\" -i \"twitter-123\" (4/5)",
"image": [
{
"id": "tutorial4",
"path": "https://example.com/tutorial-create.jpg"
}
],
"delay": 2000
},
{
"content": "That's it! You can now automate your social media posts with ease. Check out our docs for more advanced features! 🚀 (5/5)",
"image": [
{
"id": "tutorial5",
"path": "https://example.com/tutorial-done.jpg"
}
],
"delay": 2000
}
],
"settings": {
"__type": "EmptySettings"
}
}
]
}

View File

@@ -0,0 +1,31 @@
{
"type": "now",
"date": "2024-01-15T12:00:00Z",
"shortLink": true,
"tags": [],
"posts": [{
"integration": {
"id": "your-tiktok-integration-id"
},
"value": [{
"content": "Quick tip: Automate your social media with this CLI tool! 🚀\n\n#coding #programming #typescript #developer #tech",
"image": [{
"id": "video1",
"path": "https://cdn.example.com/tiktok-video.mp4"
}]
}],
"settings": {
"__type": "tiktok",
"title": "Automate Social Media with CLI",
"privacy_level": "PUBLIC_TO_EVERYONE",
"duet": true,
"stitch": true,
"comment": true,
"autoAddMusic": "no",
"brand_content_toggle": false,
"brand_organic_toggle": false,
"video_made_with_ai": false,
"content_posting_method": "DIRECT_POST"
}
}]
}

View File

@@ -0,0 +1,34 @@
{
"type": "schedule",
"date": "2024-12-25T09:00:00Z",
"shortLink": true,
"tags": [
{ "value": "tutorial", "label": "Tutorial" },
{ "value": "tech", "label": "Tech" }
],
"posts": [{
"integration": {
"id": "your-youtube-integration-id"
},
"value": [{
"content": "In this video, I'll show you how to build a powerful CLI tool for social media automation.\n\n⏱ Timestamps:\n0:00 - Introduction\n2:15 - Setting up the project\n5:30 - Building the API client\n10:45 - Creating commands\n15:20 - Testing and deployment\n\n📚 Resources:\n- GitHub: https://github.com/yourrepo\n- Documentation: https://docs.example.com\n\n🔔 Subscribe for more TypeScript tutorials!",
"image": [{
"id": "thumbnail1",
"path": "https://cdn.example.com/thumbnail.jpg"
}]
}],
"settings": {
"__type": "youtube",
"title": "Building a Social Media CLI Tool with TypeScript",
"type": "public",
"selfDeclaredMadeForKids": "no",
"tags": [
{ "value": "typescript", "label": "TypeScript" },
{ "value": "cli", "label": "CLI" },
{ "value": "tutorial", "label": "Tutorial" },
{ "value": "programming", "label": "Programming" },
{ "value": "nodejs", "label": "Node.js" }
]
}
}]
}