CLI command
content hooks
The hook library: the opening lines published posts hooked their audience with, ranked by the stored results of the posts that used them.
Invocation#
echo-cli content hooks list --days <n> [--platform <p>]
echo-cli content hooks set --post <post-id> --hook <text> --by <who>
echo-cli content hooks unset --post <post-id>Inputs and output#
list writes { since, hooks, without_hook }: each hook with its posts (post_id, platform, published_at, declared, views, interactions), measured_posts, and the views, interactions and rate (interactions per view) summed over the posts a scrape measured, best rate first; a hook no measured post used carries null for every metric, never zero, and is listed last. without_hook lists the posts whose caption has no line to read. set and unset write the declared hook: post_id, hook, declared_by and declared_at.
State effect#
The verbs call Echo Web's authenticated /api/analytics/post-hooks with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Hook library section of the ecosystem's analytics and of Echo Desktop's GEO screen do the same, and echo-mcp runs them as echo_hook_library, echo_hook_set and echo_hook_unset. A post's hook is the one declared for it in post_hooks — for a hook spoken in a video, or one that is not the caption's first line — and otherwise its caption's first line with words, as written. Interactions are every count post_metrics stores beside views (likes, comments, shares, saves); a post with any count unmeasured is left out of the sums and still listed under its hook.
Refusals#
- A wrong invocation is refused before anything is sent: "content hooks takes list …; set …; unset …; got <word>", "content hooks <verb> does not take <flag>; it takes …", "<flag> needs a value" and "content hooks <verb> needs <flag>".
- Echo Web answers a bad request with "days must be a positive whole number: how far back the published posts are read; got <value>", "<field> is required: <what it is>" or "declared_by is required: an internal caller has no signed-in user, so it names who is acting"; not found with "no queued post has id <id>" or "post <id> has no declared hook". The command prints Echo Web's sentence and exits 1.