The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
---
title: "beacon cloud cursor print-hooks"
description: "Print Cursor cloud hook settings"
---
## 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`](/cli/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.
```bash title="Command syntax"
beacon cloud cursor print-hooks
```
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](https://cursor.com/docs/hooks#cloud-agent-support)
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:
```bash title="Print hook settings for a cloud sandbox"
mkdir -p .cursor
beacon cloud cursor print-hooks \
--binary-path /tmp/beacon/bin/beacon-hooks \
--log-path /tmp/beacon/runtime.jsonl > .cursor/hooks.json
git add .cursor/hooks.json
```
## Related
<Columns cols={2}>
<Card title="beacon cloud" icon="cloud" href="/cli/cloud">
Review cloud command group behavior.
</Card>
<Card title="beacon cloud cursor print-setup" icon="cloud" href="/cli/cloud-cursor-print-setup">
Print a Cursor cloud agent binary setup script.
</Card>
</Columns>