Commands#
| Command | What it does | Options |
|---|
login | Sign in with a store API key. Prompts unless --key or the env var is set. | |
logout | Forget the saved key for this folder’s store (or the current one). | --store <id> |
whoami | Show the store, its URL, the key’s scopes and the theme folder. | |
init [folder] | Download the theme into a new folder named after the store. | --force |
pull | Bring server changes down. Keeps local edits unless forced. | --force |
status | List local changes since the last sync. | |
push | Upload local changes as drafts. Stops on conflicts unless forced. | --force |
watch | Push on every save and print a self-reloading preview link. | --open |
preview | Print a fresh preview link for the current drafts. | --open |
publish | Push, build on the server and make the drafts live. | --yes, --no-push, --open |
versions | List published versions and mark the live one. | |
open | Open the storefront in your browser. | |
Aliases: dev for watch, deploy for publish, ls for versions, info for whoami.
Global options#
| Option | Description |
|---|
--key <sk_…> | Use this key for one command. OPENSTOCK_API_KEY does the same. |
--api <url> | API origin, default https://openstock.dev. Also OPENSTOCK_API_URL. |
-o, --open | Open the preview or storefront in your browser. |
-f, --force | Overwrite on conflicts; let init use a folder that is not empty. |
-y, --yes | Publish without asking. |
-h, --help / -v, --version | Show help or the installed version. |
Environment#
| Variable | Description |
|---|
OPENSTOCK_API_KEY | Key to use instead of the saved one. |
OPENSTOCK_API_URL | API origin. |
OPENSTOCK_CONFIG_DIR | Where credentials are stored. |
NO_COLOR | Turn off colored output. |