CLI command
social predict
A queued post's engagement predicted before it goes out, from its own account's measured posts of the same format — optionally only those sharing its hook, topic or posting slot — with every post the prediction rests on.
Invocation#
echo-cli social predict --post <post-id> --days <n> --sigmas <n> [--like hook,topic,slot] [--time-zone <IANA>]Inputs and output#
Writes post_id, social_account_id, content_type, like (each trait named with --like and the predicted post's value of it: its hook, its declared topic, or its slot as "<weekday> <hour>"; {} without --like), since, rate (the mean of interactions per view), low and high (null with one post), interval_unmeasured (why there is no interval, or null), basis (each post it rests on: post_id, caption, published_at, views, interactions and rate, newest first) and unmeasured_posts (the posts of the format and traits in the window that no scrape fully measured).
State effect#
The command calls Echo Web's authenticated /api/analytics/post-predictions with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Predict a queued post section of the ecosystem analytics tab and of Echo Desktop's GEO screen read the same, and echo-mcp runs it as echo_post_predict. The history is the post's account's published content_posts of its content_type since --days days ago, other than itself, whose post_metrics hold views and every interaction count (likes, comments, shares, saves). --like keeps only the posts sharing each named trait with the predicted post: hook — the declared hook, else the caption's first line (echo-cli content hooks); topic — the declared topic (echo-cli content topics); slot — the weekday and hour of its publication, against the predicted post's scheduled time, both read in --time-zone. The interval is the mean plus or minus --sigmas standard errors of the mean. It stores nothing.
Refusals#
- A wrong invocation is refused before anything is sent: "social predict does not take <flag>; it takes --post, --days, --sigmas, --like, --time-zone", "<flag> needs a value" and "social predict needs <flag>".
- Echo Web answers a bad request with "post_id is required: the queued post to predict", "days must be a positive whole number: how far back the account's history is read; got <value>", "sigmas must be a positive number: how many standard errors of the mean the interval spans; got <value>", "like takes hook, topic, slot; got <traits>", "time_zone is required: …", "time_zone must be an IANA time zone, such as Europe/Warsaw; got <zone>", "post <id> has no declared hook and no caption line, so no post can share it", "post <id> has no declared topic (echo-cli content topics declare), so no post can share it", "post <id> is not scheduled, so it has no slot a post can share" or "post <id> has no social account, so it has no history to be predicted from"; and not found with "no queued post has id <id>" or "account <id> has no measured published <format> post[ sharing its <trait> "<value>"] since <time>, so there is nothing to predict from". The command prints Echo Web's sentence and exits 1.