Skip to content

Content Commands

The content command group handles AI-powered content generation and distribution across newsletters, social media, and blogs. It also includes competitor ad scraping and a content pipeline for managing drafts through approval.

Subgroups

SubgroupPurpose
content newsletterGenerate and distribute AI newsletters
content socialGenerate and publish social media posts
content blogManage and publish blog content
content scrape-adsScrape competitor advertising
content pipelineContent research pipeline: generate, approve, publish posts
content reportIntelligence report generation from research notes
content researchResearch pipeline status, notes, and reports

Newsletter

content newsletter generate

Generate an AI-powered newsletter for a specific brand.

bash
# Generate for CRE-11TRUST brand
optimal content newsletter generate --brand CRE-11TRUST

# Generate for a specific date
optimal content newsletter generate --brand LIFEINSUR --date 2026-03-26
FlagDescription
--brandBrand identifier: CRE-11TRUST or LIFEINSUR (required)
--dateTarget date for the newsletter (defaults to today)

content newsletter distribute

Send a generated newsletter through a distribution channel.

bash
optimal content newsletter distribute --document-id abc123 --channel email
FlagDescription
--document-idID of the generated newsletter document (required)
--channelDistribution channel (e.g. email, discord)

content newsletter status

Check the distribution status of a newsletter.

bash
optimal content newsletter status --document-id abc123
FlagDescription
--document-idNewsletter document ID (required)

Social Media

content social generate

Generate social media posts using AI.

bash
# Generate 9 posts for a brand (default count)
optimal content social generate --brand CRE-11TRUST

# Generate posts for a specific week with a campaign theme
optimal content social generate --brand LIFEINSUR --count 3 --week-of 2026-03-23 --campaign "Q1 Launch"

# Generate without pushing to Strapi
optimal content social generate --brand OPTIMAL --count 5 --dry-run
FlagDescription
--brandBrand identifier: OPTIMAL, CRE-11TRUST, or LIFEINSUR (required)
--countNumber of posts to generate (default: 9)
--week-ofTarget week start date (YYYY-MM-DD, default: next Monday)
--campaignCampaign theme override (default: auto-rotated)
--dry-runGenerate without pushing to Strapi

Social publishing moved to Strapi

Direct social-publish CLI commands (content social publish, content social queue) have been removed from the CLI. Social distribution is handled by Strapi lifecycle hooks: when a post is published from the Strapi admin at strapi.optimal.miami, the afterCreate hook posts directly to X, Instagram, and Facebook via the OpenRouter LLM for tweet generation. n8n is no longer in the social distribution path.

To see what's queued, open the Strapi admin's social-posts collection. To publish, click Publish there.

content social instagram

Publish posts specifically to Instagram.

bash
optimal content social instagram --brand CRE-11TRUST --limit 1
FlagDescription
--brandBrand identifier (required)
--limitMaximum number of posts to publish

TIP

Instagram publishing requires additional API credentials. Run optimal config doctor to verify your Instagram integration is configured.

Blog

content blog drafts

List unpublished blog drafts.

bash
# List all drafts
optimal content blog drafts

# Filter by site
optimal content blog drafts --site optimal.miami
FlagDescription
--siteFilter drafts by site

content blog publish

Publish a blog post by slug.

bash
# Publish a specific post
optimal content blog publish --slug quarterly-market-update

# Publish and trigger a deployment
optimal content blog publish --slug quarterly-market-update --deploy
FlagDescription
--slugBlog post slug (required)
--deployTrigger a site deployment after publishing

Ad Scraping

content scrape-ads

Scrape competitor advertising data.

bash
# Scrape ads from specific companies
optimal content scrape-ads --companies "Acme Corp,Beta Inc" --output ./ads-data.json

# Control batch size for rate limiting
optimal content scrape-ads --companies "Acme Corp" --output ./ads.json --batch-size 10
FlagDescription
--companiesComma-separated list of company names (required)
--outputOutput file path (required)
--batch-sizeNumber of concurrent scrape requests

Content Pipeline

The pipeline subcommands manage the full lifecycle of content from scraped data through AI generation to published posts.

content pipeline status

Show the current state of the content pipeline, including scraped items, insights, and post counts.

bash
optimal content pipeline status

content pipeline generate

Generate an AI post for a platform from the latest insight.

bash
optimal content pipeline generate --platform twitter
optimal content pipeline generate --platform facebook --topic openclaw
FlagDescription
--platformPlatform: twitter or facebook (required)
--topicTopic to generate for (default: openclaw)

content pipeline approve

Approve a draft post for Strapi sync.

bash
optimal content pipeline approve --id <uuid>
FlagDescription
--idPost UUID to approve (required)

content pipeline publish

Publish an approved post to its platform (X/Twitter).

bash
optimal content pipeline publish --id <uuid>
FlagDescription
--idPost UUID to publish (required)

content pipeline sync

Sync approved posts from Supabase to Strapi for editorial review.

bash
optimal content pipeline sync

content pipeline auto-generate

Generate posts automatically from the freshest available insight without specifying flags interactively. Cron-friendly.

bash
# Auto-generate using the default platform rotation
optimal content pipeline auto-generate

# Force a specific platform
optimal content pipeline auto-generate --platform twitter
FlagDescription
--platformPlatform to generate for. If omitted, the command picks the next platform in rotation.

content pipeline scrape-feeds

Scrape RSS / X feeds for the configured topic and stage them for the next pipeline generation pass.

bash
# Scrape default topic (openclaw)
optimal content pipeline scrape-feeds

# Different topic, skip Twitter/X
optimal content pipeline scrape-feeds --topic returnpro --skip-twitter
FlagDescription
--topicTopic to scrape (default: openclaw).
--skip-twitterSkip Twitter/X feed scraping. Useful when X rate-limits are tight.

content pipeline list

List posts in the pipeline, optionally filtered by status and platform.

bash
# List all posts
optimal content pipeline list

# List only drafts
optimal content pipeline list --status draft

# List approved Twitter posts
optimal content pipeline list --status approved --platform twitter
FlagDescription
--statusFilter by status (draft, approved, posted, failed)
--platformFilter by platform (twitter, facebook)
--limitMax posts to return (default: 20)

Intelligence Reports

content report generate

Generate a daily intelligence report from research notes. Produces HTML and optionally PDF output.

bash
# Generate for today
optimal content report generate

# Generate for a specific date
optimal content report generate --date 2026-03-30

# Generate HTML only (skip PDF)
optimal content report generate --skip-pdf
FlagDescription
--dateDate to generate report for (YYYY-MM-DD, default: today)
--skip-pdfGenerate HTML only, skip PDF rendering

Research Pipeline

content research status

Show research pipeline status: last scan time, data point counts, active campaigns.

bash
optimal content research status
optimal content research status --json
FlagDescription
--jsonOutput as JSON

content research notes

View research notes for a specific date.

bash
optimal content research notes
optimal content research notes --date 2026-03-30
FlagDescription
--dateDate (YYYY-MM-DD, default: today)

content research reports

List available intelligence reports.

bash
optimal content research reports
optimal content research reports --json
FlagDescription
--dateView a specific date
--jsonOutput as JSON

Built by Carlos Lenis in Miami