CLI Commands
The Loopress CLI (lps) is a Node.js command-line tool. It connects to the WordPress REST API exposed by the Loopress plugin and syncs your site’s code and configuration with local files you commit to Git. To install it, see Getting Started. The rules shared by every command (--env, --dry-run, --yes, --json, how pull and push treat your files) are on the Concepts page.
Run lps <command> --help for the exact arguments and flags of any command.
Setup and diagnostics
Section titled “Setup and diagnostics”| Command | Description |
|---|---|
lps init |
Create a loopress.json config file interactively |
lps status |
Show which project and environment commands will target |
lps doctor |
Diagnose connectivity, plugin, credential and hook problems |
lps validate |
Check local tracked files are push-ready, without contacting WordPress |
lps telemetry enable / disable |
Turn crash reporting to Sentry on or off |
Projects and environments
Section titled “Projects and environments”| Command | Description |
|---|---|
lps project config |
Add or update a WordPress project environment |
lps project list |
List configured WordPress projects |
lps project switch |
Switch the active project |
lps project rm |
Remove one or more WordPress projects or environments |
lps project rotate |
Rotate the WordPress Application Password of an environment |
Every resource at once
Section titled “Every resource at once”| Command | Description |
|---|---|
lps pull |
Pull every resource from WordPress |
lps push |
Push every resource to WordPress |
lps diff |
Compare local files with an environment, or two environments. Exits 1 on drift |
lps promote |
Copy every tracked resource from one environment to another |
lps content copy |
Replace the local site’s content with an environment’s |
lps dev |
Watch files and push each change to the local environment |
Features
Section titled “Features”Each feature syncs one kind of WordPress data as files. Most share the same subcommands: pull, push, list, diff, and rollback.
| Command group | Subcommands | Feature |
|---|---|---|
lps snippet |
pull push list diff rollback publish |
Snippets |
lps hook |
pull push list diff rollback rm |
Hooks |
lps api |
pull push list diff rollback rm publish |
Custom API Routes |
lps app |
pull push list rm |
Single-Page Apps |
lps page |
push list diff |
Static Pages |
lps pattern |
pull push list rm diff rollback |
Block Patterns |
lps acf |
pull push list diff rollback |
ACF |
lps form |
pull push list diff rollback |
Forms |
lps menu |
pull push list diff rollback |
Menus |
lps cpt |
pull push list rm diff rollback |
Custom Post Types |
lps taxonomy |
pull push list rm diff rollback |
Taxonomies |
lps meta |
pull push list rm diff rollback |
Post Meta |
lps role |
pull push list rm diff rollback |
Roles |
lps option |
add pull push list diff rollback rm |
Options |
lps plugin |
add pull push status audit |
Plugins |
lps theme |
add pull push status activate, version pull/push |
Themes |
lps theme style |
pull push diff rollback |
Theme Styles |
lps theme template |
push list diff |
Templates and parts |
lps composer |
init pull push |
Composer |
Every rm also answers to remove (lps app remove, lps option remove…), for existing scripts.
Loopress account
Section titled “Loopress account”| Command | Description |
|---|---|
lps login / logout |
Log in to or out of the Loopress console |
lps project push |
Push local projects, environments and credentials to your Loopress account |
lps project pull |
Pull projects and environments from your account that aren’t configured locally yet |
Connecting an AI agent instead of a human? The MCP server exposes these commands as tool calls.