Echo/Docs

CLI command

okr

Growth objectives and key results whose progress is counted from stored events, never typed in.

Invocation#

Shell
echo-cli okr list --product <id>
echo-cli okr create --product <id> --title <text> --starts-on <YYYY-MM-DD> --ends-on <YYYY-MM-DD> --by <name>
echo-cli okr add-key --objective <id> --metric <metric-id> --target <value>
echo-cli okr remove <objective-id>
echo-cli okr remove-key <key-result-id>

Inputs and output#

list writes the product's objectives, newest start first: id, product_id, title, starts_on, ends_on, created_by, created_at and key_results, each with id, metric_id, target, metric (the tracking metric as tracking metrics list prints it), value and share_of_target. create, add-key, remove and remove-key write the objective or key result they made or removed.

State effect#

Every verb calls Echo Web's authenticated /api/analytics/okrs or /api/analytics/okrs/key-results with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Growth OKRs section of the tracking screen and the Growth OKRs section of Echo Desktop's GEO screen call the same operations, and echo-mcp reads objectives (echo_list_okrs) but cannot change them. A key result is one of the product's tracking metrics (see tracking metrics define) with the value it should reach. Its value is the metric counted from the stored web and mobile events from the start of starts_on through the end of ends_on — events, users, visitors or sessions of its event, as metrics tree counts them — read on every call, and share_of_target is the value over the target. Progress is never stored. Removing an objective removes its key results; a metric a key result counts cannot be removed while the key result stands.

Refusals#

  • A wrong invocation is refused before anything is sent: "okr takes <every verb's usage, separated by semicolons>; got <word>", "okr <verb> does not take <flag>; it takes …", "<flag> needs a value", "okr <verb> needs <flag>" for each flag the verb needs, "okr <verb> needs an id, as okr list prints it" and "--target must be a number; got <text>".
  • Echo Web answers a bad request with "product_id is required: …", "title is required: what the objective is after", "starts_on must be a YYYY-MM-DD day; got <value>" (and ends_on), "ends_on <day> is before starts_on <day>", "created_by is required: an internal caller has no signed-in user, so it names who is acting", "objective_id is required: …", "metric_id is required: …", "target must be a positive number: the value the metric should reach; got <value>" or "metric <name> counts <event>, which was never collected; a key result on it could never move"; and not found with "no product has id <id>; echo-cli products lists the ones that exist", "no objective has id <id>; …", "product <id> has no metric <id>; echo-cli tracking metrics list --product <id> lists them" or "no key result has id <id>; …".