Skip to Content
ArchitectureCursor Hooks

Cursor Hooks

How Intentra integrates with Cursor IDE.

Overview

Cursor supports external hooks that fire on AI actions.

Hook Configuration

The CLI creates ~/.cursor/hooks.json:

{ "onAIAction": { "command": "intentra", "args": ["hook", "cursor"] } }

Event Format

When Cursor fires the hook, it passes:

{ "action": "chat", "tokens": { "input": 500, "output": 750 }, "model": "gpt-4", "timestamp": "2024-01-15T10:30:00Z" }

Supported Actions

ActionDescription
chatChat interaction
completeCode completion
editAI-powered edit
searchSemantic search

Installation

intentra install cursor

This:

  1. Locates Cursor config directory
  2. Creates hooks.json if missing
  3. Adds Intentra hook configuration
  4. Verifies hook is active

Troubleshooting

If hooks aren’t firing:

  1. Restart Cursor
  2. Check hooks.json exists
  3. Run intentra hooks status