Skip to Content

The pl4m CLI

pl4m login, pl4m publish, and the rest of the surface.

pl4m is the command line for the same API the MCP server and the dashboard call. It is for a person at a terminal, and for an agent that can run commands but cannot add an MCP server.

Not distributed yet. There is no npm install -g pl4m and no release to download: the CLI lives in the service's own repository, which is not public. Everything below is its actual surface, so that it is written down — but getting it onto your machine is not something this page can tell you yet.

It also needs a personal API token, and minting one has no self-serve screen yet. Connecting over HTTP needs neither.

Signing in

pl4m login --token                  # paste the token, or pipe it in
echo "$TOKEN" | pl4m login --token
pl4m logout                         # forget it

The token is read from stdin, never from an argument. --token is a flag that must not carry a value, and --token=<value> is refused rather than quietly accepted — an argument is in your shell history, in ps output for the life of the process, and in whatever command log an agent harness keeps.

It is stored at ~/.config/pl4m/config.json, mode 0600, in a directory at mode 0700. $PL4M_CONFIG_HOME or $XDG_CONFIG_HOME move the directory.

--api must be https, or http on a loopback address. Anything else needs --insecure: a token in a plaintext Authorization header on an open network is not something to do by accident, and a reverse proxy on a trusted network is a decision worth typing.

The stdio MCP server reads the same file, so pl4m login is also how you would set up a local agent without putting a secret in a host's config.

Publishing

pl4m publish <file|dir|archive> [artifact-id]
      --title T  --slug S  --owner ID  --release  --kind html|jsx|vite

The kind is inferred from what you point it at — .html/.htm is html, .jsx/.tsx/.js/.ts is jsx, and a directory or an archive is vite — and --kind overrides it. A .zip, .tgz or .gz is uploaded as it is; a directory is zipped on your machine, under the five rules that bound what gets read, with every skipped path printed to stderr.

Passing an artifact id as the second argument publishes a new version of that artifact instead of creating one.

--release forces the new version live. There is no --no-release: a Free owner may not decline, and a Pro owner already gets a draft.

Reading

pl4m ls [--owner ID] [--limit N]
pl4m open <id> [--version ID] [--path /about]

pl4m open prints a URL rather than launching it. The URL carries a signed viewer token that expires in minutes, and handing it to the platform's browser opener would also hand it to whatever that opener logs — so printing it lets you, or your agent, decide.

Sharing, releasing, rolling back

pl4m share <id> --to <email|user-id>     # a person
pl4m share <id> --to <owner-id> --org    # an org
pl4m share <id> --link [--label L]       # an unlisted link, shown once
pl4m release <id> [version-id]
pl4m rollback <id> [--to version-id]

--link prints the link once; only its hash is stored, so it cannot be shown again. pl4m release <id> with no version releases the newest ready version, which is the usual follow-up to a Pro publish.

Your site

pl4m site ls [--owner ID]
pl4m site mount <id> <path> [--owner ID]
pl4m site open <handle>

pl4m site mount is the one command that makes something public. A path on your personal site is readable by anyone, with no credential. On an org site it is readable by every member and nobody else. Un-mounting makes it private again.

pl4m site open prints a URL. A personal site is public, so there is no credential in it. An org site is members-only, so the URL carries a five-minute sign-in token — and the plain address, the one to pass on, is printed to stderr instead.

Un-mounting, moving a route, redirects and the index are the API and the MCP tools; the CLI does not wrap them.

Everywhere

--jsonprint the raw response, envelope and all
--api URLoverride the API origin for one call
--insecureallow a non-loopback http origin
pl4m --helpthe whole surface

Environment

PL4M_TOKENa personal API token. Wins over the stored file, which is the better shape for CI — nothing is written to disk
PL4M_API_ORIGINthe API origin. Production is https://app.pl4m.com/api
PL4M_CONFIG_HOMEthe directory holding config.json

No retries

A rate-limited call comes back as RATE_LIMITED and stops there. A CLI that silently retried a publish would turn one rate-limited call into several; the fix is to wait, and the error says so.

On this page