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

# CLI command reference

> Commands and flags generated from the Postinger CLI.

This reference is generated from CLI 0.2.0. Install it with `npm install -g @postinger/cli@0.2.0`.

Use `--help` on any command. See [CLI quickstart](/cli/quickstart) for a complete workflow and [automation](/cli/automation) for JSON output, exit codes, and retries.

## postinger

```text theme={null}
Usage: postinger [options] [command]

Manage Postinger through its project-scoped public API.

Options:
  -V, --version    output the version number
  --api-url <url>  Backend origin or /public/v1 URL; defaults to saved URL or
                   https://api.dev.postinger.dev
  --json           Machine-readable result and structured errors
  -h, --help       display help for command

Commands:
  auth             Sign in through the browser or configure an API key.
  doctor           Check Node.js, CLI version, API authentication and effective
                   permissions
  accounts         Connected accounts (accounts-read)
  upload <file>    Upload JPEG, PNG, MP4 or MOV; returns a ready media ID
                   (media-write)
  posts            Drafts, scheduling and publishing
  media            Signed upload workflow (media-read/media-write)
  analytics        Stored analytics only (analytics-read); never requests live
                   collection
  help [command]   display help for command
```

## postinger auth

```text theme={null}
Usage: postinger auth [options] [command]

Sign in through the browser or configure an API key.

Options:
  -h, --help        display help for command

Commands:
  login [options]
  status
  logout [options]
  help [command]    display help for command
```

## postinger auth login

```text theme={null}
Usage: postinger auth login [options]

Options:
  --key-stdin    Read API key from piped stdin and store with owner-only file
                 permissions
  --no-browser   Print the authorization link without opening a browser
  --name <name>  Device name shown in Connected apps (default: "Postinger CLI ·
                 <hostname>")
  -h, --help     display help for command
```

## postinger auth status

```text theme={null}
Usage: postinger auth status [options]

Options:
  -h, --help  display help for command
```

## postinger auth logout

```text theme={null}
Usage: postinger auth logout [options]

Options:
  --local     Remove local credentials only; keep server access
  -h, --help  display help for command
```

## postinger doctor

```text theme={null}
Usage: postinger doctor [options]

Check Node.js, CLI version, API authentication and effective permissions

Options:
  -h, --help  display help for command
```

## postinger accounts

```text theme={null}
Usage: postinger accounts [options] [command]

Connected accounts (accounts-read)

Options:
  -h, --help                display help for command

Commands:
  list
  capabilities <accountId>  Read current publishing rules and account
                            availability (accounts-read)
  help [command]            display help for command
```

## postinger accounts list

```text theme={null}
Usage: postinger accounts list [options]

Options:
  -h, --help  display help for command
```

## postinger accounts capabilities

```text theme={null}
Usage: postinger accounts capabilities [options] <accountId>

Read current publishing rules and account availability (accounts-read)

Options:
  -h, --help  display help for command
```

## postinger upload

```text theme={null}
Usage: postinger upload [options] <file>

Upload JPEG, PNG, MP4 or MOV; returns a ready media ID (media-write)

Options:
  -h, --help  display help for command
```

## postinger posts

```text theme={null}
Usage: postinger posts [options] [command]

Drafts, scheduling and publishing

Options:
  -h, --help              display help for command

Commands:
  list [options]
  get <id>
  create [options]        Create a draft (posts-write); --scheduled-at also
                          needs posts-publish
  update [options] <id>
  publish [options] <id>  Request immediate publication (posts-publish);
                          accepted is not yet published
  delete [options] <id>   Delete a post (posts-delete)
  help [command]          display help for command
```

## postinger posts list

```text theme={null}
Usage: postinger posts list [options]

Options:
  --limit <n>        Page size, 1–100
  --after <uuid>     nextCursor from the previous page
  --status <status>
  --platform <name>
  --q <text>
  -h, --help         display help for command
```

## postinger posts get

```text theme={null}
Usage: postinger posts get [options] <id>

Options:
  -h, --help  display help for command
```

## postinger posts create

```text theme={null}
Usage: postinger posts create [options]

Create a draft (posts-write); --scheduled-at also needs posts-publish

Options:
  --content <text>         Post text
  --account <uuid>         Target account; repeat for multiple accounts
                           (default: [])
  --media <uuid>           Existing media ID; repeat to preserve ordering
                           (default: [])
  --scheduled-at <iso>     Schedule with explicit timezone/offset
  --file <path>            Full JSON body; - reads stdin; cannot combine with
                           content/target/media/schedule flags
  --idempotency-key <key>  Reuse the same key and payload for retries (24 hours)
  -h, --help               display help for command
```

## postinger posts update

```text theme={null}
Usage: postinger posts update [options] <id>

Options:
  --file <path>  JSON patch; - reads stdin. Omitted fields remain unchanged.
  -h, --help     display help for command
```

## postinger posts publish

```text theme={null}
Usage: postinger posts publish [options] <id>

Request immediate publication (posts-publish); accepted is not yet published

Options:
  --account-id <uuid>      Publish only this target
  --idempotency-key <key>
  --yes                    Confirm publication to connected social accounts
  -h, --help               display help for command
```

## postinger posts delete

```text theme={null}
Usage: postinger posts delete [options] <id>

Delete a post (posts-delete)

Options:
  --yes       Confirm deletion
  -h, --help  display help for command
```

## postinger media

```text theme={null}
Usage: postinger media [options] [command]

Signed upload workflow (media-read/media-write)

Options:
  -h, --help                display help for command

Commands:
  upload <file>             Upload a local image or video (media-write)
  create-upload [options]
  get <id>
  complete <id>             Validate the file after uploading bytes to the
                            signed URL
  multipart [options] <id>
  help [command]            display help for command
```

## postinger media upload

```text theme={null}
Usage: postinger media upload [options] <file>

Upload a local image or video (media-write)

Options:
  -h, --help  display help for command
```

## postinger media create-upload

```text theme={null}
Usage: postinger media create-upload [options]

Options:
  --filename <name>
  --content-type <type>
  --size-bytes <n>       File size
  -h, --help             display help for command
```

## postinger media get

```text theme={null}
Usage: postinger media get [options] <id>

Options:
  -h, --help  display help for command
```

## postinger media complete

```text theme={null}
Usage: postinger media complete [options] <id>

Validate the file after uploading bytes to the signed URL

Options:
  -h, --help  display help for command
```

## postinger media multipart

```text theme={null}
Usage: postinger media multipart [options] <id>

Options:
  --operation <operation>  (choices: "list", "sign", "complete", "abort")
  --part-number <n>        Part number for sign
  -h, --help               display help for command
```

## postinger analytics

```text theme={null}
Usage: postinger analytics [options] [command]

Stored analytics only (analytics-read); never requests live collection

Options:
  -h, --help                    display help for command

Commands:
  capabilities
  report [options]
  account [options] <id>
  posts [options]
  history <postId> <accountId>  Latest 1000 retained observations, oldest first
  help [command]                display help for command
```

## postinger analytics capabilities

```text theme={null}
Usage: postinger analytics capabilities [options]

Options:
  -h, --help  display help for command
```

## postinger analytics report

```text theme={null}
Usage: postinger analytics report [options]

Options:
  --from <date>        First inclusive UTC date (YYYY-MM-DD)
  --to <date>          Last inclusive UTC date, at most 366 days
  --account-id <uuid>  Filter by connected account
  --platform <name>    Filter platform (choices: "instagram", "facebook",
                       "youtube", "tiktok")
  -h, --help           display help for command
```

## postinger analytics account

```text theme={null}
Usage: postinger analytics account [options] <id>

Options:
  --from <date>  First inclusive UTC date (YYYY-MM-DD)
  --to <date>    Last inclusive UTC date, at most 366 days
  -h, --help     display help for command
```

## postinger analytics posts

```text theme={null}
Usage: postinger analytics posts [options]

Options:
  --account-id <uuid>  Filter by connected account
  --platform <name>    Filter platform (choices: "instagram", "facebook",
                       "youtube", "tiktok")
  --days <n>           7, 30 or 90; default 30
  --from <date>
  --to <date>
  --limit <n>          1–100
  --cursor <cursor>
  -h, --help           display help for command
```

## postinger analytics history

```text theme={null}
Usage: postinger analytics history [options] <postId> <accountId>

Latest 1000 retained observations, oldest first

Options:
  -h, --help  display help for command
```


## Related topics

- [Automate with the CLI](/cli/automation.md)
- [CLI quickstart](/cli/quickstart.md)
- [CLI authentication](/cli/authentication.md)
- [MCP tool reference](/mcp/tools.md)
- [Build with Postinger](/introduction.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.