> ## Documentation Index
> Fetch the complete documentation index at: https://repost.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Repost CLI Reference: Commands, Flags, and Shortcuts

> Complete reference for all repost CLI commands, flags, TUI keyboard shortcuts, and environment variables including auth, bucket, forwarder, and forward.

This page documents every command, flag, shortcut, and environment variable available in the current `repost` binary. Use the navigation below to jump to a specific section.

## Global flags

These flags apply to every `repost` command.

| Flag                  | Description                                                                               |
| --------------------- | ----------------------------------------------------------------------------------------- |
| `--config <dir>`      | Use a specific config directory for local preferences and encrypted token fallback.       |
| `--no-color`          | Disable terminal styling and produce plain text output.                                   |
| `--skip-update-check` | Disable the background update check on startup. Equivalent to `REPOST_NO_UPDATE_CHECK=1`. |

## `auth`

The `auth` commands manage how the CLI authenticates to your Repost account.

<AccordionGroup>
  <Accordion title="repost auth login">
    Opens browser login, receives a local callback, and stores the generated API token securely in your system keychain or an encrypted config file.

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost auth login
    ```

    If a token is already saved, this command keeps the existing token and will not replace it. Run `repost auth logout` first when you need to switch accounts.
  </Accordion>

  <Accordion title="repost auth token [TOKEN]">
    Stores an API token for non-browser authentication. If `TOKEN` is omitted, the CLI reads from stdin. Tokens must start with `rp_` and be exactly 43 characters long.

    <CodeGroup>
      ```bash Argument theme={"languages":{"custom":["/languages/repost.json"]}}
      repost auth token rp_your_token_here
      ```

      ```bash Stdin theme={"languages":{"custom":["/languages/repost.json"]}}
      printf "%s\n" "$MY_TOKEN" | repost auth token
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="repost auth status">
    Validates the current token against the Repost API and prints a summary. When server validation succeeds, the output includes:

    * Token name
    * Token type (personal or organization)
    * Token prefix
    * Scopes
    * Creation time
    * Last-used time
    * Expiration date
    * Auth method (stored token or `REPOST_TOKEN` environment variable)

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost auth status
    ```

    If a stored token has been revoked server-side, the CLI removes the local copy and asks you to authenticate again.
  </Accordion>

  <Accordion title="repost auth logout">
    Attempts to revoke the stored token on the Repost server, then removes the token saved in local secure storage.

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost auth logout
    ```

    <Warning>
      `repost auth logout` does **not** unset `REPOST_TOKEN` from your shell environment. Commands that run after logout will continue to use the environment variable if it is still set. Unset it manually with `unset REPOST_TOKEN`.
    </Warning>
  </Accordion>
</AccordionGroup>

## `bucket`

### `repost bucket list`

Lists every bucket the authenticated account can access.

```bash theme={"languages":{"custom":["/languages/repost.json"]}}
repost bucket list
```

Shortcut: `repost bl`

Output columns:

| Column   | Description                                           |
| -------- | ----------------------------------------------------- |
| `ID`     | Bucket identifier.                                    |
| `NAME`   | Human-readable bucket name.                           |
| `SLUG`   | Bucket slug. Use this value with `repost forward -b`. |
| `DOMAIN` | Public bucket domain.                                 |
| `STATUS` | `active` or `inactive`.                               |

## `forwarder`

The `forwarder` commands let you list, pause, resume, and disable forwarders across your buckets.

### `repost forwarder list`

Lists forwarders across every accessible bucket. Pass `--bucket <bucket-slug>` to scope the output to one bucket. Bucket ID is accepted for compatibility.

<CodeGroup>
  ```bash All buckets theme={"languages":{"custom":["/languages/repost.json"]}}
  repost forwarder list
  ```

  ```bash One bucket theme={"languages":{"custom":["/languages/repost.json"]}}
  repost forwarder list --bucket stripe-prod
  ```
</CodeGroup>

Shortcut: `repost fl`

Output columns:

| Column   | Description                                          |
| -------- | ---------------------------------------------------- |
| `ID`     | Forwarder identifier.                                |
| `NAME`   | Forwarder name.                                      |
| `TYPE`   | Forwarder type, such as `INTERNAL`.                  |
| `STATUS` | `active`, `paused`, or `inactive`.                   |
| `TARGET` | Target URL, topic display, or `-` if not applicable. |

### Pause, resume, and disable

Run any of the following commands without flags to open an interactive selector, or pass `--bucket` and `--forwarder` for scripted use.

<CodeGroup>
  ```bash Pause theme={"languages":{"custom":["/languages/repost.json"]}}
  repost forwarder pause \
    --bucket stripe-prod \
    --forwarder local-webhooks
  ```

  ```bash Resume theme={"languages":{"custom":["/languages/repost.json"]}}
  repost forwarder resume \
    -b stripe-prod \
    -f local-webhooks
  ```

  ```bash Disable theme={"languages":{"custom":["/languages/repost.json"]}}
  repost forwarder disable \
    -b stripe-prod \
    -f old-webhook-target
  ```
</CodeGroup>

<Note>
  `repost forwarder resume` also reactivates a forwarder that has been disabled, not just one that is paused.
</Note>

Flags for pause, resume, and disable:

| Flag                     | Description                                           |
| ------------------------ | ----------------------------------------------------- |
| `-b, --bucket <slug>`    | Bucket slug.                                          |
| `--bucket-slug <slug>`   | Compatibility alias for `--bucket`.                   |
| `-f, --forwarder <name>` | Forwarder name. Repeatable — pass once per forwarder. |

Action output columns (same shape for pause, resume, and disable):

| Column    | Description                                                         |
| --------- | ------------------------------------------------------------------- |
| `OUTCOME` | `PAUSED`, `RESUMED`, `DISABLED`, or `FAILED`.                       |
| `NAME`    | Forwarder name.                                                     |
| `TYPE`    | Forwarder type.                                                     |
| `TARGET`  | Target URL, topic display, or the API error when the action failed. |

Command shortcuts:

| Shortcut    | Equivalent command         |
| ----------- | -------------------------- |
| `repost bl` | `repost bucket list`       |
| `repost fl` | `repost forwarder list`    |
| `repost fp` | `repost forwarder pause`   |
| `repost fr` | `repost forwarder resume`  |
| `repost fd` | `repost forwarder disable` |

## `forward`

`repost forward` connects selected internal forwarders to your local machine and opens the terminal UI.

<CodeGroup>
  ```bash Interactive theme={"languages":{"custom":["/languages/repost.json"]}}
  repost forward
  ```

  ```bash One forwarder theme={"languages":{"custom":["/languages/repost.json"]}}
  repost forward \
    --bucket stripe-prod \
    --forwarder local-webhooks
  ```

  ```bash Multiple forwarders theme={"languages":{"custom":["/languages/repost.json"]}}
  repost forward \
    -b stripe-prod \
    -f local-api \
    -f local-worker
  ```
</CodeGroup>

Flags:

| Flag                     | Description                                                                                                      |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| `-b, --bucket <slug>`    | Bucket slug. Required when `--forwarder` is present.                                                             |
| `--bucket-slug <slug>`   | Compatibility alias for `--bucket`.                                                                              |
| `-f, --forwarder <name>` | Internal forwarder name. Repeatable. Required when `--bucket` is present.                                        |
| `--pending-first`        | Process queued events before new real-time events.                                                               |
| `--skip-pending`         | Skip queued events for this session and receive new events only.                                                 |
| `--headless`             | Run without the terminal UI. Prints `HEADLESS_READY` to stdout after setup. Intended for CI and automated tests. |

<Warning>
  Do not combine `--pending-first` and `--skip-pending`. If both are present, `--skip-pending` takes precedence and all queued events are skipped.
</Warning>

Target resolution rules:

| Input               | Rule                                                       |
| ------------------- | ---------------------------------------------------------- |
| `--bucket`          | Matches the bucket slug from `repost bucket list`.         |
| `--bucket-slug`     | Compatibility alias for `--bucket`.                        |
| `--forwarder`       | Matches an internal forwarder name inside that bucket.     |
| Partial flags       | Passing only `--bucket` or only `--forwarder` is rejected. |
| Multiple forwarders | Repeat `--forwarder` once per internal forwarder name.     |

## TUI keyboard shortcuts

These shortcuts are available during an active `repost forward` session.

| Context        | Keys                    | Action                                                      |
| -------------- | ----------------------- | ----------------------------------------------------------- |
| Event list     | `j` / `k` or arrow keys | Move selection up and down.                                 |
| Event list     | `g` / `Home`            | Jump to the top of the list.                                |
| Event list     | `G` / `End`             | Jump to the bottom of the list.                             |
| Event list     | `Space`                 | Open the detail panel for the selected event.               |
| Event list     | `c`                     | Copy the selected row context.                              |
| Event list     | `t`                     | Generate types from the selected JSON request body.         |
| Event list     | `Ctrl+L`                | Clear all local rows from the TUI.                          |
| Details panel  | `Space` or `Esc`        | Close the detail panel.                                     |
| Details panel  | `c`                     | Copy the detail view.                                       |
| Details panel  | `t`                     | Generate types from the request body.                       |
| Generate types | `h` / `l` or arrow keys | Switch between supported languages.                         |
| Generate types | `Tab`                   | Edit the root type name.                                    |
| Generate types | `o`                     | Open the options panel.                                     |
| Generate types | `Space` / `Enter`       | Toggle an option, cycle a value, or commit an edited value. |
| Generate types | `c`                     | Copy the generated code.                                    |
| Generate types | `Esc`                   | Close the generate types panel.                             |
| Any view       | `q` or `Ctrl+C`         | Quit the CLI.                                               |

## `schema`

The `schema` commands define, validate, version, and generate code for your webhook events. They delegate to a bundled schema engine that release builds embed, so no separate install is needed — your arguments pass through verbatim and the engine's output and exit code are preserved. These are human-facing commands: they do not emit the agent JSON envelope, and the `--json` / `--output` flags do not apply. See [Schema](/docs/cli/schema) for the end-to-end workflow.

<AccordionGroup>
  <Accordion title="repost schema init">
    Scaffold a new schema workspace: creates `repost/schema.repost` (a `generator` block plus a small working example), a `.env` placeholder, and a `.gitignore` that covers `.env` and the generated output. Refuses if `repost/` already exists. Interactive on a terminal; pass the flags to run headless.

    | Flag                | Description                                                                              |
    | ------------------- | ---------------------------------------------------------------------------------------- |
    | `--language <lang>` | SDK language for the generator block: `typescript`, `go`, `python`, `java`, or `kotlin`. |
    | `--output <path>`   | Generated-code output directory. Required for every language except TypeScript.          |

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost schema init --language java --output ./src/main/java
    ```
  </Accordion>

  <Accordion title="repost schema validate">
    Parse and validate `.repost` files without writing output. The exit code reflects the diagnostics, so it is CI-friendly.

    | Flag              | Description                                      |
    | ----------------- | ------------------------------------------------ |
    | `--schema <path>` | Path to a `.repost` file or a directory of them. |

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost schema validate
    ```
  </Accordion>

  <Accordion title="repost schema generate">
    Validate, then emit each generator's SDK (`typescript`, `go`, `python`, `java`, or `kotlin`) and the JSON Schema into the path its `generator` block points at. No migration is written. It refuses (hard error) when the migration lineage has a fork or a hand-edited snapshot, and warns on stderr — but still generates — when the schema has unmigrated changes.

    A Java or Kotlin generator also needs `packageName`, `clientName`, and a `resourceOutput` root (for the `client.json` registry) alongside `output`. JVM projects usually generate through the Maven (`repost:generate` / `repost:check`) or Gradle (`repostGenerate` / `repostGenerateCheck`) plugin rather than the CLI — see the [Java](/docs/send/java/quickstart) and [Kotlin](/docs/send/kotlin/quickstart) guides.

    | Flag              | Description                                      |
    | ----------------- | ------------------------------------------------ |
    | `--schema <path>` | Path to a `.repost` file or a directory of them. |

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost schema generate
    ```
  </Accordion>

  <Accordion title="repost schema migrate dev">
    Diff the current output against the previous state; when it changed, write a new `repost/migrations/<timestamp>_<name>/` snapshot (the directory is prefixed with a UTC `YYYYMMDDHHMMSS` timestamp), bump the affected event versions, and regenerate. No change is a no-op. Each migration records its `parent` (or `parents` for a reconciliation) and a `checksum` of its snapshot.

    `--name` is optional: when a migration is written and it is omitted, the command prompts for a name on a terminal (an empty answer gives a timestamp-only directory) and errors when stdin is not a terminal.

    When the migration would **remove** event types, it lists them and requires an explicit `y` on a terminal (default No), or `--accept-removals` to proceed non-interactively. This is the one command that reconciles a fork: it diffs the merged schema against every head, prints a per-parent summary, and records `parents: [...]`.

    | Flag                | Description                                                                                                       |
    | ------------------- | ----------------------------------------------------------------------------------------------------------------- |
    | `--name <name>`     | Name for the migration, slugged into the `<timestamp>_<name>` directory. Prompted for interactively when omitted. |
    | `--accept-removals` | Proceed without prompting when the migration removes event types (required to remove non-interactively).          |
    | `--schema <path>`   | Path to a `.repost` file or a directory of them.                                                                  |

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost schema migrate dev --name add_subtitle
    ```

    After merging a branch that added migrations, run `repost schema migrate dev` once to write a reconciling migration; in CI, use `repost schema migrate status` (below) as the gate.
  </Accordion>

  <Accordion title="repost schema migrate status">
    Report migration health without writing anything — the CI gate. Exit code `0` with a one-line summary when the lineage is clean; non-zero with a line-per-finding report when a merge left a **fork**, when the schema has **unmigrated changes** (the emission differs from the last snapshot, so `migrate dev` is not a no-op), or when a snapshot's **checksum** no longer matches (a hand-edited or corrupted artifact).

    | Flag              | Description                                      |
    | ----------------- | ------------------------------------------------ |
    | `--schema <path>` | Path to a `.repost` file or a directory of them. |

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost schema migrate status
    ```
  </Accordion>

  <Accordion title="repost schema migrate deploy">
    Apply the committed migrations to a live Repost environment: sends the migration head, the full lineage, and the accumulated `schemas.json`; the server materializes the event-type registry. Requires a **clean** local status — a fork, unmigrated changes, or a checksum mismatch is a hard error. Re-deploying the same head is a no-op. A server head that is not in your lineage refuses the deploy with a machine-readable reason: **behind** (your checkout is stale — `git pull` the latest migrations and redeploy) or **diverged** (the histories have split — reconcile by git-merging the deployed migrations and running `migrate dev`, or replace the deployed history with `--force`).

    Auth: `REPOST_TOKEN` (an environment-scoped token with the `schema:deploy` scope) and optionally `REPOST_API_URL`, read from `repost/.env` before the process environment.

    `--force` replaces a diverged (or rolled-back) deployed history: the CLI fetches the deployed head, shows what will be replaced, and asks for confirmation, then echoes that head back as an optimistic lease — if the head moves between the look and the deploy, the force is refused. Forcing to an older, previously deployed checksum rewinds the registry (the rollback path).

    | Flag               | Description                                                                                                                                                                    |
    | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | `--dry-run`        | Print the deployment payload instead of sending it.                                                                                                                            |
    | `--force`          | Replace the deployed history when it is not an ancestor of yours (diverged or rolled back): fetches the deployed head, shows what will be replaced, and asks for confirmation. |
    | `--accept-replace` | Proceed without prompting when `--force` replaces the deployed history (required to force non-interactively).                                                                  |
    | `--schema <path>`  | Path to a `.repost` file or a directory of them.                                                                                                                               |

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost schema migrate deploy
    ```
  </Accordion>

  <Accordion title="repost schema push">
    Push the current schema to a live Repost environment **without a migration artifact** — Prisma's `db push`, for dev and staging loops. Refused on environments that already have migration history, so a push can never fork a production lineage. The payload is checksummed from the emission itself, so repeat pushes of an unchanged schema are no-ops. Same auth as `migrate deploy`.

    | Flag              | Description                                         |
    | ----------------- | --------------------------------------------------- |
    | `--dry-run`       | Print the deployment payload instead of sending it. |
    | `--schema <path>` | Path to a `.repost` file or a directory of them.    |

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost schema push
    ```
  </Accordion>

  <Accordion title="repost schema import svix FILE">
    Convert a Svix environment export into a `repost/` workspace.

    | Flag          | Description                                                              |
    | ------------- | ------------------------------------------------------------------------ |
    | `--out <dir>` | Directory to scaffold `repost/` into. Defaults to the current directory. |

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost schema import svix export.json --out app
    ```
  </Accordion>

  <Accordion title="repost schema fmt [PATH]">
    Format `.repost` files in place. Idempotent.

    | Flag      | Description                                                       |
    | --------- | ----------------------------------------------------------------- |
    | `--check` | Do not write; exit non-zero if any file is not already formatted. |

    <CodeGroup>
      ```bash Format theme={"languages":{"custom":["/languages/repost.json"]}}
      repost schema fmt
      ```

      ```bash Check only theme={"languages":{"custom":["/languages/repost.json"]}}
      repost schema fmt --check
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

## Maintenance

<CardGroup cols={2}>
  <Card title="repost version" icon="badge-info">
    Prints the binary version. Output may include commit hash and build date metadata.

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost version
    ```
  </Card>

  <Card title="repost update" icon="download">
    Checks for a newer release and prompts to install it. Add `--force` to redownload the latest release regardless of the current version.

    ```bash theme={"languages":{"custom":["/languages/repost.json"]}}
    repost update
    repost update --force
    ```
  </Card>
</CardGroup>

### Shell completion and help

`repost completion [bash|zsh|fish|powershell]` prints a shell-completion script, and `repost help [COMMAND]` (or `repost` with no arguments) prints usage. These are standard Cobra built-ins — interactive conveniences with no JSON envelope and no stable contract, so they are **out of scope for agent automation**. For machine-readable command discovery, use [`capabilities`](/docs/agents/discovery) and [`docs schema`](/docs/agents/discovery) instead.

## Agentic commands

These commands are built for non-interactive use — scoped tokens, machine-readable output, and stable exit codes. This section is the flag-level reference. For the operating model, runbooks, and the JSON contract, see the [Agents](/docs/agents) section and [Output & errors](/docs/agents/output-and-errors).

### Output format

Every command below honors the global output flags.

| Flag                               | Effect                                                                              |
| ---------------------------------- | ----------------------------------------------------------------------------------- |
| `--json`                           | Machine-readable JSON on stdout.                                                    |
| `--output json` / `--output table` | Force JSON, or force human tables. Takes precedence over `--json`.                  |
| *(none)*                           | Non-terminal stdout (piped/redirected) auto-enables JSON; a terminal prints tables. |

`expect`, `tail`, `capabilities`, and `docs schema` always emit JSON regardless of these flags. `docs search` and `docs agent` emit Markdown. `capabilities` exposes each command's `output_mode` so agents can distinguish envelopes, top-level JSON, JSONL, raw-body exceptions, Markdown, and interactive streams.

### Command, schema, and scope map

| Command                                                                 | Output schema                                      | Scope                                                  |
| ----------------------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------ |
| `auth token [TOKEN]`                                                    | `repost.auth.token/v1`                             | — (local credential storage)                           |
| `auth status`                                                           | `repost.auth.status/v1`                            | read                                                   |
| `auth logout`                                                           | `repost.auth.logout/v1`                            | write when revoking a server token                     |
| `whoami`                                                                | `repost.whoami/v1`                                 | read                                                   |
| `capabilities`                                                          | `repost.capabilities/v1`                           | — (local)                                              |
| `docs schema [COMMAND]`                                                 | `repost.command_schema/v1`                         | — (local)                                              |
| `docs search` · `docs agent`                                            | Markdown                                           | — (local)                                              |
| `version`                                                               | `repost.version/v1`                                | — (local)                                              |
| `update`                                                                | `repost.update/v1`                                 | — (release download)                                   |
| `events search [QUERY]`                                                 | `repost.events.search/v1`                          | read                                                   |
| `events get EVENT_ID`                                                   | `repost.events.get/v1`                             | read · `secrets` for `--reveal-secrets`/`--as-fixture` |
| `events diff L R`                                                       | `repost.events.diff/v1`                            | read                                                   |
| `events schema [EVENT_ID]`                                              | `repost.events.schema/v1`                          | read                                                   |
| `forwards search [QUERY]`                                               | `repost.forwards.search/v1`                        | read                                                   |
| `forwards chain EVENT_ID`                                               | `repost.forwards.chain/v1`                         | read                                                   |
| `dlq list`                                                              | `repost.dlq.list/v1`                               | read                                                   |
| `health`                                                                | `repost.health/v1`                                 | read                                                   |
| `expect`                                                                | bare object (no envelope)                          | read                                                   |
| `tail`                                                                  | NDJSON (no envelope)                               | read                                                   |
| `init`                                                                  | `repost.init/v1`                                   | write                                                  |
| `promote setup`                                                         | `repost.promote.setup/v1`                          | write                                                  |
| `bucket create NAME` · `bucket get SLUG` · `bucket list`                | `repost.bucket.create/v1` · `.get/v1` · `.list/v1` | write · read · read                                    |
| `forwarder create NAME` · `forwarder list`                              | `repost.forwarder.create/v1` · `.list/v1`          | write · read                                           |
| `forwarder pause`/`resume`/`disable`                                    | `repost.forwarder.action/v1`                       | write                                                  |
| `replay [EVENT_ID...]`                                                  | `repost.replay.create/v1`                          | write                                                  |
| `replay status`/`wait JOB_ID`                                           | `repost.replay.status/v1`                          | read                                                   |
| `replay list`                                                           | `repost.replay.list/v1`                            | read                                                   |
| `replay pause JOB_ID` · `replay resume JOB_ID` · `replay cancel JOB_ID` | `repost.replay.action/v1`                          | write                                                  |

`bucket list`, `forwarder list`, and `forwarder pause`/`resume`/`disable` are documented under [`bucket`](#bucket) and [`forwarder`](#forwarder) above; pass `--json` for the schemas listed here.

### Identity and discovery

<AccordionGroup>
  <Accordion title="repost whoami" icon="id-card">
    Prints the authenticated identity, active organization, plan, and usage. Schema `repost.whoami/v1`. No command-specific flags.
  </Accordion>

  <Accordion title="repost capabilities" icon="list-tree">
    Prints the machine-readable command manifest — paths, usage, descriptions, command kind, group IDs, output mode, agent contract status, output schema names, and flags. Always JSON. Cache it by its `version` field.

    | Flag     | Default | Meaning                  |
    | -------- | ------- | ------------------------ |
    | `--json` | `false` | Print the JSON manifest. |
  </Accordion>

  <Accordion title="repost docs schema [COMMAND]" icon="braces">
    Prints one command's output schema, output mode, runtime envelope shape, and a `data_shape` when one is documented. Schema `repost.command_schema/v1`.
  </Accordion>

  <Accordion title="repost docs search · docs agent" icon="book-open">
    `docs search` prints the query cheatsheet. `docs agent` prints the operating manual. Output is Markdown.

    | Flag             | Applies to   | Meaning                                                 |
    | ---------------- | ------------ | ------------------------------------------------------- |
    | `--topic <name>` | `docs agent` | Print a specific topic, e.g. `runbooks`.                |
    | `--install`      | `docs agent` | Write `.repost/AGENTS.md` and print an `@include` line. |
    | `--stdout`       | `docs agent` | Print the primer to stdout instead of writing a file.   |
  </Accordion>
</AccordionGroup>

### Investigate

<AccordionGroup>
  <Accordion title="repost events search [QUERY]" icon="search">
    Search received events. Schema `repost.events.search/v1`. Returns `next_cursor`/`has_more` for forward paging.

    | Flag                      | Default | Meaning                                                           |
    | ------------------------- | ------- | ----------------------------------------------------------------- |
    | `-b, --bucket <slug\|id>` |         | Bucket slug or ID to search.                                      |
    | `--all-buckets`           | `false` | Search every bucket visible to the token.                         |
    | `--since <time>`          |         | RFC3339 timestamp or duration ago (e.g. `30m`).                   |
    | `--until <time>`          |         | RFC3339 timestamp or duration ago.                                |
    | `--limit <n>`             | `20`    | Maximum events to return.                                         |
    | `--cursor <token>`        |         | Pagination cursor from a previous search (same query and window). |
  </Accordion>

  <Accordion title="repost events get EVENT_ID" icon="file-text">
    Fetch one event with credentials redacted by default. Schema `repost.events.get/v1`. Body truncates to 4096 bytes unless `--full`.

    | Flag               | Default | Meaning                                                       |
    | ------------------ | ------- | ------------------------------------------------------------- |
    | `--full`           | `false` | Return full request and response bodies.                      |
    | `--body-only`      | `false` | Print only the raw request body (no envelope).                |
    | `--reveal-secrets` | `false` | Return unredacted values. Requires `secrets` scope.           |
    | `--as-fixture`     | `false` | Return the event as a test fixture. Requires `secrets` scope. |
  </Accordion>

  <Accordion title="repost events diff LEFT_EVENT_ID RIGHT_EVENT_ID" icon="git-compare">
    Compare two events after default redaction. Schema `repost.events.diff/v1`.
  </Accordion>

  <Accordion title="repost events schema [EVENT_ID]" icon="shapes">
    Infer a JSON schema from event bodies or supplied samples. Schema `repost.events.schema/v1`.

    | Flag                      | Default | Meaning                                |
    | ------------------------- | ------- | -------------------------------------- |
    | `-b, --bucket <slug\|id>` |         | Bucket slug or ID for the samples.     |
    | `--path <glob>`           |         | Path glob to sample within the bucket. |
    | `--sample-json <json>`    |         | Inline JSON sample; repeatable.        |
    | `--max-samples <n>`       | `25`    | Maximum samples used for inference.    |
  </Accordion>

  <Accordion title="repost forwards search [QUERY]" icon="send">
    Search delivery attempts. Schema `repost.forwards.search/v1`.

    | Flag                         | Default | Meaning                                                   |
    | ---------------------------- | ------- | --------------------------------------------------------- |
    | `-f, --forwarder <id\|name>` |         | Forwarder ID or name.                                     |
    | `-b, --bucket <slug\|id>`    |         | Bucket slug or ID; required when `--forwarder` is a name. |
    | `--event <id>`               |         | Filter to one event ID.                                   |
    | `--failed`                   | `false` | Show failed forwards only.                                |
    | `--since` / `--until <time>` |         | Time bounds (RFC3339 or duration).                        |
    | `--limit <n>`                | `20`    | Maximum forwards to return.                               |
    | `--cursor <token>`           |         | Pagination cursor from a previous search.                 |
  </Accordion>

  <Accordion title="repost forwards chain EVENT_ID" icon="link">
    The authoritative per-attempt delivery timeline for one event and forwarder. Schema `repost.forwards.chain/v1`.

    | Flag                         | Default | Meaning                                                   |
    | ---------------------------- | ------- | --------------------------------------------------------- |
    | `-f, --forwarder <id\|name>` |         | Forwarder ID or name.                                     |
    | `-b, --bucket <slug\|id>`    |         | Bucket slug or ID; required when `--forwarder` is a name. |
  </Accordion>

  <Accordion title="repost dlq list" icon="archive">
    List dead-letter rows for a bucket or forwarder. Schema `repost.dlq.list/v1`.

    | Flag                         | Default | Meaning                                                   |
    | ---------------------------- | ------- | --------------------------------------------------------- |
    | `-f, --forwarder <id\|name>` |         | Forwarder ID or name.                                     |
    | `-b, --bucket <slug\|id>`    |         | Bucket slug or ID; required when `--forwarder` is a name. |
    | `--since` / `--until <time>` |         | Time bounds (RFC3339 or duration).                        |
    | `--limit <n>`                | `20`    | Maximum DLQ rows to return.                               |
    | `--cursor <token>`           |         | Pagination cursor from a previous list.                   |
    | `--include-archived`         | `false` | Include archived DLQ rows.                                |
  </Accordion>

  <Accordion title="repost health" icon="activity">
    Forwarder health over a window, with optional threshold gating. Schema `repost.health/v1`.

    | Flag                         | Default | Meaning                                                                               |
    | ---------------------------- | ------- | ------------------------------------------------------------------------------------- |
    | `-b, --bucket <slug\|id>`    |         | Bucket slug or ID.                                                                    |
    | `-f, --forwarder <id\|name>` |         | Forwarder ID or name.                                                                 |
    | `--window <dur>`             | `1h`    | Health window duration.                                                               |
    | `--fail-on <expr>`           |         | Exit `8` when the expression breaches, e.g. `success_rate < 0.99 \|\| dlq_depth > 0`. |
  </Accordion>
</AccordionGroup>

### Wait for events

<AccordionGroup>
  <Accordion title="repost expect" icon="timer">
    Block until one matching event arrives on the observe stream. Emits a bare JSON object (no envelope) and exits `0`; exits `7` on timeout.

    | Flag                      | Default | Meaning                       |
    | ------------------------- | ------- | ----------------------------- |
    | `-b, --bucket <slug\|id>` |         | Bucket slug or ID to observe. |
    | `--filter <query>`        |         | Events query filter.          |
    | `--path <glob>`           |         | Path glob to match.           |
    | `--method <verb>`         |         | HTTP method to match.         |
    | `--timeout <dur>`         | `30s`   | Maximum time to wait.         |
  </Accordion>

  <Accordion title="repost tail" icon="list">
    Stream compact, redacted events as NDJSON (one object per line). Set at least one bound.

    | Flag                      | Default | Meaning                                    |
    | ------------------------- | ------- | ------------------------------------------ |
    | `-b, --bucket <slug\|id>` |         | Bucket slug or ID to observe.              |
    | `--filter <query>`        |         | Events query filter.                       |
    | `--count <n>`             | `0`     | Stop after N events (`0` = unlimited).     |
    | `--max-wait <dur>`        | `0`     | Stop after this duration (`0` = no limit). |
  </Accordion>
</AccordionGroup>

### Mutate

<AccordionGroup>
  <Accordion title="repost init" icon="rocket">
    Create a bucket and an external forwarder in one step. Schema `repost.init/v1`.

    | Flag                      | Default   | Meaning                                |
    | ------------------------- | --------- | -------------------------------------- |
    | `--name <name>`           |           | Bucket name.                           |
    | `--target <url>`          |           | Target URL for the external forwarder. |
    | `--forwarder-name <name>` | `default` | Forwarder name.                        |
    | `--idempotency-key <key>` |           | Stable key for retry-safe init.        |
  </Accordion>

  <Accordion title="repost promote setup" icon="shield-check">
    Promote a temporary guest webhook setup into account-backed resources through the browser-confirmed local callback flow. Schema `repost.promote.setup/v1`. The command first emits `status: "requires_user_action"`, then either `status: "completed"` after the CLI receives the browser callback or `status: "failed"` before exiting non-zero.

    | Flag                                    | Default | Meaning                                                           |
    | --------------------------------------- | ------- | ----------------------------------------------------------------- |
    | `--from-guest <guest-url-or-access-id>` |         | Temporary guest URL, bucket endpoint URL, or access ID. Required. |
    | `--yes`                                 | `false` | Reserved; browser confirmation is always required.                |
  </Accordion>

  <Accordion title="repost bucket create NAME · bucket get SLUG" icon="inbox">
    `create` provisions a bucket (schema `repost.bucket.create/v1`); `get` returns a bucket plus its forwarders (schema `repost.bucket.get/v1`).

    | Flag                      | Default   | Meaning                         |
    | ------------------------- | --------- | ------------------------------- |
    | `--color <hex>`           | `#3B82F6` | Bucket color.                   |
    | `--response-mode <mode>`  | `QUEUE`   | `QUEUE` or `PROXY`.             |
    | `--ack-status-code <n>`   | `200`     | ACK status code for queue mode. |
    | `--ack-body <text>`       |           | ACK response body.              |
    | `--proxy-timeout-ms <ms>` | `30000`   | Proxy timeout for proxy mode.   |
  </Accordion>

  <Accordion title="repost forwarder create NAME" icon="route">
    Create a forwarder on a bucket. Schema `repost.forwarder.create/v1`. `--target` is required for `EXTERNAL` forwarders.

    | Flag                          | Default    | Meaning                                                         |
    | ----------------------------- | ---------- | --------------------------------------------------------------- |
    | `-b, --bucket <slug\|id>`     |            | Bucket slug. Bucket ID is accepted for compatibility. Required. |
    | `--target <url>`              |            | Target URL (required for `EXTERNAL`).                           |
    | `--type <type>`               | `EXTERNAL` | Forwarder type.                                                 |
    | `--path-mode <mode>`          | `LOCKED`   | Path handling mode.                                             |
    | `--http-timeout-ms <ms>`      | `30000`    | Per-attempt request timeout.                                    |
    | `--max-retries <n>`           | `3`        | Delivery attempts before the DLQ.                               |
    | `--retry-delay-ms <ms>`       | `15000`    | Initial retry backoff.                                          |
    | `--retry-backoff <x>`         | `2.0`      | Backoff multiplier.                                             |
    | `--retry-max-delay-ms <ms>`   | `900000`   | Backoff ceiling.                                                |
    | `--rate-limit-per-second <n>` | `0`        | Per-forwarder rate limit (`0` = off).                           |
  </Accordion>

  <Accordion title="repost replay [EVENT_ID...]" icon="rotate-ccw">
    Preview or create a forwarder-scoped replay. Schema `repost.replay.create/v1`. A single explicit event ID needs no `--yes`; a `--query` or `--dlq` selection, or multiple IDs, require `--yes` unless `--dry-run`.

    | Flag                                   | Default | Meaning                                                   |
    | -------------------------------------- | ------- | --------------------------------------------------------- |
    | `-f, --forwarder <id\|name>`           |         | Target forwarder. Required.                               |
    | `-b, --bucket <slug\|id>`              |         | Bucket slug or ID; required when `--forwarder` is a name. |
    | `--query <expr>`                       |         | Quickwit query selecting prior deliveries.                |
    | `--dlq`                                | `false` | Replay dead-letter rows.                                  |
    | `--dlq-id-from` / `--dlq-id-to <ulid>` |         | DLQ ULID range bounds.                                    |
    | `--dlq-id <id>`                        |         | Specific DLQ row ID; repeatable.                          |
    | `--since` / `--until <time>`           |         | Time bounds (RFC3339 or duration).                        |
    | `--rate <n>`                           | `50`    | Deliveries per second (`5`–`500`).                        |
    | `--dry-run`                            | `false` | Return `would_replay` without creating a job.             |
    | `--yes`                                | `false` | Confirm a non-dry-run bulk replay.                        |
    | `--idempotency-key <key>`              |         | Retry-safe job creation.                                  |
  </Accordion>

  <Accordion title="repost replay status · list · wait · pause · resume · cancel" icon="git-branch">
    Inspect and steer replay jobs by ID. `status`/`wait` → `repost.replay.status/v1`; `list` → `repost.replay.list/v1`; `replay pause` / `replay resume` / `replay cancel` → `repost.replay.action/v1`.

    | Command              | Flag                                                     | Default | Meaning                                                             |
    | -------------------- | -------------------------------------------------------- | ------- | ------------------------------------------------------------------- |
    | `replay list`        | `--limit <n>`                                            | `20`    | Maximum jobs to return.                                             |
    | `replay list`        | `-b, --bucket <slug\|id>` / `-f, --forwarder <id\|name>` |         | Filter listed jobs.                                                 |
    | `replay wait JOB_ID` | `--max-wait <dur>`                                       | `5m`    | Wait deadline. Exit `7` on timeout, `8` if finalized with failures. |
  </Accordion>
</AccordionGroup>

## Environment variables

| Variable                   | Description                                                                                 |
| -------------------------- | ------------------------------------------------------------------------------------------- |
| `REPOST_TOKEN`             | API token for non-interactive authentication. Takes priority over any stored credentials.   |
| `REPOST_CONFIG_DIR`        | Override the config directory path used for local preferences and encrypted token fallback. |
| `REPOST_NO_UPDATE_CHECK=1` | Disable background update checks. Equivalent to the `--skip-update-check` flag.             |
| `REPOST_BASE_URL`          | Derive the API, web, and WebSocket URLs from a single base domain.                          |
| `REPOST_API_URL`           | Override the CLI API URL individually.                                                      |
| `REPOST_WEB_URL`           | Override the app URL used by browser login.                                                 |
| `REPOST_WS_URL`            | Override the WebSocket URL used by `repost forward`.                                        |

When `REPOST_BASE_URL=example.com` is set, the CLI automatically derives the following service URLs:

| Variable         | Derived value             |
| ---------------- | ------------------------- |
| `REPOST_API_URL` | `https://cli.example.com` |
| `REPOST_WEB_URL` | `https://app.example.com` |
| `REPOST_WS_URL`  | `wss://ws.example.com/ws` |

Set `REPOST_API_URL`, `REPOST_WEB_URL`, or `REPOST_WS_URL` individually only when a single endpoint needs a different value than what `REPOST_BASE_URL` would derive.

## Related pages

<CardGroup cols={2}>
  <Card title="Authentication" icon="key-round" href="/docs/cli/authentication">
    Install the CLI binary and configure authentication on any platform.
  </Card>

  <Card title="Local Forwarding" icon="send" href="/docs/cli/local-forwarding">
    Connect internal forwarders to your local machine and use the TUI.
  </Card>

  <Card title="Schema" icon="braces" href="/docs/cli/schema">
    Define, validate, version, and generate webhook events with `repost schema`.
  </Card>
</CardGroup>
