[{"data":1,"prerenderedAt":538},["ShallowReactive",2],{"integrations-pt:/integrations/cli":3},{"id":4,"title":5,"active":6,"body":7,"description":523,"extension":524,"eyebrow":525,"icon":526,"image":527,"meta":528,"name":529,"navTitle":529,"navigation":6,"order":530,"path":531,"seo":532,"slug":533,"status":534,"stem":535,"summary":536,"toc":527,"__hash__":537},"integrations_en/integrations/cli.md","CLI & shell scripts + OpenPets",true,{"type":8,"value":9,"toc":505},"minimark",[10,129,155,261,307,367,395,453],[11,12,16,17,16,22,16,26,16,110],"section",{"id":13,"className":14},"overview",[15],"docs-section","\n  ",[18,19,21],"h2",{"id":20},"what-this-integration-does","What this integration does",[23,24,25],"p",{},"\n    The OpenPets CLI lets terminal commands talk to your running OpenPets\n    desktop app. Use it when you want a pet reaction from a shell script, an npm\n    script, a local build command, a git hook, or a custom automation tool.\n  ",[27,28,31,32,16],"div",{"className":29},[30],"docs-table-wrap","\n    ",[33,34,35,36,35,53,31],"table",{},"\n      ",[37,38,39,40,35],"thead",{},"\n        ",[41,42,43,47,50],"tr",{},[44,45,46],"th",{},"Command",[44,48,49],{},"What it does",[44,51,52],{},"Good for",[54,55,39,56,39,71,39,84,39,97,35],"tbody",{},[41,57,58,65,68],{},[59,60,61],"td",{},[62,63,64],"code",{},"npx -y @open-pets/cli@latest status",[59,66,67],{},"Checks whether the desktop app is reachable.",[59,69,70],{},"Setup checks and troubleshooting.",[41,72,73,78,81],{},[59,74,75],{},[62,76,77],{},"npx -y @open-pets/cli@latest pets",[59,79,80],{},"Lists installed pets and marks the default pet.",[59,82,83],{},"Finding pet ids before routing setup.",[41,85,86,91,94],{},[59,87,88],{},[62,89,90],{},"npx -y @open-pets/cli@latest react \u003Creaction>",[59,92,93],{},"Changes the pet reaction without showing text.",[59,95,96],{},"Silent success, error, testing, waiting, or working states.",[41,98,99,104,107],{},[59,100,101],{},[62,102,103],{},"npx -y @open-pets/cli@latest say \u003Cmessage>",[59,105,106],{},"Shows one short visible speech bubble.",[59,108,109],{},"Meaningful local automation updates.",[23,111,112,113,116,117,120,121,124,125,128],{},"\n    The CLI is distributed as the npm package ",[62,114,115],{},"@open-pets/cli",". The\n    desktop app does not install a shell command; use ",[62,118,119],{},"npx"," for one-off\n    commands, ",[62,122,123],{},"npm exec"," for explicit package execution, or an optional\n    global npm install if you want a permanent ",[62,126,127],{},"openpets"," command.\n  ",[11,130,16,133,16,136],{"id":131,"className":132},"requirements",[15],[18,134,135],{"id":131},"Requirements",[137,138,31,139,31,143,31,152,16],"ul",{},[140,141,142],"li",{},"The OpenPets desktop app must be running.",[140,144,145,146,148,149,151],{},"Node.js and npm must be available for ",[62,147,119],{},", ",[62,150,123],{},", or optional global npm installs.",[140,153,154],{},"The CLI talks to the desktop app over OpenPets local IPC; it does not send commands through a cloud service.",[11,156,16,159,16,163,16,169,16,189,16,204,16,220,16,236,16,245],{"id":157,"className":158},"quick-start",[15],[18,160,162],{"id":161},"quick-start-with-npx","Quick start with npx",[23,164,165,166,168],{},"\n    Use ",[62,167,119],{}," when you want the command without installing anything\n    globally. The examples below always fetch the latest published OpenPets CLI.\n  ",[27,170,31,173,31,184,16],{"className":171},[172],"docs-code",[27,174,177,181],{"className":175},[176],"docs-code-bar",[178,179,180],"span",{},"Check desktop status",[178,182,183],{},"bash",[185,186,187],"pre",{},[62,188,64],{},[27,190,31,192,31,200,16],{"className":191},[172],[27,193,195,198],{"className":194},[176],[178,196,197],{},"List installed pets",[178,199,183],{},[185,201,202],{},[62,203,77],{},[27,205,31,207,31,215,16],{"className":206},[172],[27,208,210,213],{"className":209},[176],[178,211,212],{},"Send a reaction",[178,214,183],{},[185,216,217],{},[62,218,219],{},"npx -y @open-pets/cli@latest react success",[27,221,31,223,31,231,16],{"className":222},[172],[27,224,226,229],{"className":225},[176],[178,227,228],{},"Show a short message",[178,230,183],{},[185,232,233],{},[62,234,235],{},"npx -y @open-pets/cli@latest say \"Build finished\" --reaction celebrating",[23,237,238,239,241,242,244],{},"\n    If your npm environment has stale ",[62,240,119],{}," cache metadata, the equivalent\n    ",[62,243,123],{}," form is:\n  ",[27,246,31,248,31,256,16],{"className":247},[172],[27,249,251,254],{"className":250},[176],[178,252,253],{},"npm exec form",[178,255,183],{},[185,257,258],{},[62,259,260],{},"npm exec --yes --package=@open-pets/cli@latest -- openpets --help",[11,262,16,265,16,269,16,275,16,291],{"id":263,"className":264},"global-install",[15],[18,266,268],{"id":267},"optional-global-install","Optional global install",[23,270,271,272,274],{},"\n    If you want to type ",[62,273,127],{}," directly in your terminal, install the\n    CLI globally. This is separate from downloading the desktop app.\n  ",[27,276,31,278,31,286,16],{"className":277},[172],[27,279,281,284],{"className":280},[176],[178,282,283],{},"Install once",[178,285,183],{},[185,287,288],{},[62,289,290],{},"npm install -g @open-pets/cli",[27,292,31,294,31,302,16],{"className":293},[172],[27,295,297,300],{"className":296},[176],[178,298,299],{},"Use directly",[178,301,183],{},[185,303,304],{},[62,305,306],{},"openpets status\nopenpets react testing\nopenpets say \"Tests are running\" --reaction testing",[11,308,16,311,16,315,16,318,16,334,16,350],{"id":309,"className":310},"script-examples",[15],[18,312,314],{"id":313},"shell-script-examples","Shell script examples",[23,316,317],{},"\n    Keep messages short and human-facing. Use reactions for noisy steps and\n    speech only for meaningful moments.\n  ",[27,319,31,321,31,329,16],{"className":320},[172],[27,322,324,327],{"className":323},[176],[178,325,326],{},"npm test notification",[178,328,183],{},[185,330,331],{},[62,332,333],{},"npm test \\\n  && npx -y @open-pets/cli@latest say \"Tests passed\" --reaction success \\\n  || npx -y @open-pets/cli@latest say \"Tests failed\" --reaction error",[27,335,31,337,31,345,16],{"className":336},[172],[27,338,340,343],{"className":339},[176],[178,341,342],{},"Build script",[178,344,183],{},[185,346,347],{},[62,348,349],{},"npx -y @open-pets/cli@latest react running\npnpm build\nnpx -y @open-pets/cli@latest react success",[27,351,31,353,31,362,16],{"className":352},[172],[27,354,356,359],{"className":355},[176],[178,357,358],{},"package.json script",[178,360,361],{},"json",[185,363,364],{},[62,365,366],{},"{\n  \"scripts\": {\n    \"test:pet\": \"npm test && npx -y @open-pets/cli@latest say 'Tests passed' --reaction success\"\n  }\n}",[11,368,16,371,16,375,16,378],{"id":369,"className":370},"reactions",[15],[18,372,374],{"id":373},"available-reactions","Available reactions",[23,376,377],{},"\n    The CLI accepts the same reaction names as the OpenPets local client and MCP\n    tools:\n  ",[27,379,31,381,31,390,16],{"className":380},[172],[27,382,384,387],{"className":383},[176],[178,385,386],{},"Reaction names",[178,388,389],{},"text",[185,391,392],{},[62,393,394],{},"idle\nthinking\nworking\nediting\nrunning\ntesting\nwaiting\nwaving\nsuccess\nerror\ncelebrating",[11,396,16,399,16,403,16,406],{"id":397,"className":398},"safety",[15],[18,400,402],{"id":401},"message-safety","Message safety",[23,404,405],{},"\n    Pet speech is visible on your desktop. Treat it like a tiny public status\n    channel, not a log sink.\n  ",[27,407,31,409,16],{"className":408},[30],[33,410,35,411,35,421,31],{},[37,412,413],{},[41,414,415,418],{},[44,416,417],{},"Good",[44,419,420],{},"Avoid",[54,422,39,423,39,433,39,443,35],{},[41,424,425,430],{},[59,426,427],{},[62,428,429],{},"Build finished.",[59,431,432],{},"Full command output or stack traces.",[41,434,435,440],{},[59,436,437],{},[62,438,439],{},"Tests are running.",[59,441,442],{},"File paths, URLs, or private repo details.",[41,444,445,450],{},[59,446,447],{},[62,448,449],{},"Waiting for review.",[59,451,452],{},"Secrets, tokens, prompts, or user messages.",[11,454,16,457,16,460,16,467,16,481,16,485,16,498,16,502],{"id":455,"className":456},"troubleshooting",[15],[18,458,459],{"id":455},"Troubleshooting",[461,462,464,466],"h3",{"id":463},"npx-y-open-petsclilatest-status-says-the-app-is-unavailable",[62,465,64],{}," says the app is unavailable",[137,468,31,469,31,472,31,475,16],{},[140,470,471],{},"Open the OpenPets desktop app first.",[140,473,474],{},"Restart the desktop app if it was updated while running.",[140,476,477,478,480],{},"Run ",[62,479,64],{}," again.",[461,482,484],{"id":483},"the-desktop-app-did-not-install-a-shell-command","The desktop app did not install a shell command",[23,486,487,488,491,492,494,495,497],{},"\n    Downloading the desktop app does not install a shell command. Use\n    ",[62,489,490],{},"npx -y @open-pets/cli@latest ...",", use ",[62,493,123],{},", or install\n    ",[62,496,115],{}," globally with npm if you want a permanent command.\n  ",[461,499,501],{"id":500},"a-reaction-name-is-rejected","A reaction name is rejected",[23,503,504],{},"\n    Use one of the reaction names listed above. The CLI validates reaction names\n    before sending them to the desktop app.\n  ",{"title":506,"searchDepth":507,"depth":507,"links":508},"",2,[509,510,511,512,513,514,515,516],{"id":20,"depth":507,"text":21},{"id":131,"depth":507,"text":135},{"id":161,"depth":507,"text":162},{"id":267,"depth":507,"text":268},{"id":313,"depth":507,"text":314},{"id":373,"depth":507,"text":374},{"id":401,"depth":507,"text":402},{"id":455,"depth":507,"text":459,"children":517},[518,521,522],{"id":463,"depth":519,"text":520},3,"npx -y @open-pets/cli@latest status says the app is unavailable",{"id":483,"depth":519,"text":484},{"id":500,"depth":519,"text":501},"Use the published OpenPets npm CLI to check desktop status, list pets, send reactions, show short messages, and wire OpenPets into local shell automation.","md","npm CLI","fa6-solid:terminal",null,{},"CLI & shell scripts",5,"/integrations/cli",{"title":5,"description":523},"cli","Active","integrations/cli","Send pet reactions and short messages from terminal commands, npm scripts, git hooks, and local automation with @open-pets/cli.","k6FPc-JfG3KTDGrgjQ8Ez3DqBIm5XSuC_iK34DXm31I",1781360001525]