Skip to main content

Command overview

beacon cloud cursor print-hooks prints project-level Cursor hook settings for a cloud sandbox. The install script from beacon cloud cursor print-setup already writes these hooks at Build time without committing them. Use print-hooks when you want the hooks committed to .cursor/hooks.json instead, or to merge Beacon’s entries into a hooks file the repository already commits. Committed project hooks also run in every local Cursor session on the repository, where they run /tmp/beacon/bin/beacon-hooks from a world-writable directory: on a shared machine, whoever creates that file has it run as each developer.
Command syntax
The rendered hooks set BEACON_ORIGIN=cloud, BEACON_RUN_PROVIDER=cursor_cloud, and BEACON_RUN_EPHEMERAL=true for Cursor cloud hook events. --safe-hooks leaves out the shell and edit hooks (beforeShellExecution, afterShellExecution, afterFileEdit) so you can prove telemetry forwarding works before the agent’s commands and edits pass through Beacon. --log-path defaults to /tmp/beacon/runtime.jsonl and must name a file under /tmp/beacon, the only directory the cloud shuttle uploads from; any other path is rejected. The generated hook set uses supported Cursor Cloud hooks such as beforeSubmitPrompt, beforeReadFile, beforeShellExecution, afterShellExecution, afterFileEdit, postToolUse, postToolUseFailure, subagentStart, subagentStop, preCompact, afterAgentThought, afterAgentResponse, and stop. It currently omits broad preToolUse, sessionStart, and sessionEnd. stop also uploads the log at the end of each turn. See Cursor’s Cloud Agent hook support matrix for the current platform support list. Beacon uses Cursor’s conversation_id hook payload as the default run.run_id for Cursor Cloud telemetry unless BEACON_RUN_ID is already set. Prompt events are written and uploaded as soon as beforeSubmitPrompt runs, including prompt-only follow-up turns.

Examples

Print hook settings for a cloud sandbox:
Print hook settings for a cloud sandbox

beacon cloud

Review cloud command group behavior.

beacon cloud cursor print-setup

Print a Cursor cloud agent binary setup script.