Exit Codes

May 19, 2026 ยท View on GitHub

opencli follows Unix sysexits.h conventions so it integrates naturally with shell pipelines and CI scripts.

CodeMeaningWhen
0SuccessCommand completed normally
1Generic errorUnexpected / unclassified failure
2Usage errorBad arguments or unknown command
66Empty resultNo data returned (EX_NOINPUT)
69Service unavailableBrowser Bridge not connected (EX_UNAVAILABLE)
75Temporary failureCommand timed out โ€” retry (EX_TEMPFAIL)
77Auth requiredNot logged in to target site (EX_NOPERM)
78Config errorMissing credentials or bad config (EX_CONFIG)
130InterruptedCtrl-C / SIGINT

Example: branch on exit code

opencli spotify status || echo "exit $?"   # 69 if browser not running

opencli gh issue list 2>/dev/null
[ $? -eq 77 ] && opencli gh auth login      # auto-auth if not logged in