Install the CLI

Install the pln CLI and sign in with the device flow.

pln is the terminal client for Plain: issues, pull requests, docs, comments, reviews, relations, repositories, registry tokens, and publishing. It is a small, fast tool designed to compose with git and your shell.

Install

npm install -g @plainalpha/cli

The package installs two equivalent binaries, pln and plain. These docs use pln.

Sign in with the device flow

The CLI authenticates with a device flow: it prints a short code, you confirm it in the browser, and the CLI receives a session token. No copy-pasting secrets out of a settings page.

export PLAIN_URL=https://alpha.plain.jxd.dev
pln login

Credentials are stored in ~/.plain/credentials.json with owner-only permissions. If your session expires, run pln login again.

Verify

pln whoami

This prints your user and the organisations you belong to.

Point at a different server

The CLI talks to whatever PLAIN_URL points at, so the same binary works against the hosted alpha, a staging deployment, or a local instance:

pln --url https://alpha.plain.jxd.dev whoami   # per command
export PLAIN_URL=https://alpha.plain.jxd.dev   # per shell

Next steps

Most commands operate on a repository and take --repo <org>/<name>:

pln issue list --repo <org>/my-app
pln pr list --repo <org>/my-app --status open

The CLI reference lists every command and flag.