Guides
The Swell gives you the ability to access your Swell stores through the CLI (command-line interface). You can utilize the Swell CLI to manage store and storefront settings, SSH keys, and interface with your Swell store’s schema.
If you have installed our command-line interface via npm, the easiest way to update it is by running the installation again.
Our CLI is currently in beta. Commands and functionality are subject to change.
If you’d prefer, you can also interface with Swell programmatically via our API—see the API docs.
To download and install Swell CLI, run the following command:
$ npm i -g @swell/cli
While using a command within the Swell CLI, a message will inform you if an update is available.
If you used npm to install our command-line interface, we recommend updating it by running the installation command yet again.
$ npm i -g @swell/cli
Below is a list of available general options and namespace syntax for use of commands.
For more detailed information on the currently supported commands, visit the Swell CLI readme on npm.
Commands tend to support the following helper options:
- -quiet (-q): Boolean, quiets the progress indicator and output of intermediary commands
- -verbose (-v): Boolean, outputs all commands
- -dry-run: Boolean, dry runs requests that delete data, but doesn't run them
- -yes (-y): Boolean, answers all confirmation questions with yes.
- -secret-key: String, Enables ephemeral secret-key based authentication for commands
All commands accept a --store or -s option, which allows switching the context of the CLI commands to the selected store. When not in use, all commands refer to the set default store.