<!-- Generated from the canonical OpenPost public page. Do not edit this build artifact. -->

Title: CLI command reference
Description: Every openpost command and flag, generated from the CLI source.
Canonical: https://openpo.st/docs/automate/cli/reference
Source: [https://openpo.st/docs/automate/cli/reference](https://openpo.st/docs/automate/cli/reference)

# CLI command reference

{/* Generated by apps/cli/cmd/openpost-docs from the Cobra command tree. Do not edit by hand; run bun scripts/sync-docs-openapi.mjs. */}

Run `openpost <command> --help` for the same text in your terminal. For worked examples, see [Publish from the terminal](https://openpo.st/docs/automate/cli/publishing), [Scripts and CI](https://openpo.st/docs/automate/cli/scripts-and-ci) and [Inspect and recover](https://openpo.st/docs/automate/cli/inspect-and-recover).

## Global flags

Every command accepts these flags. Values you leave out come from the active profile or the environment.

| Flag                   | Description                                                        |
| ---------------------- | ------------------------------------------------------------------ |
| `--instance <string>`  | OpenPost instance URL (default: profile or $OPENPOST_INSTANCE)     |
| `--json`               | Emit machine-readable JSON instead of tables/prose.                |
| `--no-color`           | Disable ANSI colors.                                               |
| `--profile <string>`   | Profile name from config (default: $OPENPOST_PROFILE or 'default') |
| `--quiet`              | Suppress non-error output.                                         |
| `--token <string>`     | API token override (default: keyring or $OPENPOST_TOKEN)           |
| `--workspace <string>` | Workspace name or ID (default: profile or $OPENPOST_WORKSPACE)     |
| `--yes`                | Skip interactive confirmations.                                    |

## Commands

| Command                                         | What it does                                                     |
| ----------------------------------------------- | ---------------------------------------------------------------- |
| [`openpost account`](#openpost-account)         | Manage connected social accounts                                 |
| [`openpost auth`](#openpost-auth)               | Authenticate with an OpenPost instance                           |
| [`openpost billing`](#openpost-billing)         | Manage Hosted service billing                                    |
| [`openpost completion`](#openpost-completion)   | Generate shell completion script                                 |
| [`openpost doctor`](#openpost-doctor)           | Check local CLI configuration without contacting an instance     |
| [`openpost inbox`](#openpost-inbox)             | Read and act on comments, incoming mentions and business reviews |
| [`openpost instance`](#openpost-instance)       | Manage OpenPost instance profiles                                |
| [`openpost jobs`](#openpost-jobs)               | List background jobs                                             |
| [`openpost media`](#openpost-media)             | Upload and list media attachments                                |
| [`openpost post`](#openpost-post)               | Create, list, view, update, and delete posts                     |
| [`openpost provider`](#openpost-provider)       | Inspect provider availability and publishing support             |
| [`openpost publication`](#openpost-publication) | Create, list, validate, and publish publications                 |
| [`openpost schedule`](#openpost-schedule)       | Manage reusable posting schedule slots                           |
| [`openpost thread`](#openpost-thread)           | Create multi-post threads                                        |
| [`openpost version`](#openpost-version)         | Print the openpost CLI version                                   |
| [`openpost workspace`](#openpost-workspace)     | Manage the active OpenPost workspace                             |

## openpost account

Manage connected social accounts.

List, rename, and disconnect social accounts. Account slugs are the preferred selector for --accounts. New accounts are connected in the OpenPost web UI at &lt;instance&gt;/settings?tab=accounts.

### openpost account disconnect

Disconnect a social account.

```sh
openpost account disconnect <account-id>
```

### openpost account list

List connected social accounts.

List connected social accounts for the active workspace.

Use the SLUG column as the preferred selector for --accounts and account rename.

```sh
openpost account list [flags]
```

| Flag                  | Description         |
| --------------------- | ------------------- |
| `--platform <string>` | Filter by platform. |

### openpost account mentions

Find native mention identities for an account.

```sh
openpost account mentions <account> [flags]
```

| Flag               | Description                                            |
| ------------------ | ------------------------------------------------------ |
| `--query <string>` | Account search, or exact LinkedIn company vanity name. |

### openpost account rename

Rename a social account slug.

Rename a connected account's slug. The selector can be an account id, slug, platform:username value, bare platform when unambiguous, or mastodon host.

```sh
openpost account rename <selector> --slug <new-slug> [flags]
```

| Flag              | Description       |
| ----------------- | ----------------- |
| `--slug <string>` | New account slug. |

## openpost auth

Authenticate with an OpenPost instance.

### openpost auth login

Log in to an OpenPost instance.

```sh
openpost auth login <instance> [flags]
```

| Flag                 | Description                                                    |
| -------------------- | -------------------------------------------------------------- |
| `--device`           | Print the device code and poll without opening a browser.      |
| `--insecure-storage` | Store the token in credentials.json instead of the OS keyring. |
| `--no-browser`       | Skip automatically opening the browser.                        |
| `--with-token`       | Read a raw API token from stdin.                               |

### openpost auth logout

Delete the stored token for the active profile.

```sh
openpost auth logout
```

### openpost auth status

Show authentication status for the active profile.

```sh
openpost auth status
```

### openpost auth token list

List API tokens.

```sh
openpost auth token list
```

### openpost auth token revoke

Revoke an API token.

```sh
openpost auth token revoke <id>
```

## openpost billing

Manage Hosted service billing.

Inspect billing status and create hosted checkout or customer portal URLs for the active workspace.

### openpost billing checkout

Create an OpenPost checkout URL for the active workspace.

Create an OpenPost checkout URL that opens Paddle's embedded payment form. Plan IDs are founder (Solo), team, or agency.

```sh
openpost billing checkout <plan> [flags]
```

| Flag                        | Default   | Description                        |
| --------------------------- | --------- | ---------------------------------- |
| `--billing-period <string>` | `monthly` | Billing period: monthly or annual. |

### openpost billing portal

Open Paddle billing management for the active workspace.

```sh
openpost billing portal
```

### openpost billing status

Show billing plan and usage for the active workspace.

```sh
openpost billing status
```

## openpost completion

Generate shell completion script.

```text
Output a shell completion script for the given shell.

To load completions:

Bash:
  $ source <(openpost completion bash)

  # To load completions for each session, execute once:
  # Linux:
  $ openpost completion bash > /etc/bash_completion.d/openpost
  # macOS:
  $ openpost completion bash > $(brew --prefix)/etc/bash_completion.d/openpost

Zsh:
  # If shell completion is not already enabled in your environment,
  # you will need to enable it. You can execute the following once:
  $ echo "autoload -U compinit; compinit" >> ~/.zshrc

  # To load completions for each session, execute once:
  $ openpost completion zsh > "${fpath[1]}/_openpost"

  # You will need to start a new shell for this setup to take effect.

Fish:
  $ openpost completion fish | source

  # To load completions for each session, execute once:
  $ openpost completion fish > ~/.config/fish/completions/openpost.fish

PowerShell:
  PS> openpost completion powershell | Out-String | Invoke-Expression

  # To load completions for every new session, run:
  PS> openpost completion powershell > openpost.ps1
  # and source this file from your PowerShell profile.
```

```sh
openpost completion <bash|zsh|fish|powershell>
```

## openpost doctor

Check local CLI configuration without contacting an instance.

```sh
openpost doctor
```

## openpost inbox

Read and act on comments, incoming mentions and business reviews.

### openpost inbox act

Queue a supported reply or moderation action.

Queue an action supported by the item's can\_\* capabilities. For a Google review, reply replaces the owner reply and delete_reply removes only that reply. Reviews cannot be deleted. Inspect the returned job and the item's moderation state before replacing a review reply again. Reuse --operation-id only for the same intent.

```sh
openpost inbox act <item-id> [flags]
```

| Flag                      | Default | Description                                                 |
| ------------------------- | ------- | ----------------------------------------------------------- |
| `--action <string>`       | `reply` | Reply, delete_reply, hide, delete, like or unlike.          |
| `--message <string>`      |         | Reply text; Google owner replies allow 4096 UTF-8 bytes.    |
| `--operation-id <string>` |         | Stable ID for this exact intent, required for safe retries. |

### openpost inbox get

Read an Inbox item, native context and review reply receipt.

```sh
openpost inbox get <item-id>
```

### openpost inbox list

Read stored Inbox items and feed health, without provider calls.

```sh
openpost inbox list [flags]
```

| Flag                        | Default | Description                                                      |
| --------------------------- | ------- | ---------------------------------------------------------------- |
| `--account-id <string>`     |         | Connected account ID.                                            |
| `--archived`                |         | Read archived items instead of active items.                     |
| `--cursor <string>`         |         | Next_cursor from the previous response.                          |
| `--kind <string>`           |         | Comment, mention or review; omit for all.                        |
| `--limit <int>`             | `50`    | Page size, from 1 to 100.                                        |
| `--platform <string>`       |         | Filter by provider.                                              |
| `--publication-id <string>` |         | Filter by an OpenPost post, excluding unrelated native activity. |
| `--unread`                  |         | Only unread items.                                               |

### openpost inbox mark-read

Mark every matching unread item read across all pages.

```sh
openpost inbox mark-read [flags]
```

| Flag                        | Description                                                      |
| --------------------------- | ---------------------------------------------------------------- |
| `--account-id <string>`     | Connected account ID.                                            |
| `--archived`                | Read archived items instead of active items.                     |
| `--kind <string>`           | Comment, mention or review; omit for all.                        |
| `--platform <string>`       | Filter by provider.                                              |
| `--publication-id <string>` | Filter by an OpenPost post, excluding unrelated native activity. |

### openpost inbox refresh

Queue durable collection for enabled accounts.

```sh
openpost inbox refresh
```

### openpost inbox state

Update shared Workspace read and archive state.

```sh
openpost inbox state <item-id>... [flags]
```

| Flag         | Description                                |
| ------------ | ------------------------------------------ |
| `--archived` | Archive, or --archived=false to reopen.    |
| `--read`     | Mark read, or --read=false to mark unread. |

## openpost instance

Manage OpenPost instance profiles.

### openpost instance add

Add or update an instance profile.

```sh
openpost instance add <name> <url>
```

### openpost instance diagnostics

Collect a safe support snapshot for an OpenPost instance.

```sh
openpost instance diagnostics [flags]
```

| Flag                    | Description                                                            |
| ----------------------- | ---------------------------------------------------------------------- |
| `--deployment <string>` | Deployment method being checked (docker, binary, nixos, cloud, other)  |
| `--logs-file <string>`  | Local OpenPost log file to include as a redacted last-100-line tail.   |
| `--provider <string>`   | Social provider being tested, such as x, mastodon, youtube, or tiktok. |

### openpost instance health

Check the active instance liveness and readiness.

```sh
openpost instance health
```

### openpost instance list

List configured instances.

```sh
openpost instance list
```

### openpost instance remove

Remove an instance profile.

```sh
openpost instance remove <name>
```

### openpost instance use

Set the active instance profile.

```sh
openpost instance use <name>
```

## openpost jobs

List background jobs.

### openpost jobs list

List background jobs.

```sh
openpost jobs list [flags]
```

| Flag                | Default | Description                                   |
| ------------------- | ------- | --------------------------------------------- |
| `--limit <int>`     | `0`     | Maximum number of jobs to return.             |
| `--offset <int>`    | `0`     | Number of jobs to skip.                       |
| `--status <string>` |         | Filter by status: pending, failed, completed. |

## openpost media

Upload and list media attachments.

### openpost media delete

Delete an unused media attachment.

```sh
openpost media delete <media-id>
```

### openpost media list

List media attachments.

```sh
openpost media list [flags]
```

| Flag            | Default | Description                              |
| --------------- | ------- | ---------------------------------------- |
| `--limit <int>` | `0`     | Maximum number of media items to return. |

### openpost media prepare-image

Fit a separate image copy for one destination.

```sh
openpost media prepare-image <media-id> [flags]
```

| Flag                        | Description                                                 |
| --------------------------- | ----------------------------------------------------------- |
| `--account <string>`        | Connected account ID or slug.                               |
| `--alt <string>`            | Alt text for the fitted copy; pass an empty value to clear. |
| `--output-profile <string>` | Explicit destination format from capabilities.              |
| `--settings-file <string>`  | Destination settings JSON file, or - for stdin.             |

### openpost media storage

Show media storage usage.

```sh
openpost media storage
```

### openpost media update

Update media alt text.

```sh
openpost media update <media-id> [flags]
```

| Flag             | Description                                |
| ---------------- | ------------------------------------------ |
| `--alt <string>` | Alt text; pass an empty value to clear it. |

### openpost media upload

Upload a media file.

```sh
openpost media upload <file> [flags]
```

| Flag             | Description                      |
| ---------------- | -------------------------------- |
| `--alt <string>` | Alt text for the uploaded media. |

### openpost media usage

List content that uses a media attachment.

```sh
openpost media usage <media-id>
```

## openpost post

Create, list, view, update, and delete posts.

Create, list, view, update, and delete posts. The post command is the friendly name for Publication workflows; every command creates, reads, and mutates Publications and Renditions through the canonical API.

### openpost post create

Create a draft or scheduled post.

```sh
openpost post create [flags]
```

| Flag                        | Default | Description                                                                         |
| --------------------------- | ------- | ----------------------------------------------------------------------------------- |
| `--accounts <string>`       |         | Comma-separated account selectors.                                                  |
| `--content <string>`        |         | Post content.                                                                       |
| `--file <string>`           |         | Read post content from a file.                                                      |
| `--media <stringArray>`     |         | Media id or local file path; repeatable.                                            |
| `--media-alt <stringArray>` |         | Alt text for the matching uploaded --media.                                         |
| `--random-delay <int>`      | `0`     | Random delay in minutes.                                                            |
| `--schedule <string>`       |         | Natural-language, RFC3339, next-slot, now, or draft.                                |
| `--segments-file <string>`  |         | Ordered segment JSON with settings.mentions and UTF-8 byte ranges; use - for stdin. |
| `--thread-draft <string>`   |         | Encoded thread draft to attach.                                                     |

### openpost post delete

Delete a draft or scheduled post.

```sh
openpost post delete <post-id>
```

### openpost post list

List posts.

```sh
openpost post list [flags]
```

| Flag                | Default | Description                                            |
| ------------------- | ------- | ------------------------------------------------------ |
| `--limit <int>`     | `0`     | Maximum number of posts to return.                     |
| `--offset <int>`    | `0`     | Number of posts to skip.                               |
| `--status <string>` |         | Filter by status: draft, scheduled, published, failed. |

### openpost post schedule

Schedule an existing publication.

```sh
openpost post schedule <publication-id> [flags]
```

| Flag            | Description                                    |
| --------------- | ---------------------------------------------- |
| `--at <string>` | Schedule time, natural language, or next-slot. |

### openpost post update

Update a draft or scheduled post.

```sh
openpost post update <post-id> [flags]
```

| Flag                        | Default | Description                                                                         |
| --------------------------- | ------- | ----------------------------------------------------------------------------------- |
| `--accounts <string>`       |         | Comma-separated account selectors.                                                  |
| `--content <string>`        |         | Post content.                                                                       |
| `--media <stringArray>`     |         | Replacement media id or local file path; repeatable; pass an empty value to clear.  |
| `--media-alt <stringArray>` |         | Alt text for the matching uploaded --media.                                         |
| `--random-delay <int>`      | `0`     | Random delay in minutes.                                                            |
| `--schedule <string>`       |         | Natural-language, RFC3339, next-slot, now, or draft; empty string unschedules.      |
| `--segments-file <string>`  |         | Ordered segment JSON with settings.mentions and UTF-8 byte ranges; use - for stdin. |

### openpost post view

View a post.

```sh
openpost post view <post-id>
```

## openpost provider

Inspect provider availability and publishing support.

### openpost provider capabilities

List provider publishing capabilities.

```sh
openpost provider capabilities [flags]
```

| Flag                         | Description                                |
| ---------------------------- | ------------------------------------------ |
| `--content-profile <string>` | Filter by input or output content profile. |
| `--provider <string>`        | Filter by provider key.                    |

### openpost provider list

List social providers available on the instance.

```sh
openpost provider list
```

### openpost provider readiness

Inspect provider setup and blocking issues.

```sh
openpost provider readiness
```

## openpost publication

Create, list, validate, and publish publications.

### openpost publication cancel

Cancel a scheduled publication.

```sh
openpost publication cancel <publication-id>
```

### openpost publication comments

List comments for a published rendition.

```sh
openpost publication comments <rendition-id>
```

### openpost publication create

Create a format-first publication.

```sh
openpost publication create [flags]
```

| Flag                           | Default       | Description                                                                                            |
| ------------------------------ | ------------- | ------------------------------------------------------------------------------------------------------ |
| `--accounts <string>`          |               | Comma-separated account IDs/slugs/platforms.                                                           |
| `--caption <string>`           |               | Caption for image, carousel, story, or social video outputs.                                           |
| `--content <string>`           |               | Post text or fallback source text.                                                                     |
| `--content-profile <string>`   | `short_text`  | Content profile: short_text, thread, link_share, image_post, carousel, story, short_video, long_video. |
| `--description <string>`       |               | Description field for link/video outputs.                                                              |
| `--file <string>`              |               | Read post/source text from file or '-' for stdin.                                                      |
| `--media <stringArray>`        |               | Media ID or local file path to attach; repeatable.                                                     |
| `--media-alt <stringArray>`    |               | Alt text for uploaded media.                                                                           |
| `--privacy <string>`           |               | YouTube privacy status: private, unlisted, or public.                                                  |
| `--schedule <string>`          |               | Schedule time.                                                                                         |
| `--segments-file <string>`     |               | Ordered segment JSON with settings.mentions and UTF-8 byte ranges; use - for stdin.                    |
| `--tiktok-method <string>`     | `DIRECT_POST` | TikTok content posting method.                                                                         |
| `--tiktok-privacy <string>`    | `SELF_ONLY`   | TikTok privacy level.                                                                                  |
| `--title <string>`             |               | Publication title.                                                                                     |
| `--url <string>`               |               | Source URL for link shares.                                                                            |
| `--video-description <string>` |               | YouTube video description.                                                                             |
| `--video-title <string>`       |               | YouTube video title.                                                                                   |

### openpost publication delete

Permanently delete an editable publication.

```sh
openpost publication delete <publication-id> [flags]
```

| Flag        | Description                             |
| ----------- | --------------------------------------- |
| `--confirm` | Confirm permanent publication deletion. |

### openpost publication delete-comment

Delete a provider comment.

```sh
openpost publication delete-comment <comment-id> [flags]
```

| Flag        | Description                          |
| ----------- | ------------------------------------ |
| `--confirm` | Confirm permanent provider deletion. |

### openpost publication delete-rendition

Permanently delete one saved publication destination.

```sh
openpost publication delete-rendition <publication-id> <account-id> [flags]
```

| Flag        | Description                             |
| ----------- | --------------------------------------- |
| `--confirm` | Confirm permanent destination deletion. |

### openpost publication events

List publication lifecycle events.

```sh
openpost publication events <publication-id> [flags]
```

| Flag            | Default | Description                         |
| --------------- | ------- | ----------------------------------- |
| `--limit <int>` | `0`     | Maximum number of events to return. |

### openpost publication hide-comment

Hide a provider comment.

```sh
openpost publication hide-comment <comment-id>
```

### openpost publication list

List publications.

```sh
openpost publication list [flags]
```

| Flag                         | Default | Description                               |
| ---------------------------- | ------- | ----------------------------------------- |
| `--content-profile <string>` |         | Filter by content profile.                |
| `--limit <int>`              | `0`     | Maximum number of publications to return. |
| `--offset <int>`             | `0`     | Number of publications to skip.           |
| `--status <string>`          |         | Filter by status.                         |

### openpost publication publish-now

Queue a publication for immediate publishing.

```sh
openpost publication publish-now <publication-id>
```

### openpost publication renditions

Replace destination-specific renditions from JSON.

```sh
openpost publication renditions <publication-id> [flags]
```

| Flag              | Description                                 |
| ----------------- | ------------------------------------------- |
| `--file <string>` | JSON array of renditions, or '-' for stdin. |

### openpost publication reply

Queue an explicit reply to a published rendition.

```sh
openpost publication reply <rendition-id> [flags]
```

| Flag                   | Description                                 |
| ---------------------- | ------------------------------------------- |
| `--at <string>`        | Optional reply schedule time.               |
| `--body <string>`      | Reply text.                                 |
| `--file <string>`      | Read reply text from file or '-' for stdin. |
| `--parent-id <string>` | External provider post or comment ID.       |

### openpost publication reply-comment

Reply to a provider comment.

```sh
openpost publication reply-comment <comment-id> [flags]
```

| Flag              | Description                                 |
| ----------------- | ------------------------------------------- |
| `--body <string>` | Reply text.                                 |
| `--file <string>` | Read reply text from file or '-' for stdin. |

### openpost publication retry

Retry one failed publication destination.

```sh
openpost publication retry <publication-id> <account-id>
```

### openpost publication schedule

Schedule an existing publication.

```sh
openpost publication schedule <publication-id> [flags]
```

| Flag            | Description                                    |
| --------------- | ---------------------------------------------- |
| `--at <string>` | Schedule time, natural language, or next-slot. |

### openpost publication update

Update an editable publication.

```sh
openpost publication update <publication-id> [flags]
```

| Flag                         | Description                                                                         |
| ---------------------------- | ----------------------------------------------------------------------------------- |
| `--content <string>`         | Shared post or caption text.                                                        |
| `--content-profile <string>` | Content profile.                                                                    |
| `--file <string>`            | Read shared text from file or '-' for stdin.                                        |
| `--force`                    | Overwrite after reviewing a revision conflict.                                      |
| `--schedule <string>`        | New schedule time; use draft to clear.                                              |
| `--segments-file <string>`   | Ordered segment JSON with settings.mentions and UTF-8 byte ranges; use - for stdin. |
| `--title <string>`           | Publication title.                                                                  |
| `--url <string>`             | Source URL; pass an empty value to clear.                                           |

### openpost publication validate

Validate a publication.

```sh
openpost publication validate <publication-id>
```

### openpost publication view

View a publication.

```sh
openpost publication view <publication-id>
```

## openpost schedule

Manage reusable posting schedule slots.

Manage the workspace-local weekly slots used by next-slot scheduling.

### openpost schedule create

Create a weekly posting schedule slot.

```sh
openpost schedule create [flags]
```

| Flag               | Default | Description                                        |
| ------------------ | ------- | -------------------------------------------------- |
| `--day <int>`      | `0`     | Workspace-local day of week (0=Sunday, 6=Saturday) |
| `--hour <int>`     | `0`     | Workspace-local hour (0-23)                        |
| `--label <string>` |         | Display label.                                     |
| `--minute <int>`   | `0`     | Workspace-local minute (0-59)                      |

### openpost schedule delete

Delete a posting schedule slot.

```sh
openpost schedule delete <schedule-id>
```

### openpost schedule list

List posting schedule slots.

```sh
openpost schedule list
```

### openpost schedule next

Find the next available posting slot.

```sh
openpost schedule next
```

### openpost schedule suggest

Create a suggested seven-day posting schedule.

Create active workspace-local schedule slots for every day of the week.

```sh
openpost schedule suggest [flags]
```

| Flag                    | Default | Description                              |
| ----------------------- | ------- | ---------------------------------------- |
| `--posts-per-day <int>` | `3`     | Number of slots to create per day (1-10) |

### openpost schedule update

Update a posting schedule slot.

```sh
openpost schedule update <schedule-id> [flags]
```

| Flag               | Default | Description                                        |
| ------------------ | ------- | -------------------------------------------------- |
| `--active`         |         | Enable the slot.                                   |
| `--day <int>`      | `0`     | Workspace-local day of week (0=Sunday, 6=Saturday) |
| `--hour <int>`     | `0`     | Workspace-local hour (0-23)                        |
| `--inactive`       |         | Disable the slot.                                  |
| `--label <string>` |         | Display label; pass an empty value to clear it.    |
| `--minute <int>`   | `0`     | Workspace-local minute (0-59)                      |

## openpost thread

Create multi-post threads.

### openpost thread create

Create a thread from a markdown file.

```sh
openpost thread create <file> [flags]
```

| Flag                   | Default | Description                                          |
| ---------------------- | ------- | ---------------------------------------------------- |
| `--accounts <string>`  |         | Comma-separated account selectors.                   |
| `--random-delay <int>` | `0`     | Random delay in minutes.                             |
| `--schedule <string>`  |         | Natural-language, RFC3339, next-slot, now, or draft. |

## openpost version

Print the openpost CLI version.

```sh
openpost version
```

## openpost workspace

Manage the active OpenPost workspace.

### openpost workspace create

Create a workspace.

```sh
openpost workspace create <name>
```

### openpost workspace list

List workspaces.

```sh
openpost workspace list
```

### openpost workspace use

Set the active workspace for the current profile.

```sh
openpost workspace use <name-or-id>
```
