Cursor
Connect Cursor to Kastra policies and verify the hook boundary.
On this page
Prerequisites
Install Edge, install Cursor, and sign in to the intended Kastra workspace. Use a test environment for initial policy checks.
Connect the hook
kastra-edge login
kastra-edge install-cursor --dry-run
kastra-edge install-cursor
kastra-edge doctor
The installer targets ~/.cursor/hooks.json. Review its proposed change and restart the agent so it loads the new configuration. Keep unrelated hooks intact.
What is governed
The Cursor integration checks supported pre-action events, including shell and file operations exposed by Cursor. Post-action events record activity after execution; their existence does not mean they can block the completed action.
The hook calls Kastra’s service before the supported action. Work outside the hook is not governed. Network or harness failures can allow work to continue under the integration’s failure behavior; read failure handling.
Verify the connection
Run a harmless action and inspect the exact decision in the console. Then test a narrow deny rule and a HOLD rule in your test environment. Confirm the actual side effect, not only the banner or notification. Verification checklist.
Operational notes
Windows configuration writing is implemented, but Cursor execution was not part of the recorded Windows validation. To remove the managed hooks, use kastra-edge uninstall-cursor.
If no decision appears, check the hook file, PATH, login, environment, agent restart, and troubleshooting guide. Installation detection alone cannot prove that the host invoked the hook.