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

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"