Loopress CLI
The Loopress CLI (lps) is a Node.js command-line tool that connects to the WordPress REST API to sync code snippets and plugins between your local machine and any WordPress instance.
The Loopress WordPress plugin must be installed and active on the site you want to manage.
Command overview
Section titled “Command overview”Commands for managing the tool itself, your projects, and your Loopress account:
| Group | Command | Description |
|---|---|---|
| Auth | lps login |
Log in to the Loopress console |
lps logout |
Log out from the Loopress console | |
| Setup | lps init |
Create a loopress.json config file interactively |
lps status |
Show which project and environment commands will target | |
lps doctor |
Diagnose connectivity, plugin and credential problems | |
| Project | lps project config |
Add or update a WordPress project environment |
lps project list |
List configured WordPress projects | |
lps project switch |
Switch the active project and environment | |
lps project remove |
Remove one or more WordPress projects or environments | |
lps project push |
Push locally configured projects, environments and credentials to your Loopress account | |
lps project pull |
Pull projects and environments from your Loopress account that aren’t configured locally yet | |
| Telemetry | lps telemetry enable |
Enable error reporting to Sentry |
lps telemetry disable |
Disable error reporting to Sentry |
Features
Section titled “Features”Each of these syncs one kind of WordPress data as files in Git. See its own page for commands, flags, and file format:
- Snippets: PHP/CSS/JS code snippets (Code Snippets or WPCode)
- ACF: Advanced Custom Fields configuration
- SEO: SEO settings, post meta, and redirects (RankMath or Yoast)
- Forms: WPForms forms
- Pages: WordPress pages
- API Routes: custom REST API endpoints
- Plugins: installed WordPress.org plugins manifest
- Composer: PHP dependencies, without SSH
Quick start
Section titled “Quick start”# 1. Connect to your WordPress sitelps project config
# 2. Initialize your project configlps init
# 3. Pull your snippetslps snippet pull
# 4. Edit, commit, pushgit add snippets/ && git commit -m "update snippet"lps snippet pushAuthentication
Section titled “Authentication”All commands authenticate against WordPress using an Application Password. By default, lps project config creates one automatically by authorizing in your browser. Generating one manually under Users → Profile → Application Passwords is available as a fallback.
The CLI supports managing multiple projects (lps project config) and switching between them (lps project switch).