Commands
Full reference of every ps-lando command with flags and examples.
This is the canonical command table. For deep dives on what each one does, follow the links to the relevant guide.
All commands
| Command | What it does |
|---|---|
create [name] | (1.0+) Zero-config: drop any theme zip in cwd → ps-lando create auto-detects + installs. Auto-loads bundled panda preset when a panda*.zip is present. -y for defaults. --ps-version 9.1.0 to pin a tag. --theme=<name> / --preset=<name> for explicit selection. See First sandbox. |
init | (1.0+) Interactive scaffolder. Walks 7 prompts (clack) and writes pslando.config.json, init-scripts/01-example.sh, plus a .gitignore entry. --yes for defaults, --force to overwrite. See init below. |
info [path] | Consolidated summary: URLs, BO creds, active theme, module count, versions. |
open <target> [path] | Open URL in browser. Targets: front / bo (or admin) / phpmyadmin (or pma) / mail (or mailhog). |
install-modules [path] | Batch-install the modules detected in cwd. Alias: im. --dry-run to preview order. --exclude=<glob> / --only=<glob> for filtering. Parallel concurrency 3 by default; pass --sequential for legacy one-at-a-time. See Selecting modules. |
activate-theme <name> [path] | Switch active theme. Alias: at. Falls back to SQL if prestashop:theme:enable fails (PS 8.2.x / 9.x bugs). --force-sql to skip console attempt. |
list [path] | Show detected zips (themes + modules) in a directory. Alias: ls. |
destroy [path] | lando destroy — removes containers + database, keeps files on disk. |
repair [path] | lando start + cache clear on an existing project. Use after reboot or if the BO looks stale. |
hooks <subcommand> | Manage hooks + bundled recipes. Subcommands: list, run <name>, run-all, install <name>. See Hooks & recipes. |
cache clear | (1.0+) Wipes the local plan cache (.pslando-cache.json). Use when zip detection feels stuck. -y to skip confirm. |
db reset [path] | (0.6+) Drop the DB and re-run install + module install + theme activation. ~3-5 min. Reuses persisted selection from .ps-lando.json. -y to skip confirm. See Sandbox lifecycle. |
db dump [output] [path] | (0.6+) Gzipped MySQL dump. --with-files switches to a .tar.gz bundle that also includes img/ and themes/<active>/. |
db restore <path> [project] | (0.6+) Auto-detects format (.sql.gz → DB only, .tar.gz → DB + files). -y to skip confirm. |
doctor [path] | (0.6+) Diagnostic checklist with ✓/⚠/✗ per item. --fix prompts to auto-recover anything fixable. See Doctor. |
init
ps-lando init is the v1 interactive scaffolder. It writes a pslando.config.json, an example hook script, and a .gitignore entry. The 7 prompts (in order):
| Step | Prompt | Default | Skip with |
|---|---|---|---|
| 1 | Project name? | basename of cwd | --yes |
| 2 | Theme source? (auto-detect / specific zip / theme name only / none) | auto-detect | --yes |
| 3 | Modules glob (picomatch over module zips and folders) | ** | --yes |
| 4 | Init scripts directory | ./init-scripts | dir already exists |
| 5 | Post scripts directory | ./post-scripts | dir already exists |
| 6 | Auto-load preset (panda / none) | panda if panda*.zip is detected, else none | --yes |
| 7 | Confirm — write config + example script? | true | --yes |
Ctrl-C at any step exits cleanly with "Init cancelled — no files written." (no partial state). If pslando.config.* already exists, init refuses with exit 82 unless --force is passed.
See Reference → Config for the full schema of the generated file.
cache clear
ps-lando cache clear # prompts for confirm
ps-lando cache clear -y # non-interactiveWipes .pslando-cache.json in the cwd. The cache stores a hash of detected zips + resolved plan so the next create skips re-detection — useful for shaving a couple of seconds. Clear it when:
- You replaced a zip with a different version but the same filename.
- You added / removed a
pslando.config.*file mid-session. - The CLI keeps using a stale theme name after you renamed a zip.
Targets for open
| Alias | Target |
|---|---|
front | Front-office (http://<project>.lndo.site/) |
bo, admin | Back-office (http://<project>.lndo.site/<admin_dir>/) |
phpmyadmin, pma | phpMyAdmin (random port) |
mail, mailhog | MailHog (random port) |
Subcommands for hooks
| Subcommand | What it does |
|---|---|
hooks list | Lists discovered scripts in init-scripts/ + post-scripts/ and all bundled recipes. |
hooks run <name> | Runs a bundled recipe by name. |
hooks run-all | Runs every executable script in init-scripts/ then post-scripts/. |
hooks install <name> | Copies a bundled recipe into your project's init-scripts/ (or post-scripts/). |
Aliases at a glance
| Alias | Long form |
|---|---|
im | install-modules |
at | activate-theme |
ls | list |
pma | phpmyadmin (as open target) |
bo | admin (as open target) |
mail | mailhog (as open target) |
Environment variables
| Variable | Effect |
|---|---|
PS_LANDO_NO_UPDATE_CHECK=1 | Skip the silent npm-registry version check on startup. |