@plenary/cli
v0.5.1
Published
Plenary command-line client: metadata sync, content automation, and a raw API escape hatch.
Readme
@plenary/cli
The plenary command: a client for the Plenary API from a shell, a script,
or CI. Sync model and form YAML with an instance, manage entries and media,
and call any endpoint.
npm install --save-dev @plenary/cli
npx plenary init # writes plenary.json (no secrets)
export PLENARY_API_KEY=pln_prv_…
npx plenary statusplenary metadata pull # instance → models/ and forms/
plenary metadata diff # what push would change
plenary metadata push # apply (never deletes)
plenary entries list post --where status=published --limit 20
plenary entries create post --data '{"title":"Hello"}' --slug hello --publish
plenary entries export post > posts.ndjson
plenary media upload hero.jpg
plenary forms entries export contact > contact.ndjson
plenary api GET models
plenary login # a user session, for admin work
plenary api-keys create --name Deploy --grant content:models:update
plenary roles listConfiguration comes from flags, PLENARY_* variables, a .env, then
plenary.json. The credential is an API key (content work, CI) or a
stored user session from plenary login (admin work); a key wins for
content commands when both exist. --json on any command prints the API's JSON; exit 1 is an
API error, 2 a usage error.
Full reference: docs/CLI.md in the Plenary repository.
