Loopress CLI
The Loopress CLI (lps) is a Node.js command-line tool that connects to the WordPress REST API to sync code snippets between your local machine and any WordPress instance.
Command overview
Section titled “Command overview”| Group | Command | Description |
|---|---|---|
| Snippets | lps snippets pull | Download snippets from WordPress |
lps snippets push | Upload local .php files to WordPress | |
lps snippets list | List all snippets on the site | |
| Site | lps site config | Add or update a site credential |
lps site switch | Switch the active site | |
lps site remove | Remove a saved site |
Quick start
Section titled “Quick start”# 1. Configure your first sitelps site config
# 2. Pull your snippetslps snippets pull
# 3. Edit, commit, pushgit add snippets/ && git commit -m "update snippet"lps snippets pushAuthentication
Section titled “Authentication”All commands authenticate using a WordPress Application Password. These are generated in Users → Profile → Application Passwords.
The CLI supports managing multiple sites (lps site config) and switching between them (lps site switch). For CI environments, credentials can be passed as environment variables (WP_URL, WP_USERNAME, WP_APP_PASSWORD).