---
name: openpost-cli
description: Operate a running OpenPost instance through the openpost CLI. Use for authentication and profile setup; workspace, account, provider, media, schedule, job, and billing inspection; creating or editing text posts, threads, and format-first publications; scheduling or publishing content; checking lifecycle events; recovering failed destinations; and comment replies or moderation. Prefer this skill when terminal or scripted OpenPost work is requested. It is not needed when an OpenPost MCP connector is already being used.
title: openpost-cli
canonical_url: https://skilld.dev/gh/getopenpost/openpost/openpost-cli
last_updated: 2026-11-22T15:16:13.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/getopenpost/openpost/openpost-cli/agents/openai.yaml), [references/workflows.md](https://skilld.dev/api/skills-raw/getopenpost/openpost/openpost-cli/references/workflows.md).
>
> If the user asked to install this Skill, run `npx skilld install getopenpost/openpost/openpost-cli`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/openpost-cli`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/getopenpost/openpost/openpost-cli) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/openpost-cli`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/openpost-cli --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/openpost-cli --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# OpenPost CLI

Use the `openpost` executable as an external client of a running OpenPost instance. Keep the instance, workspace, destination accounts, content, and publish time explicit.

## Start safely

1. Confirm the CLI exists:

   ```sh
   command -v openpost
   openpost version
   ```

   If it is missing, stop and point to `https://openpo.st/docs/automate/cli`. Do not install software unless the user asked.

2. Inspect context before a workspace-scoped action:

   ```sh
   openpost instance diagnostics --json
   openpost auth status --json
   openpost workspace list --json
   ```

3. Pass `--profile`, `--instance`, or `--workspace` when the saved context is absent or ambiguous. Prefer the stored keyring token or `OPENPOST_TOKEN`; do not put a token in command output, logs, files, or chat.

4. Use `--json` for reads and automation. Parse IDs and status from JSON instead of scraping tables.

5. When syntax may have changed, run `openpost help` or `openpost <group> <command> --help`. Treat live help as the command source of truth.

## Choose the authoring path

- Use `openpost post` for the text-and-thread composer: short text, text with media, and editable drafts.
- Use `openpost thread create` when the source is a Markdown file containing two or more `---`-separated posts.
- Use `openpost publication` for format-first content: link shares, image posts, carousels, stories, short video, long video, and provider-specific output fields.
- Inspect `openpost provider readiness --json` before a new provider workflow. Inspect `openpost provider capabilities --provider <key> --json` before choosing a publication profile or provider setting.

Read [references/workflows.md](https://skilld.dev/api/skills-raw/getopenpost/openpost/openpost-cli/references/workflows.md) for exact command patterns and format selection.

## Apply mutations deliberately

- Default to creating a draft when the user did not ask to schedule or publish.
- Treat scheduling, publishing, retrying a rendition, replying, hiding or deleting a comment, disconnecting an account, generating schedule slots, and deletion as state-changing actions. Perform them only when the request authorizes that effect.
- Before a publish or schedule action, resolve the exact instance, workspace, destination accounts, content, media, and RFC3339 time or named next slot.
- Use account slugs as human-friendly `--accounts` selectors. Use exact account IDs for rendition retry, rendition deletion, and account disconnect; `account rename` accepts a flexible selector (ID, slug, `platform:username`, bare platform, or Fediverse host) plus `--slug`.
- Add alt text during upload or with `openpost media update`.
- Run `openpost publication validate <id> --json` before publishing a format-first publication.
- Pass `--yes` only when the user already authorized the command's confirmation. Interactive confirmations guard `post delete`, `media delete`, `schedule delete`, `schedule suggest`, and `account disconnect`. Pass `--confirm` only for the exact item the user asked to delete: `publication delete`, `publication delete-rendition`, and `publication delete-comment` each require it.
- Never add `--force` automatically after a revision conflict. Only `publication update` has `--force`; `post update` has no such flag because it re-reads the current revision before writing. Reload with `post view` or `publication view`, show the conflict, and retry only after reconciling the saved version with the requested edits.

## Verify the outcome

After a mutation, inspect the returned ID and current server state:

```sh
openpost post view <post-id> --json
openpost publication view <publication-id> --json
openpost publication events <publication-id> --json
openpost jobs list --json
```

Do not describe `scheduled` as `published`. For queued work, report the object ID, job ID when present, schedule time, and current status. For partial or failed publication, inspect rendition failure fields and lifecycle events before retrying.

## Handle common failures

- `401` or auth required: run `openpost auth status --json`; do not expose or regenerate credentials without user direction.
- Workspace not found or ambiguous: run `openpost workspace list --json`, then pass an exact ID with `--workspace`.
- Account selector ambiguous: run `openpost account list --json`, then use a unique slug or ID.
- Provider validation failure: inspect readiness, capabilities, media metadata, and publication validation output; fix the stated blocker.
- Revision conflict: reload with `post view` or `publication view`; do not replay stale data.
- Media deletion blocked: run `openpost media usage <media-id> --json` and report the references.
- No next slot: inspect `openpost schedule list --json`; do not invent a time.
