[{"data":1,"prerenderedAt":403},["ShallowReactive",2],{"guide-/guides/using-the-operator-cli":3},{"id":4,"title":5,"body":6,"category":393,"description":394,"extension":395,"meta":396,"navigation":397,"order":66,"path":398,"readingTime":399,"seo":400,"stem":401,"__hash__":402},"guides/guides/using-the-operator-cli.md","Using the Operator CLI in production",{"type":7,"value":8,"toc":384},"minimal",[9,13,22,27,81,85,146,153,157,160,209,217,221,248,251,255,278,281,285,288,313,317,373,380],[10,11,5],"h1",{"id":12},"using-the-operator-cli-in-production",[14,15,16,17,21],"p",{},"The Monitoring Portal is great. The terminal is faster. This guide walks through the real workflows operators use ",[18,19,20],"code",{},"opcli"," for once they've been on it for a week.",[23,24,26],"h2",{"id":25},"install-once","Install once",[28,29,34],"pre",{"className":30,"code":31,"language":32,"meta":33,"style":33},"language-bash shiki shiki-themes github-light github-dark","brew install chekt/tap/opcli\nopcli login                # opens browser; OAuth\nopcli config set tenant my-monitoring-co\n","bash","",[18,35,36,52,64],{"__ignoreMap":33},[37,38,41,45,49],"span",{"class":39,"line":40},"line",1,[37,42,44],{"class":43},"sScJk","brew",[37,46,48],{"class":47},"sZZnC"," install",[37,50,51],{"class":47}," chekt/tap/opcli\n",[37,53,55,57,60],{"class":39,"line":54},2,[37,56,20],{"class":43},[37,58,59],{"class":47}," login",[37,61,63],{"class":62},"sJ8bj","                # opens browser; OAuth\n",[37,65,67,69,72,75,78],{"class":39,"line":66},3,[37,68,20],{"class":43},[37,70,71],{"class":47}," config",[37,73,74],{"class":47}," set",[37,76,77],{"class":47}," tenant",[37,79,80],{"class":47}," my-monitoring-co\n",[23,82,84],{"id":83},"the-morning-routine","The morning routine",[28,86,88],{"className":30,"code":87,"language":32,"meta":33,"style":33},"opcli alarms --active --priority high   # what's open right now\nopcli incidents --since \"1h\" --json | jq '.[] | .id'\nopcli health                            # device status across all sites\n",[18,89,90,110,136],{"__ignoreMap":33},[37,91,92,94,97,101,104,107],{"class":39,"line":40},[37,93,20],{"class":43},[37,95,96],{"class":47}," alarms",[37,98,100],{"class":99},"sj4cs"," --active",[37,102,103],{"class":99}," --priority",[37,105,106],{"class":47}," high",[37,108,109],{"class":62},"   # what's open right now\n",[37,111,112,114,117,120,123,126,130,133],{"class":39,"line":54},[37,113,20],{"class":43},[37,115,116],{"class":47}," incidents",[37,118,119],{"class":99}," --since",[37,121,122],{"class":47}," \"1h\"",[37,124,125],{"class":99}," --json",[37,127,129],{"class":128},"szBVR"," |",[37,131,132],{"class":43}," jq",[37,134,135],{"class":47}," '.[] | .id'\n",[37,137,138,140,143],{"class":39,"line":66},[37,139,20],{"class":43},[37,141,142],{"class":47}," health",[37,144,145],{"class":62},"                            # device status across all sites\n",[14,147,148,149,152],{},"Most operators alias these into ",[18,150,151],{},"morning"," and run it at start-of-shift.",[23,154,156],{"id":155},"acknowledging-in-batches","Acknowledging in batches",[14,158,159],{},"When a sensor goes haywire and floods, you can ACK the batch in one shot:",[28,161,163],{"className":30,"code":162,"language":32,"meta":33,"style":33},"opcli alarms --device dev_8h2j3kfm --status new \\\n  | opcli alarm acknowledge --stdin --reason \"false-positive: sensor recalibration\"\n",[18,164,165,186],{"__ignoreMap":33},[37,166,167,169,171,174,177,180,183],{"class":39,"line":40},[37,168,20],{"class":43},[37,170,96],{"class":47},[37,172,173],{"class":99}," --device",[37,175,176],{"class":47}," dev_8h2j3kfm",[37,178,179],{"class":99}," --status",[37,181,182],{"class":47}," new",[37,184,185],{"class":99}," \\\n",[37,187,188,191,194,197,200,203,206],{"class":39,"line":54},[37,189,190],{"class":128},"  |",[37,192,193],{"class":43}," opcli",[37,195,196],{"class":47}," alarm",[37,198,199],{"class":47}," acknowledge",[37,201,202],{"class":99}," --stdin",[37,204,205],{"class":99}," --reason",[37,207,208],{"class":47}," \"false-positive: sensor recalibration\"\n",[14,210,211,212,216],{},"The CLI is ",[213,214,215],"strong",{},"pipe-friendly by design",". JSON in, JSON out.",[23,218,220],{"id":219},"dispatch","Dispatch",[28,222,224],{"className":30,"code":223,"language":32,"meta":33,"style":33},"opcli dispatch guard --to \"Main Entrance\" --from-alarm A-10293\n",[18,225,226],{"__ignoreMap":33},[37,227,228,230,233,236,239,242,245],{"class":39,"line":40},[37,229,20],{"class":43},[37,231,232],{"class":47}," dispatch",[37,234,235],{"class":47}," guard",[37,237,238],{"class":99}," --to",[37,240,241],{"class":47}," \"Main Entrance\"",[37,243,244],{"class":99}," --from-alarm",[37,246,247],{"class":47}," A-10293\n",[14,249,250],{},"CHeKT routes the dispatch to the nearest available guard service tied to that site. The CLI returns the dispatch ID, ETA, and a live tracking URL.",[23,252,254],{"id":253},"live-camera","Live camera",[28,256,258],{"className":30,"code":257,"language":32,"meta":33,"style":33},"opcli camera \"Main Entrance\" --live --layout grid\n",[18,259,260],{"__ignoreMap":33},[37,261,262,264,267,269,272,275],{"class":39,"line":40},[37,263,20],{"class":43},[37,265,266],{"class":47}," camera",[37,268,241],{"class":47},[37,270,271],{"class":99}," --live",[37,273,274],{"class":99}," --layout",[37,276,277],{"class":47}," grid\n",[14,279,280],{},"This opens an mpv window with the live feed. On macOS, you can pipe it into QuickLook.",[23,282,284],{"id":283},"audit-ready-logs","Audit-ready logs",[14,286,287],{},"Every command is logged with timestamp, operator, target, and result. Pull the audit log straight from the CLI:",[28,289,291],{"className":30,"code":290,"language":32,"meta":33,"style":33},"opcli audit --operator $USER --since 24h\n",[18,292,293],{"__ignoreMap":33},[37,294,295,297,300,303,307,310],{"class":39,"line":40},[37,296,20],{"class":43},[37,298,299],{"class":47}," audit",[37,301,302],{"class":99}," --operator",[37,304,306],{"class":305},"sVt8B"," $USER ",[37,308,309],{"class":99},"--since",[37,311,312],{"class":47}," 24h\n",[23,314,316],{"id":315},"when-to-use-the-cli-vs-the-portal","When to use the CLI vs the Portal",[318,319,320,333],"table",{},[321,322,323],"thead",{},[324,325,326,330],"tr",{},[327,328,329],"th",{},"Workflow",[327,331,332],{},"Use this",[334,335,336,345,353,361],"tbody",{},[324,337,338,342],{},[339,340,341],"td",{},"First-time triage",[339,343,344],{},"Portal — visual context.",[324,346,347,350],{},[339,348,349],{},"Bulk acknowledgement",[339,351,352],{},"CLI — one pipe.",[324,354,355,358],{},[339,356,357],{},"Automated dispatches",[339,359,360],{},"CLI from a queue worker.",[324,362,363,366],{},[339,364,365],{},"Compliance audits",[339,367,368,369,372],{},"CLI — ",[18,370,371],{},"--json"," is grep-able.",[14,374,375,376,379],{},"The CLI is not a replacement for the Portal. It's the ",[213,377,378],{},"second tool"," every operator picks up after they've outgrown clicking.",[381,382,383],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":33,"searchDepth":66,"depth":66,"links":385},[386,387,388,389,390,391,392],{"id":25,"depth":54,"text":26},{"id":83,"depth":54,"text":84},{"id":155,"depth":54,"text":156},{"id":219,"depth":54,"text":220},{"id":253,"depth":54,"text":254},{"id":283,"depth":54,"text":284},{"id":315,"depth":54,"text":316},"Operators","Real workflows central station operators run from the terminal.","md",{},true,"/guides/using-the-operator-cli","10 min",{"title":5,"description":394},"guides/using-the-operator-cli","lbeKGiJWcntludypSFfEsR3LB4_quqYWTHCLFk2NrbQ",1779905486279]