CLI command
content plan
Blog posts, social posts, videos and newsletters planned for their days in one plan, each about a product when named and drafted in its own channel.
Invocation#
echo-cli content plan list --from <YYYY-MM-DD> --to <YYYY-MM-DD>
echo-cli content plan add --channel <blog|social|video|email> --day <YYYY-MM-DD> --title <t> --brief <t> [--surface <slug>] [--slug <slug>] [--minutes <n>] [--account <id>] [--list <crm-list-id>] [--product <id>] --by <who>
echo-cli content plan draft --id <item-id>
echo-cli content plan remove --id <item-id>Inputs and output#
Every verb writes items: id, channel, planned_for, title, brief, surface_slug, slug, reading_minutes, social_account_id, list_id, product_id (null when none was named), draft_id (the draft made in its channel), drafted_at, planned_by and planned_at; list writes the items of the days named, by day.
State effect#
The verbs call Echo Web's authenticated /api/analytics/content-plan with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Content plan section under the calendar and of Echo Desktop's GEO screen do the same, and echo-mcp runs them as echo_content_plan, echo_content_plan_add, echo_content_plan_draft and echo_content_plan_remove. Items are kept in content_plan_items. A blog item needs --surface, --slug and --minutes; a social or video item --account; an email item --surface and --list; any item may name --product, a product Echo holds. draft creates, once: for blog a draft blog post at the slug with the brief as its description and body; for social a draft in content_posts with the title and brief as its caption and the item and product in its metadata; for video a video draft in content_posts with the title as its caption, the brief as the script in its metadata beside the item and product, waiting for its media; for email a draft newsletter to the list with the title as subject, the brief as body and the product. remove leaves the draft in its channel.
Refusals#
- A wrong invocation is refused before anything is sent: "content plan takes list …; add …; draft --id <item-id>; remove --id <item-id>; got <word>", "content plan <verb> does not take <flag>; it takes …", "<flag> needs a value" and "content plan <verb> needs <flag>".
- Echo Web answers a bad request with "channel must be one of blog, social, video, email; got <value>", "planned_for must be a day written YYYY-MM-DD: the day the piece is planned for; got <value>" (and from or to), "to (<day>) is before from (<day>)", "reading_minutes must be a whole number above zero: how long the planned post reads; got <value>", "<field> is required: <what it is>" for the fields the channel needs, "planned_by is required: an internal caller has no signed-in user, so it names who is acting", or "plan item <id> could not become a draft post at <slug> on <surface>: <cause>" (and a draft newsletter); not found with "no plan item has id <id>", "no product has id <id>; echo-cli products lists them" or "social account <id> of plan item <id> no longer exists"; a conflict with "plan item <id> was already drafted as <draft> at <time>". The command prints Echo Web's sentence and exits 1.