> ## 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 quickstart

> Install Postinger and create a draft from a local file.

## Install

Requires **Node.js 24.15.0 or newer**. These instructions cover CLI **0.2.0**, available on npm.

```bash theme={null}
npm install -g @postinger/cli@0.2.0
postinger --version
```

## Connect a project

```bash theme={null}
postinger auth login
postinger auth status
```

The CLI opens your browser and prints a matching code. Sign in as a project admin, verify the code, select a project, and approve the connection. Use `--no-browser` to print the link instead.

## Check your account

```bash theme={null}
postinger accounts list
postinger accounts capabilities ACCOUNT_ID
```

The capability response includes connection availability, caption and attachment limits, and platform options. `supported: true` alone does not mean the account is available.

## Upload and draft

```bash theme={null}
postinger upload ./photo.jpg
postinger posts create \
  --content "A new update" \
  --account ACCOUNT_ID \
  --media MEDIA_ID \
  --idempotency-key launch-draft-001
```

Replace `MEDIA_ID` with the ready media ID returned by upload. The post stays a draft unless you supply `--scheduled-at`.

## Publish and verify

```bash theme={null}
postinger posts publish POST_ID --yes --idempotency-key launch-publish-001
postinger posts get POST_ID
```

Publishing requires `posts-publish`. Success from the publish command means the request was accepted. Check the post until it reaches a final status; inspect individual targets for failures.

For connection problems, run `postinger doctor`. See [authentication](/cli/authentication) and [all commands](/cli/commands).


## Related topics

- [CLI command reference](/cli/commands.md)
- [Your first draft](/quickstart.md)
- [API quickstart](/api-reference/quickstart.md)
- [CLI authentication](/cli/authentication.md)
- [Automate with the CLI](/cli/automation.md)


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