# ox pr (https://sageox.ai/docs/cli/pr)

# ox pr

Author SageOx content that goes into a pull request. Distinct from `ox code prs`, which lists indexed PRs for triage.

## Usage

<Terminal>
  <TerminalCommand>ox pr [command]</TerminalCommand>
</Terminal>

## Subcommands

| Command | Description |
|---------|-------------|
| `ox pr header` | Emit the SageOx credit line for the top of a PR description |

## Examples

<Terminal>
  <TerminalCommand>ox pr header</TerminalCommand>
</Terminal>

Emit a thin, on-brand credit line to paste at the very top of a PR description. It auto-links the current session, names the team, and whispers a subtle enrichment stat. Keep the `SageOx-Session:` trailer at the bottom of the body.

<Terminal>
  <TerminalCommand>ox pr header --plan pln_4d8e2f --plan pln_1a6b9c --prior-art 2 --collisions 1</TerminalCommand>
</Terminal>

Link the plans a session produced and surface enrichment counts in the whisper.

<Terminal>
  <TerminalCommand>ox pr header > body.md && cat description.md >> body.md</TerminalCommand>
</Terminal>

Write the header straight into a PR body file, then append your description. Use a file, never a heredoc; a heredoc mangles the markup. Feed the result to `gh pr create --body-file body.md`.

## Flags

`ox pr header` accepts these flags:

| Flag | Description |
|------|-------------|
| `--session` | Session URL or `ses_` id to link (repeatable; defaults to the current session) |
| `--plan` | Plan URL or `pln_` id to link (repeatable) |
| `--prior-art` | Enrichment: related sessions surfaced |
| `--collisions` | Enrichment: concurrent edits flagged |
| `--style` | Whisper render: `text`, `image`, or `auto` |
| `--no-stat` | Suppress the enrichment whisper |
| `--allow-unconfirmed` | Accept links that may not be server-visible yet, without a warning (may 404) |

## What's next

- [ox plan](/docs/cli/plan) - Get the `pln_` ids to pass to `--plan`
- [ox session](/docs/cli/session) - The sessions a PR header links back to
- [ox viz](/docs/cli/viz) - Prepare a review visualization for the PR body
