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

Title: Install and sign in
Description: Install the CLI, create an instance profile, authenticate, and select a workspace.
Canonical: https://docs.openpo.st/automate/cli/setup
Source: [https://docs.openpo.st/automate/cli/setup](https://docs.openpo.st/automate/cli/setup)

# Install and sign in

## Install

Install the npm wrapper, which downloads and verifies the matching release binary:

```sh
npm install -g @getopenpost/cli
```

You can also download the binary from [GitHub Releases](https://github.com/getopenpost/openpost/releases).

## Sign in

Browser sign-in is the shortest path for an interactive shell:

```sh
openpost auth login https://app.openpo.st
```

For a headless shell, print the verification URL and code:

```sh
openpost auth login https://app.openpo.st --device
```

For CI, pass a developer token through stdin:

```sh
printf '%s\n' "$OPENPOST_TOKEN" | \
  openpost auth login https://app.openpo.st --with-token
```

The CLI stores named instance profiles. Use them to keep Hosted, staging, and self-hosted credentials separate:

```sh
openpost instance add hosted https://app.openpo.st
openpost instance use hosted
openpost instance health
```

## Select a workspace

```sh
openpost workspace list
openpost workspace use personal
openpost account list
```

The selected workspace belongs to the active profile. You can override profile, instance, workspace, or token for one command with `--profile`, `--instance`, `--workspace`, or `--token`.

Connect new social accounts in the web app at `<instance>/settings?tab=accounts`. The CLI does not collect provider credentials.
