CLI command
content
The content programme. content evergreen republishes the posts marked evergreen — by the operator, or chosen from an account's best posts by recorded engagement — once the interval set for their account has passed.
Invocation#
echo-cli content evergreen list
echo-cli content evergreen interval --account <social-account-id> --days <days> --by <name>
echo-cli content evergreen mark --post <post-id> --by <name>
echo-cli content evergreen choose --account <social-account-id> --days <n> --top <n> --by <name>
echo-cli content evergreen unmark --post <post-id>
echo-cli content evergreen requeue --account <social-account-id>Inputs and output#
list writes intervals (social_account_id, interval_days, set_by, set_at), posts (post_id, social_account_id, marked_by, marked_at) and requeues, newest first (id, post_id, copy_id, requeued_at). interval writes the interval, mark the evergreen post, unmark removed (the post id) and requeue requeued, the requeues made now. choose writes social_account_id, days, top, chosen (each post marked now: post_id, rate, caption, published_at and its mark) and already_marked (the ids of the best posts that were on the queue already).
State effect#
Every verb calls Echo Web's authenticated /api/analytics/evergreen with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Evergreen queue section of the tracking screen and the Evergreen queue section of Echo Desktop's GEO screen call the same operations, and echo-mcp runs them as echo_list_evergreen, echo_evergreen_interval, echo_evergreen_mark, echo_evergreen_choose, echo_evergreen_unmark and echo_evergreen_requeue. Only a published post can be marked. choose ranks the account's published posts of the last --days days by the engagement rate their scrapes recorded (post_metrics.engagement_rate), takes the --top best — a post no scrape measured is never one — and marks each that is not on the queue yet, naming --by; the best ones already marked are listed in already_marked and left as they are. requeue looks at each evergreen post of the account: when its last publication, the original or an earlier copy, is at least the interval ago, it copies the post into the content queue scheduled now and records the copy; a post whose copy is still waiting unpublished is left alone, so a post is queued once per interval. When a due post's media or thumbnail has rights recorded and none in force (content rights), nothing of the account is requeued and the run answers "evergreen post <id> was not requeued: <asset>: …" as a conflict. Echo Web also requeues every account with an interval by itself each hour (/api/cron/evergreen-requeue), answering each account's requeues or why its run failed; an account without an interval is not touched.
Refusals#
- A wrong invocation is refused before anything is sent: "content takes evergreen; got <word>", "content evergreen takes <every verb's usage, separated by semicolons>; got <word>", "content evergreen <verb> does not take <flag>; it takes …", "<flag> needs a value", "content evergreen <verb> needs <flag>" for each flag the verb needs, and "--days must be a whole number of days; got <value>".
- Echo Web answers a bad request with "social_account_id is required: …", "interval_days must be a whole number of days of at least 1; got <value>", "post_id is required: …", "post <id> is <status> and was never published; only a published post can be evergreen", "requeue names the social account whose evergreen posts to requeue", "choose names the social account whose best posts become evergreen", "days must be a positive whole number: the window of published posts ranked; got <value>", "top must be a positive whole number: how many of the best posts become evergreen; got <value>" or "<field>_by is required: an internal caller has no signed-in user, so it names who is acting"; not found with "account <id> has no evergreen interval set; echo-cli content evergreen interval --account <id> --days <days> sets it", "account <id> has no published post a scrape measured in the last <n> days, so none can be chosen by engagement", "no post has id <id>; the content queue lists them" or "post <id> is not on the evergreen queue"; and a conflict with "post <id> was marked evergreen by <who> at <time>". The command prints Echo Web's sentence and exits non-zero.