name: opscompanion-init description: Set up OpsCompanion with your API key and org configuration. Use when the user says "set up opscompanion", "configure opscompanion", or when any other opscompanion skill reports it's not configured.
OpsCompanion Setup
You are helping the user configure OpsCompanion (opc) for their Codex environment.
Preflight
- Check that
opcis installed:command -v opc || which opc - If not installed, install via Homebrew:
Do NOT suggest building from source. Always use Homebrew.brew install opscompanion/opc/opc
Configuration
Run the interactive init to configure API key and endpoint:
opc init
This writes config to ~/.config/opscompanion/config.json.
For development/demo mode, the user can use mock-key as the API key — this enables full mock responses without a real backend.
Install for Codex
After init succeeds, run the installer to set up skills and hooks in one step:
opc install --agent codex
This will:
- Download/update the OpsCompanion skills repository
- Symlink skills into
~/.agents/skills/ - Write
.codex/hooks.jsonwith hooks for:- PreToolUse — captures every tool invocation before execution
- PostToolUse — captures every tool result
All generated hooks include --agent codex so opc knows which runtime is calling it.
Verification
Verify the setup by loading context:
opc --agent codex context
If this prints org/user/integration details, the setup is complete.
After setup, the main observability commands are:
opc --agent codex logs "timeout" --service api --since 1h
opc --agent codex logs tail --service vercel-app --tui
opc --agent codex traces "checkout" --service api --since 6h
Response Format
After completing setup:
- Confirm which config file was written
- Confirm skills and hooks were installed
- Show the org name from
opc --agent codex contextto prove it works