ollieshop is the command line of Ollie Shop. It runs the local dev server that feeds Studio, deploys components and functions, and manages the records behind them (stores, versions, components, functions) without opening the Admin. It is published as @ollie-shop/cli and requires Node.js 22 or newer.
Projects scaffolded with npx create-ollie-shop install it as a dev dependency, so npx ollieshop <command> works from the project root and npm start runs the dev server. A global install is optional; see Installation.
Commands
Flags come after the subcommand:
ollieshop store create --name "Acme", not ollieshop store --name "Acme" create.
Two ways to run
Every command works in a terminal. The record commands (store, version, component, function, business-rule, deploy, status, whoami, schema, init, setup, check-update) are also designed for scripts and coding agents: they take their input as flags or as one JSON document, print one JSON line, and exit non-zero on failure. login, start and function dev are interactive.
Global flags
Flag syntax:
--key value works everywhere. Every command except login and start also accepts --key=value, and a value that starts with - (such as a negative number) needs that = form. login and start only read the two-token form. Boolean flags are passed bare (--wait); where a value is accepted, only true and false are valid.
Output
Injson mode every command prints exactly one line on stdout:
data. deploy, status and the function commands also include "success": true. A handled error prints {"error":{"message":"..."}} on stdout and exits with code 1.
In pretty mode objects print as key: value lines, lists print as a table, and errors go to stderr as Error: ....
A --dry-run prints {"dryRun":true,"action":"component.create","data":{...}}.
Authentication
ollieshop login opens the Admin in your browser and stores the resulting session in ~/.ollie-shop/credentials.json. Commands that talk to the API renew the session automatically when it is about to expire. There is no logout command; delete the credentials file to sign out. Details in Installation.
Environment variables
function dev also loads a .env file, see its page.
Updates
Before most commands the CLI checks npm once a day and prints a banner when a newer version exists:npm i -D @ollie-shop/cli@latest. ollieshop check-update --force checks immediately and prints the result as data.
Exit codes
0 on success, 1 on any handled error (validation, authentication, API, a failed build when waiting). A build that ends in any status other than SUCCEEDED is an error for deploy --wait and status --wait.