Skip to main content

Module claude_code

Module claude_code 

Source
Expand description

Agent hook detection and installation.

Public API:

  • detect_agent — detect which (if any) AI agent is installed
  • install_hooks — write OpenLatch HTTP hook entries into the agent’s config
  • remove_hooks — remove all OpenLatch-owned hook entries

§Module structure

  • claude_code — path detection and hook entry building for Claude Code
  • jsonc — JSONC-preserving string surgery on settings.json

Functions§

build_hook_entry
Build a Claude Code HTTP hook entry for the given event type.
detect
Detect whether Claude Code is installed.
settings_json_path
Return the path to settings.json inside the Claude Code config directory.