CLI command
content scripts
Short-video scripts that open with the hook the hook library measured best, each kept with what that hook had earned when it was chosen.
Invocation#
echo-cli content scripts list
echo-cli content scripts write --topic <text> --product <product-id> --days <n> [--platform <p>] --by <who>
echo-cli content scripts remove --id <script-id>Inputs and output#
list writes every script, newest first, and write the one written: id, topic, product_id (the product it is for; null for scripts written before scripts named one), messaging_house_id (the approved messaging house version it was written from, as echo-cli messaging list shows it; null for scripts written before scripts read one), hook, hook_post_ids (the posts that opened with it), hook_views, hook_interactions and hook_rate (their stored sums and interactions per view when the script was written), days, platform, script, route (the model route that wrote it), created_by and created_at. remove writes the script removed.
State effect#
The verbs call Echo Web's authenticated /api/analytics/video-scripts with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Short-video scripts section of the ecosystem's analytics and of Echo Desktop's GEO screen do the same, and echo-mcp runs them as echo_video_scripts, echo_video_script_write and echo_video_script_remove. write reads --product's approved messaging house (echo-cli messaging), then the hook library over the last --days days (echo-cli content hooks list; only --platform's posts when named), takes the hook whose measured posts have the best rate of interactions per view, and asks the route Echo Web's ECHO_SCRIPT_ROUTE declares, through Brama, for a script on --topic whose first line is that hook word for word and which says what the house's umbrella message and pillars, with their proof points, say; then it checks the script against --product's banned phrases (echo-cli glossary) before it is kept. Scripts are kept in video_scripts with the product, the messaging version they were written from and the hook's results copied at that moment, so later metrics and later approved versions do not rewrite why the script says what it says.
Refusals#
- A wrong invocation is refused before anything is sent: "content scripts takes list; write …; remove …; got <word>", "content scripts <verb> does not take <flag>; it takes …", "<flag> needs a value" and "content scripts <verb> needs <flag>".
- Echo Web answers a bad request with "topic is required: what the video is about", "product_id is required: the product the video is for, whose brand glossary the script is checked against", "days must be a positive whole number: how far back the published posts are read; got <value>", "created_by is required: an internal caller has no signed-in user, so it names who is acting" or "id is required: …"; not found with "no product has id <id>; echo-cli products lists the ones that exist" and "product <id> has no approved messaging; echo-cli messaging approve approves a version" (both checked before the route is asked, so nothing is spent on a script that could not be kept), "no hook of the posts published since <time>[ on <platform>] was measured, so none can be chosen by its results" or "no video script has id <id>". A deployment without ECHO_SCRIPT_ROUTE answers naming the setting, and a route that does not answer by its tool answers with the route's own words. The command prints Echo Web's sentence and exits 1.
- A script the route wrote that holds one of the product's banned phrases is not kept, refused as unprocessable: "the script uses banned phrases of the product's brand, so it was not kept: \"<phrase>\" in script at line <n>, column <n>[; write \"<use instead>\" instead]", every occurrence named, with violations (phrase, use_instead, field, line, column) beside it. Running it again asks the route for a new script.