CLI
locdev controla el daemon desde la terminal: todo lo que hace la aplicación también funciona desde aquí, porque ambas hablan con el mismo daemon. Todos los comandos aceptan --json para una salida legible por máquinas, y locdev <comando> --help muestra las opciones.
Los comandos de sitio (up, down, reload, logs, info, open, secure, dev …) aceptan el nombre del sitio o, sin nombre, usan el sitio registrado que contiene el directorio actual:
cd ~/Code/shop
locdev up # lo mismo que locdev up shop
locdev logs -f
locdev secure
Los comandos marcados como admin muestran el cambio exacto (el script) y piden confirmación antes de usar privilegios de administrador; --yes omite la pregunta. No se instala nada en el sistema sin ese paso.
Interfaz de terminal (TUI)
locdev solo, en una terminal interactiva, abre la TUI (lo mismo que locdev tui; --light usa los colores claros). Tiene el aspecto de la app: barra lateral con las páginas, los sitios y los servicios con sus LED, el estado del proxy, el DNS, el HTTPS y el Mailbox abajo, y la página en el centro (Dashboard, Sitios, Servicios, Runtimes, Procesos, Mailbox, Actividad, Doctor y Acerca de, que muestra la versión de la CLI y del daemon).
| Tecla | Qué hace |
|---|---|
↑ ↓ tab | Se mueve en la lista; tab alterna entre la barra lateral y la página |
enter | Abre la página, la salida del sitio o servicio, el mensaje |
s · R | Inicia/detiene · reinicia el sitio, servicio o proceso seleccionado |
o · l | Abre el sitio en el navegador · muestra su salida |
ctrl+p | "Ir a o hacer": páginas, sitios, acciones y todos los comandos de la CLI |
: | Ejecuta cualquier comando locdev aquí mismo, con confirmaciones y contraseñas |
/ · ? | Filtra las listas · muestra todas las teclas |
q | Sale (el daemon y los sitios siguen funcionando) |
Lo que no tiene pantalla propia en la TUI se ejecuta con : (por ejemplo :git commit -m "…"), que cede la terminal al comando y vuelve a la TUI al terminar. Sin terminal interactiva (en un pipe, o con --json), locdev sin comando muestra la ayuda.
Códigos de salida
| Código | Cuándo |
|---|---|
0 | Éxito. |
1 | Error (el mensaje dice qué hacer). También cuando el doctor encuentra un error. |
3 | locdev status con el daemon detenido. |
Referencia
La referencia de abajo se genera a partir de las definiciones de la propia CLI (make cli-catalog); la página Tools → Command line de la aplicación muestra el mismo catálogo, con búsqueda. Una prueba falla si esta copia queda desactualizada.
Daemon
locdev tui
The terminal UI: dashboard, sites, services, logs and every command
The terminal UI: dashboard, sites, services, logs and every command. Also what `locdev` with no command opens. Sites keep running when you quit; anything without a screen of its own runs from the `:` prompt.
--light | The light ("paper") palette instead of the dark one |
locdev
locdev tui --lightNeeds an interactive terminal; piped or with --json, `locdev` alone prints the help.
Windows: use Windows Terminal (the classic console lacks true color).
locdev version
Show client and daemon versions
locdev status
Show daemon status
locdev doctor
Check the environment for problems
locdev doctor
locdev doctor --jsonlocdev start
Start the background daemon
locdev stop
Stop the background daemon and every running project
locdev restart
Restart the background daemon
locdev update
Check for a newer LocDev release, and how to get it
--refresh | Ask GitHub now instead of using the last answer (kept 6 hours) |
locdev update
locdev update --refresh --jsonReads the published releases on GitHub without a token and installs nothing: the app updates itself (signed), the standalone CLI through its install script (checked against SHA256SUMS).
The daemon also checks once a day and notifies about a newer release; turn it off in Settings → Updates or with `[automation] updates = false` in settings.toml.
Sites
locdev add
Register a project folder (defaults to the current directory)
<path> | |
--name | Project name; becomes <name>.test. Defaults to the folder name |
--command | Dev server command. `{port}` is replaced with the project's port |
--port | |
--auto-start | Start the project whenever the daemon starts |
--start | Start the project right away |
locdev add . --start
locdev add ~/Code/shop --name shop --port 8200locdev list
List registered projects
locdev park
Parked folders: every project inside one becomes a site, kept in step as projects come and go
<path> | The folder to park, or whose rules to change (default: the current folder) |
--depth | How many levels below the folder to look for projects (1 to 3) |
--exclude | Skip folders by name or relative path (`archive-*`, `clients/old`); repeatable. Replaces the list |
--no-exclude | Clear the exclude list |
--suggest | New projects are only listed; you add each one yourself |
--register | New projects become sites right away (the default) |
--keep-missing | Keep a site whose folder disappeared (marked missing) instead of removing it |
--remove-missing | Remove a site whose folder disappeared (the default) |
locdev park
locdev park ~/Development
locdev park ~/Clients --depth 2 --exclude 'archive-*'
locdev park ~/Experiments --suggest --keep-missingA subfolder counts as a project only when its files say so (artisan, composer.json, package.json, pyproject.toml, Cargo.toml, index.html…); node_modules, vendor, hidden and build folders are skipped. A taken name gets the parent folder's name (shop-clients) or a number. New sites start stopped.
Run again on a parked folder to change its rules; unset options are kept.
locdev park list
Parked folders, their rules and the projects found in them
locdev park remove
Stop parking a folder. Its sites are removed (never their files)
<path> | Default: the current folder |
--keep-sites | Keep its sites as regular sites |
locdev park remove ~/Development
locdev park remove ~/Development --keep-sitesSites are removed from LocDev only; their folders and files stay.
locdev park scan
Look for new and removed projects now
<path> | Default: every parked folder that is on |
locdev park scan
locdev park scan ~/DevelopmentChanges are also picked up as they happen (file events) and by a rescan every 5 minutes.
locdev park ignore
Don't turn a project of a parked folder into a site (removes its site)
<project> |
locdev park ignore ~/Development/old-shopRemoving a parked site with `locdev remove` ignores it too, so it doesn't come back.
locdev park unignore
Let an ignored project become a site again
<project> |
locdev park enable
Resume scanning and watching a parked folder
<path> |
locdev park disable
Pause a parked folder: no scans, no watching; its sites stay
<path> |
locdev tunnel
Share a running site on the internet through a tunnel (Cloudflare Quick Tunnels)
locdev tunnel providersLocDev runs the provider's own program; it never relays traffic itself. Only the site's own server is shared (never the proxy, a database or LocDev), with the site's domain as Host.
locdev tunnel providers
Providers, their limits and whether their program is installed
locdev tunnel install
Download and verify a provider's program (cloudflare)
<provider> | (default: cloudflare) |
locdev tunnel install cloudflareDownloads cloudflared from Cloudflare's GitHub release only when the checksum in the release notes and the one GitHub reports for the file agree, and checks the download against it. A cloudflared already on PATH (Homebrew, apt) is used as is.
locdev tunnel start
Share a running site; prints the public address
<site> | |
--provider | (default: cloudflare) |
--allow | Only these e-mail addresses (or *@domain) may open it; repeatable or comma-separated |
-y, --yes | Don't ask before exposing the site |
locdev tunnel start shop
locdev tunnel start shop --allow ana@example.com --allow '*@acme.com'The site must be running. The address (https://….trycloudflare.com) changes every time and stops working when the tunnel stops; up to 200 requests at the same time, no Server-Sent Events. With --allow, visitors confirm their e-mail with a one-time PIN.
locdev tunnel stop
Stop sharing a site
<site> |
locdev tunnel list
Shared sites and their addresses
locdev tunnel logs
The tunnel program's output for a site
<site> | |
--lines | (default: 200) |
locdev editor
The code editor sites and files open in (VS Code, Cursor, Zed, JetBrains…)
locdev editor list
Editors installed here and which one opens by default
--refresh | Look at the disk again (after installing one) |
locdev editor list
locdev editor list --refresh --jsonFinds VS Code, Cursor, Windsurf, VSCodium, Zed, Sublime Text and JetBrains IDEs (PhpStorm, WebStorm, IntelliJ IDEA, PyCharm, RustRover) by their command-line launchers on PATH, in the folders installers use (Homebrew, JetBrains Toolbox scripts) and in their usual install locations.
locdev editor set
Choose the editor sites open in (an id from `locdev editor list`)
<editor> | `none` goes back to the first one found |
locdev editor set zed
locdev editor set nonelocdev editor open
Open a site's folder, or a file inside it (`src/app.ts:12[:4]`)
<site> | |
<file> | A path inside the site, optionally with `:line[:column]` |
--editor | Another editor than the default one, just this time |
locdev editor open shop
locdev editor open shop app/Http/Kernel.php:42
locdev editor open shop src/main.ts:12:4 --editor cursorOnly the site's folder or a file inside it (no `..`, no links out). The editor starts on its own; LocDev doesn't wait for it.
locdev edit
Change a project's settings
<name> | |
--command | New dev server command (pass "" to clear it) |
--port | |
--auto-start | |
--node | Node.js version for this project ("22", "20.11"); "" uses the default |
--php | PHP version for this project ("8.3"); "" uses the default |
--pnpm | pnpm version for this project; "" uses the default |
--yarn | Yarn version for this project; "" uses the default |
--bun | Bun version for this project; "" uses the default |
--composer | Composer version for this project; "" uses the default |
--restart-on-failure | Restart the dev server when it fails (backoff, at most 5 times in 2 minutes) |
locdev edit blog --node 22
locdev edit shop --php 8.3 --composer 2
locdev edit blog --node ""locdev remove
Unregister a project. Its files are left untouched unless `--delete-files` moves its folder to the trash
<name> | |
--delete-files | Also move the project's folder to the trash |
locdev up
Start a site (its helper too, when set to start with it)
<name> | Defaults to the site in the current directory |
locdev up
locdev up bloglocdev down
Stop a site and its helper dev server
<name> |
locdev reload
Restart a site (and its helper, if running)
<name> |
locdev logs
Show a site's output
<name> | |
-n, --lines | Number of lines to show (default: 100) |
-f, --follow | Keep printing new output |
--dev | The helper dev server's output instead of the main process's |
locdev logs -f
locdev logs shop --dev -n 50locdev info
Everything about a site: stack, addresses, runtimes, processes
<name> |
locdev info
locdev info shop --jsonlocdev open
Open a site in the browser
<name> | |
--https | Open the HTTPS address even if HTTP is the default |
locdev open
locdev open blog --httpsUses xdg-open on Linux, open on macOS and the URL handler on Windows.
locdev subdomain
A site's subdomains: the wildcard and rules (`api`, `*.tenants`) to other ports or processes
locdev subdomain list
The site's subdomain rules and whether unlisted ones reach it
<site> |
locdev subdomain list shop
locdev subdomain list --jsonWith the wildcard on (the default) every <sub>.<site>.test reaches the site; rules send specific ones elsewhere. Exact rules win over wildcard ones, then the longest.
locdev subdomain add
Route a subdomain (`api`, `admin.eu`, `*.tenants`) somewhere specific
<pattern> | The part before the site's domain; a leading `*` is one or more labels |
<site> | |
--port | Send it to another server on this machine |
--process | Send it to one of the site's auxiliary processes (its port) |
locdev subdomain add api shop --port 9000
locdev subdomain add '*.tenants' shop
locdev subdomain add ws shop --process reverbThe Host header reaches the app unchanged (plus X-Forwarded-Host), so a multi-tenant app reads the tenant from it.
locdev subdomain remove
Remove a rule
<pattern> | |
<site> |
locdev subdomain wildcard
Whether unlisted subdomains (`*.site.test`) reach the site
<state> | |
<site> |
locdev subdomain wildcard off shopOff: only the site itself and listed subdomains answer; others get a 404 page.
locdev route
How a hostname is resolved (DNS), routed (proxy) and served over HTTPS
<host> | `api.shop.test`, `acme.tenants.shop.test:443`… |
locdev route api.shop.test
locdev route acme.tenants.shop.test --jsonDNS and routing are separate checks: the name has to resolve to this machine and the proxy has to know where to send it. Exits non-zero when either fails.
locdev new
Create a project (`locdev new laravel shop`; alone, a guided setup) or things in a site (`locdev new email contact`)
locdev new
locdev new laravel shop --php 8.4
locdev new nextjs web --package-manager pnpm
locdev new vite ui --typescript
locdev new django api
locdev new rust edge -o framework=actix`locdev new <starter> <name>` is the same as `locdev new project <starter> <name>` and takes the same options; alone, in a terminal, `locdev new` asks what to create.
locdev new project
A new project, created with the framework's own installer (the plan is shown first)
<starter> | The starter (`locdev new list`): laravel, symfony, php, wordpress, bedrock, nextjs, vite, vue, angular, nuxt, astro, sveltekit, nestjs, django, flask, fastapi, rust, rails, dotnet |
<name> | Folder (and site) name: lowercase letters, digits, - and _ |
--method | How to create it (installer, composer, npm, pnpm, bun…); the first one by default |
--typescript | TypeScript, for starters that offer it (same as `-o language=ts`) |
--php | PHP version to create it with and pin the site to (8.4) |
--node | Node.js version to create it with and pin the site to (22) |
-o, --option | A starter option, KEY=VALUE (see `locdev new list`). Repeatable |
-p, --package | A package to add after creating it (npm or Composer, by the starter). Repeatable |
--database | A LocDev database for it, SERVICE:INSTANCE (postgres:db, mysql:main…); the instance is created if needed |
--in | The folder to create it in (the current one by default) |
--no-site | Don't register it as a site at the end |
-y, --yes | Run without asking (still shows the plan) |
locdev new list
locdev new project laravel shop -o kit=react --database postgres:db
locdev new project nextjs web --method pnpm -o linter=biome -p zod
locdev new project django api --in ~/Code --yes
locdev new project vue front --php 8.4 --node 22Runs the framework's own installer (laravel new, composer create-project, npm create vite, create-vue, ng new, rails new, cargo init…) without a shell, after showing every command. Output streams here and what you type goes to the installer. The folder must not exist. At the end the folder is registered as a site; with --database, the instance and database are created and the new project's .env points at them.
Plain PHP, Flask, FastAPI and the Rust servers have no generator: LocDev writes its own minimal files (shown in the plan) into the new folder first, then pip or Cargo runs. --php/--node pick the version the installer runs with, and the new site is pinned to it.
locdev new list
The starters `locdev new project` can create, with their methods and options
locdev new list
locdev new list --jsonlocdev tools
Tools new projects need (installers, package managers): status and install
locdev tools list
The tools starters need, whether they're installed and their version
locdev tools listlocdev tools search
Search npm or Packagist for packages to add to a new project
<registry> | |
<query> |
locdev tools search npm tailwind
locdev tools search packagist sanctumlocdev tools terminals
The daemon's terminals (installs, new projects), running or finished
locdev tools attach
Follow a terminal's output; lines you type go to it
<id> |
locdev tools kill
Stop what a terminal is running
<id> |
locdev tools close
Forget a finished terminal
<id> |
locdev tools install
Install a tool with its documented command (shown first), in a terminal
<id> | |
-y, --yes |
locdev tools install laravelOnly tools with an official one-line install (the Laravel installer through Composer, Rails through gem). Runtimes (PHP, Composer, Node.js, pnpm) are installed with `locdev runtime install`; the others link to their installer.
locdev domain
Print the .test domain for a project name
<name> |
Dev servers and processes
locdev debug
The Debug Center: exceptions, dumps, log errors, HTTP 5xx and process failures of your sites
Events come from the sites' output (exceptions and stack traces of PHP, Node.js, Python and Rust, build errors, warning/error lines), Laravel's storage/logs, the proxy (5xx answers), process failures and failed jobs. Secrets are hidden before anything is stored: .env values, LocDev's secrets, auth headers, cookies, tokens, passwords in URLs and JSON.
locdev debug events
Recent events, newest last; `--follow` keeps printing new ones
--site | Only this site |
--kind | Only these kinds (repeatable) |
--level | This level and above |
--search | Text in the message, error type, file or URL |
--limit | (default: 50) |
-f, --follow |
locdev debug events -f
locdev debug events --site shop --kind exception --kind http
locdev debug events --level error --search SQLSTATE --jsonlocdev debug errors
Problems grouped by repeat, with counts
--site | Only this site |
--kind | Only these kinds (repeatable) |
--level | This level and above |
--search | Text in the message, error type, file or URL |
locdev debug errors
locdev debug errors --site shoplocdev debug show
One event in full: stack trace, request, dumped value, likely cause
<id> |
locdev debug show 42locdev debug export
Events as JSON lines (for a file or another tool)
--site | Only this site |
--kind | Only these kinds (repeatable) |
--level | This level and above |
--search | Text in the message, error type, file or URL |
--limit | (default: 2000) |
locdev debug export --site shop > shop-events.jsonllocdev debug clear
Forget a site's events, or every event
--site | |
-y, --yes |
locdev debug clear --site shop
locdev debug clear -ylocdev debug dumps
Send a PHP site's dump()/dd() to LocDev (on) or back to the page (off)
<site> | |
<state> |
locdev debug dumps shop on
locdev debug dumps shop offPHP sites with Symfony VarDumper (Laravel, Symfony): LocDev sets VAR_DUMPER_FORMAT=server and VAR_DUMPER_SERVER in the site's process environment only; no file changes. dump() and dd() then go to LocDev instead of the page (dd() still ends the request). If LocDev's dump server can't be reached, VarDumper prints them as usual. A running site restarts to pick it up.
locdev debug status
Retention, disk use, the dump server and which sites send dumps
locdev metrics
Request metrics of a site: counts by status, latency percentiles, busiest paths
<site> | |
--reset | Start counting again |
locdev metrics
locdev metrics shop --json
locdev metrics shop --resetCounted by LocDev's proxy in memory since the daemon started: requests that skip the proxy (127.0.0.1:<port>) aren't seen. Latency is the time to the response headers.
locdev tinker
Laravel Tinker with the site's PHP and environment (code, stdin or a prompt)
-e, --execute | PHP to run, e.g. 'User::count()'. Without it: stdin, or a prompt in a terminal |
--site |
locdev tinker -e 'App\Models\User::count()'
echo 'config("app.name")' | locdev tinker
locdev tinker --site shopRuns `php artisan tinker --execute` with the site's PHP and environment (30 s, 256 KB of output). At a prompt each line runs on its own; for a full REPL use the app's Tinker console.
locdev dev
The helper dev server next to a site (Vite beside Laravel)
locdev dev status
Show the helper's command, mode and state
<site> |
locdev dev start
Start the helper now
<site> |
locdev dev stop
Stop the helper
<site> |
locdev dev restart
Restart the helper
<site> |
locdev dev mode
Decide how LocDev runs the detected helper: ask, manual, auto or never
<mode> | |
<site> | |
--command | Use this command instead of the detected one ({port} is replaced) |
--start | Start it right away |
locdev dev mode auto
locdev dev mode manual shop --start
locdev dev mode neverlocdev dev logs
Show the helper's output
<site> | |
-n, --lines | (default: 100) |
-f, --follow |
locdev dev logs -flocdev ps
Every process LocDev runs, with CPU and memory
locdev ps
locdev ps --jsonlocdev process
A site's auxiliary processes: queue workers, schedulers, WebSocket servers
locdev process list
The site's processes: the dev server, its helper and the auxiliaries
<site> |
locdev process list
locdev process list shop --jsonlocdev process start
Start an auxiliary process (needs a mode other than ask/never)
<process> | |
<site> |
locdev process start queue
locdev process start horizon shopRefused while an alternative that consumes the same jobs is running (Horizon and queue:work, Solid Queue and Sidekiq).
locdev process stop
<process> | |
<site> |
locdev process restart
<process> | |
<site> |
locdev process mode
Decide how LocDev runs it: ask, manual, auto (with the site) or never
<process> | |
<mode> | |
<site> | |
--command | Run this command instead of the offered one ("" goes back to it) |
locdev process mode queue auto
locdev process mode scheduler manual shop
locdev process mode queue manual --command "php artisan queue:work --queue=high,default"
locdev process mode reverb neverOffered processes start as ask: nothing runs until you decide. auto starts it with the site; choosing one turns its alternatives' auto off.
locdev process add
Add a process of your own (a worker, a watcher…)
<process> | |
<site> | |
--command | The command; {port} gets a port of its own |
--label | |
--mode | manual (default) or auto (default: manual) |
locdev process add mailer --command "php artisan queue:work --queue=mail" --label "Mail queue"{port} in the command gets a free port of its own.
locdev process remove
Remove a process you added, or forget the decision about an offered one
<process> | |
<site> |
locdev process logs
Show a process's output
<process> | |
<site> | |
-n, --lines | (default: 100) |
-f, --follow |
locdev process logs queue -fHTTPS and DNS
locdev secure
Make a site HTTPS-only, checking and fixing what that needs
Make a site HTTPS-only, checking and fixing what that needs. Checks DNS, the HTTPS listener, the site's certificate and whether the LocDev CA is trusted. Changes that need administrator rights (trusting the CA, routing *.test) are shown and confirmed first.
<name> | |
--off | Serve the site over plain HTTP again |
-y, --yes | Do not ask before applying system changes |
locdev secure
locdev secure shop --yes
locdev secure shop --offTrusting the CA and routing *.test ask for administrator rights (polkit/sudo, the macOS dialog or UAC).
Firefox and Chrome on Linux keep their own certificate store; it is updated as your user.
locdev dns
Manage how the OS resolves *.test
locdev dns status
Show the DNS server and how *.test is routed
locdev dns install
Route *.test to LocDev (asks for administrator rights)
-y, --yes | Do not ask for confirmation |
Linux: systemd-resolved drop-in. macOS: /etc/resolver/test. Windows: an NRPT rule (needs port 53).
locdev dns uninstall
Undo `locdev dns install` (asks for administrator rights)
-y, --yes |
locdev tls
Manage HTTPS and the local certificate authority
locdev tls status
Show HTTPS and whether the local CA is trusted
locdev tls trust
Trust the local CA in the system and browser stores (asks for administrator rights)
-y, --yes |
Linux: update-ca-certificates or update-ca-trust. macOS: the System keychain. Windows: the Root store.
locdev tls untrust
Remove the local CA from the system and browser stores
-y, --yes |
Runtimes and package managers
locdev php
PHP settings per version (memory_limit, upload size, timezone…), applied to the sites LocDev runs
locdev php show
locdev php show --line 8.3 --jsonLocDev's sites run on PHP's built-in server, which reads the same files as the php command; LocDev's own file is added to the sites it runs through PHP_INI_SCAN_DIR, after PHP's scan folder. A php.ini LocDev didn't write is never changed.
locdev php lines
PHP version lines and whether LocDev sets anything for them
locdev php show
A line's settings: PHP's own value, LocDev's and the one in use
--line | 8.3, 8.4… (default: LocDev's default PHP) |
locdev php set
Set directives (`memory_limit=512M upload_max_filesize=64M`); running sites on the line restart
<values> | |
--line | |
-y, --yes | Don't ask before applying |
locdev php set memory_limit=512M upload_max_filesize=64M post_max_size=64M
locdev php set date.timezone=America/Sao_Paulo --line 8.3 --yesThe change is shown first, backed up, checked against what PHP actually loads (and put back if PHP refuses it); only running sites on that PHP line restart.
locdev php unset
Drop directives from LocDev's file (PHP's own value again)
<keys> | |
--line | |
-y, --yes |
locdev php unset memory_limitlocdev php reset
Remove every LocDev setting for the line
--line | |
-y, --yes |
locdev php edit
Edit LocDev's file for the line in $EDITOR; checked by PHP before it's applied
--line |
locdev php edit --line 8.4Lines LocDev doesn't offer in the form (xdebug.mode…) are kept; a syntax error is refused before anything changes.
locdev php file
Print a file PHP loads for the line (its php.ini, its scan folder), read-only
<path> | |
--line |
locdev php file /etc/php/8.3/cli/php.iniOnly files that PHP line loads; read-only.
locdev php history
Earlier versions of LocDev's file for the line
--line |
locdev php restore
Go back to an earlier version (`locdev php history` lists them)
<id> | |
--line | |
-y, --yes |
locdev runtime
Manage runtimes (Node.js, PHP) and package managers (pnpm, Yarn, Composer…)
locdev runtime list
Installed and detected versions, and the defaults
--refresh | Re-scan the machine for installed runtimes |
locdev runtime available
Versions available to install
<kind> | |
--all | Every release instead of the newest of each major line |
locdev runtime available node
locdev runtime available pnpm --alllocdev runtime install
Download, verify and install a version ("22", "22.11.0", "lts", "latest")
<kind> |
locdev runtime install node lts
locdev runtime install php 8.3
locdev runtime install pnpm 9
locdev runtime install composer 2locdev runtime update
Install the newest release of an installed line ("22", "8.3")
<kind> | |
<line> | The line to update; every managed line when omitted |
locdev runtime update node 22locdev runtime uninstall
Remove a LocDev-managed version
<kind> | |
--force | Remove it even if stopped sites or the default use it |
locdev runtime extensions
The PHP extensions a site needs against what its PHP loads, and the ones its packages recommend
<site> |
locdev runtime extensions
locdev runtime extensions shop --jsonRequired: ext-* in composer.json and composer.lock, the framework's requirements (Laravel), and drivers named in .env (DB_CONNECTION, Redis with phpredis). Checked against `php -m` of the site's own PHP; exits with 1 when something is missing.
Nothing is installed: the output says how for that PHP (apt package, pecl, php.ini). LocDev's PHP builds are static, with a fixed set of extensions.
locdev runtime modules
Every extension a PHP on this machine loads (and the ones it has but doesn't load). The default PHP when no version is given
locdev runtime modules
locdev runtime modules 8.3Also lists the extension files its extension folder has but php.ini doesn't load (Windows: php_*.dll).
locdev runtime default
Set the default version for projects without a pin ("" or --clear to unset)
<kind> | |
--clear |
locdev runtime default node 22
locdev runtime default php --clearlocdev runtime terminal
Use the default versions in new terminals ("on"/"off"; shows the state without one)
<state> |
locdev runtime terminal on
locdev runtime terminal
locdev runtime terminal offLinux/macOS: adds a marked block to ~/.bashrc and ~/.zshrc (and a file in fish's conf.d); off removes exactly that.
Windows: puts the folder first on the user's Path; a PHP or Node.js installed for all users still comes before it.
Dependencies, jobs and notifications
locdev deps
A site's dependencies: versions, updates, vulnerabilities, updating
locdev deps list
Every declared package: declared, locked, installed, newest
<site> |
locdev deps outdated
Only packages with a newer release
<site> |
locdev deps check
Ask the registries now (queues a job and waits for it)
<site> | |
--no-wait | Return right away instead of waiting |
locdev deps check
locdev deps check shop --no-waitlocdev deps audit
Check, then show packages with known vulnerabilities
<site> |
locdev deps audit
locdev deps audit --jsonAdvisories come from osv.dev (GitHub, npm and PHP security advisories). Exits with 1 when a version in use is affected.
locdev deps update
Update packages with the site's package manager, after showing the plan
<packages> | Package names |
--site | |
--major | Allow a new major version (rewrites the constraint) |
--scripts | Let the package manager run install scripts (off by default) |
-y, --yes | Don't ask for confirmation |
locdev deps update react vite
locdev deps update laravel/framework --major
locdev deps update vite --yesShows the exact commands and asks first. Install scripts are skipped unless --scripts.
locdev jobs
Background jobs: dependency checks and updates, runtime installs
locdev jobs list
Recent jobs, newest first
--site |
locdev jobs status
One job with its log
<id> |
locdev jobs cancel
Stop a queued or running job
<id> |
locdev jobs pause
Hold a queued job
<id> |
locdev jobs resume
Release a held job
<id> |
locdev jobs retry
Queue a failed or cancelled job again
<id> |
locdev notifications
Notifications LocDev keeps for you
locdev notifications list
Unread and read notifications (`--all` adds dismissed ones)
--all |
locdev notifications read
Mark notifications read (all when no ids are given)
<ids> |
locdev notifications dismiss
Dismiss notifications (all when no ids are given)
<ids> |
locdev notifications test
Show a test notification
Environment variables and secrets
locdev env
Shared environment variables and secrets, injected into sites' processes
locdev env list
Shared variables (secret values hidden) and where the vault key lives
--profile | Only this profile |
locdev env list
locdev env list --profile laravel --jsonlocdev env add
Create or change a shared variable. Without VALUE it is read from standard input, which keeps secrets out of your shell history
<key> | |
<value> | |
--profile | (default: global) |
--secret | Keep the value encrypted in the vault (default, except for browser prefixes) |
--plain | Store the value as plain text in env.toml |
--description |
locdev env add STRIPE_SECRET_KEY
printf %s "$KEY" | locdev env add STRIPE_SECRET_KEY
locdev env add SENTRY_DSN https://… --plain
locdev env add QUEUE_CONNECTION redis --plain --profile laravelValues are secret (encrypted in the vault) by default; NEXT_PUBLIC_, VITE_ and other browser prefixes default to plain and can't be secret.
Without VALUE the value is read from standard input, so it stays out of your shell history.
Running sites get the change after `locdev reload`.
locdev env remove
Remove a shared variable
<key> | |
--profile | (default: global) |
locdev env show
One variable; --reveal prints a secret's value
<key> | |
--profile | (default: global) |
--reveal | Print the value even if it is secret (asks for the LocDev password when one is required) |
locdev env show STRIPE_SECRET_KEY
locdev env show STRIPE_SECRET_KEY --reveal--reveal asks for the LocDev password when `locdev security` requires one, and is recorded in the history.
locdev env profile
Profiles: groups of variables a project can take
locdev env profile list
locdev env profile add
Create a profile or rename it
<id> | |
--label | |
--description |
locdev env profile add laravel --label Laravellocdev env profile remove
Remove an empty profile
<id> |
Only empty profiles can be removed; the global profile can't.
locdev env use
Choose which shared variables a site takes
<site> | |
--add-profile | Take this profile too (later ones win over earlier ones) |
--remove-profile | |
--disable | Never give this key to the site |
--enable | Undo --disable |
--global | Take the global profile (on by default) |
locdev env use shop --add-profile laravel
locdev env use shop --disable SENTRY_DSN
locdev env use shop --global falselocdev env check
What the site's processes get, its .env files and every conflict
<site> |
locdev env check
locdev env check shop --jsonShows each variable as injected, skipped, overridden, disabled or blocked, the site's .env files with the order its framework reads them, and every conflict. Values of secrets are never shown.
locdev env conflicts
Only the conflicts: where a shared variable meets one the site defines
<site> |
locdev env sync
Append the shared variables a site is missing to one of its .env files
Append the shared variables a site is missing to one of its .env files. Without a site, every registered site. Only adds lines, after showing them; keeps a backup; never copies secrets into .env.production or .env.staging, and writes .env.example with empty placeholders.
<site> | |
--file | Target file (default .env) |
--dry-run | Show what would change and stop |
-y, --yes | Do not ask before writing |
locdev env sync --dry-run
locdev env sync shop
locdev env sync shop --file .env.local --yes
locdev env sync shop --file .env.exampleWithout a site, every registered site.
Only appends lines; comments, order, encoding and line endings stay as they were. An encrypted backup is taken first (`locdev env backups`).
Secrets never go into .env.production or .env.staging; .env.example gets empty placeholders.
locdev env backups
Encrypted copies of the site's .env files taken before LocDev wrote them
<site> |
locdev env restore
Put a backup back (the current file is backed up first)
<id> | |
<site> | |
-y, --yes |
locdev env history
Recent changes to shared variables (never values)
Frameworks and stacks
locdev stack
Frameworks: detection, manual stacks and the definitions in use
locdev stack list
Every framework LocDev recognizes, with how it runs each one
--category | Only these categories: framework, ui, language, runtime, tool |
locdev stack list
locdev stack list --category framework --jsonnative: LocDev builds the dev command with host and port; script: runs one of the project's package.json scripts (the app must read PORT); custom: recognized, but the command has to come from you.
locdev stack detect
What a folder or a site is made of (the current directory by default)
<target> | A folder, or the name of a registered site |
locdev stack detect
locdev stack detect ~/Code/api
locdev stack detect shopOnly reads files (manifests, lockfiles, config); nothing in the project is run. Monorepos list their packages; add each as its own site.
locdev stack inspect
A site's stack in full: components, evidence, versions, command, prerequisites
<site> |
locdev stack inspect
locdev stack inspect shop --jsonlocdev stack add
Add a component the files don't prove (or bring back a hidden one)
<stack> | |
<site> |
locdev stack add tailwind
locdev stack add inertia shoplocdev stack remove
Hide a detected component, or drop one added by hand
<stack> | |
<site> |
locdev stack use
Choose the adapter that runs the site ("auto" goes back to detection)
<adapter> | |
<site> | |
--apply-command | Also make the adapter's start command the site's command |
locdev stack use flask --apply-command
locdev stack use django shop
locdev stack use auto shop--apply-command replaces the site's command with the adapter's; without it only the stack changes.
locdev stack definitions
The definitions in use; --refresh downloads newer signed ones
--refresh | |
--force | With --refresh: also take a revision that was rolled back |
--rollback | Go back to the previous definitions (or the bundled ones) |
locdev stack definitions
locdev stack definitions --refresh
locdev stack definitions --rollbackDefinitions are data (detection rules, commands, links), signed with minisign; LocDev only uses a set whose signature matches the key it ships, never an older revision than one already seen, and never a format it doesn't understand.
Checked daily unless offline or `locdev settings set automation.definitions off`.
Databases and caches
locdev service
Databases and caches: install, create instances, start/stop, back up
locdev service list
Services, their installations (system or LocDev) and the instances
--refresh | Look for system installations again |
locdev service list
locdev service list --refresh --jsonSystem installations (PATH, /usr/lib/postgresql/*, Homebrew, Program Files) are used as they are and never changed or removed.
locdev service status
Instances and whether they accept connections
locdev service available
Versions LocDev can download for a service
<service> |
locdev service available postgresPostgreSQL: builds of the official source by theseus-rs (all OS). MariaDB: MariaDB Foundation (Linux, Windows). MongoDB: MongoDB, Inc. (Ubuntu 22.04+/Debian 12, macOS, Windows). Valkey: download.valkey.io (Linux).
MySQL (MD5 only) and Redis (no binaries) can't be downloaded: use a system install, or MariaDB/Valkey.
locdev service packages
Versions the system's package manager offers (Homebrew, apt, winget)
<service> |
locdev service packages mysqlmacOS (and Linux with Homebrew): versioned formulae (mysql@8.4, postgresql@16, mongodb-community@8.0). Debian/Ubuntu: the distribution's package. Windows: winget (MySQL 8.0/8.4).
locdev service install-package
Install one of `locdev service packages` in this terminal (asks first)
<service> | |
<id> | The package id from `locdev service packages` |
-y, --yes |
locdev service install-package mysql mysql@8.4
locdev service install-package mysql oracle-mysql-8.4 --yesRuns the package manager in a terminal as your user (sudo asks there on Linux); the result is a system install LocDev finds and never changes.
locdev service install
Download and verify a version (newest when omitted). Without a service, registers the daemon to start at login (old meaning; see `locdev startup`)
<service> |
locdev service install postgresql
locdev service install valkey 9.1.3Runs as a background job; the download is installed only when its SHA-256 matches the publisher's.
locdev service uninstall
Remove a LocDev-downloaded version (never a system one). Without a service, stops starting the daemon at login (old meaning)
<service> |
locdev service create
A new instance: its own data folder, port, config and logs
<name> | |
--service | postgres, mariadb, mysql, mongodb, valkey or redis |
--port | |
--autostart | Start it whenever LocDev starts |
--start | Start it now |
locdev service create db --service postgres --start
locdev service create cache --service valkey --autostart
locdev service create legacy --service postgres --version 16 --port 5433Each instance has its own data folder, port, config and logs; servers listen on 127.0.0.1 only, with passwordless local users (development only).
locdev service start
Start an instance (or the only instance of a service)
<instance> |
locdev service start db
locdev service start postgresqlA service name works when it has a single instance.
locdev service stop
<instance> |
locdev service restart
<instance> |
locdev service autostart
Start it with LocDev, or not
<instance> | |
<enabled> |
locdev service remove
Remove an instance. Its data stays unless --delete-data (asks for the name)
<instance> | |
--delete-data |
locdev service remove db
locdev service remove db --delete-dataThe data is kept unless --delete-data, which asks for the instance's name; backups are always kept.
locdev service backup
A cold copy of the instance's data (it stops and starts again)
<instance> |
A cold copy: the instance stops, its data folder is archived, and it starts again.
locdev service backups
<instance> |
locdev service restore
Put a backup back; the current data is moved aside, not deleted
<instance> | |
<id> | |
-y, --yes |
The current data is moved to data.before-<time>, not deleted.
locdev service logs
The instance's output
<instance> | |
-n, --lines | (default: 100) |
Database manager
locdev db
Databases sites use: connections, tables, rows and SQL
locdev db list
Databases sites point at (from their .env) and LocDev's instances
<site> |
locdev db list
locdev db list shop --jsonFound in each site's .env (DB_*, DATABASE_URL, REDIS_URL/REDIS_*), SQLite files in the usual places, and LocDev instances. Passwords are never shown or sent to clients.
locdev db connect
How a site connects (host, port, database, user; never the password)
<site> | |
--conn | A connection id from `locdev db list` instead of the site's first database |
locdev db tables
Databases on the server and the tables of the current one
<site> | |
--conn | A connection id from `locdev db list` instead of the site's first database |
--allow-remote | Open a database on another host (it may be production) |
locdev db tables
locdev db tables shop --conn instance:dbA database on another host (it may be production) needs --allow-remote.
locdev db describe
A table's columns, indexes and foreign keys
<table> | `table` or `schema.table` |
<site> | |
--conn | A connection id from `locdev db list` instead of the site's first database |
--allow-remote | Open a database on another host (it may be production) |
locdev db describe users
locdev db describe public.orderslocdev db rows
Rows of a table, a page at a time
<table> | `table` or `schema.table` |
<site> | |
--conn | A connection id from `locdev db list` instead of the site's first database |
--where | `column=value` (repeatable) |
--order-by | Sort by this column |
--desc | Sort descending |
--page | Page number, from 0 (default: 0) |
--limit | Rows per page (at most 1000) (default: 50) |
--allow-remote | Open a database on another host (it may be production) |
locdev db rows users --where role=admin --order-by created_at --desc --limit 20Values are compared as text and always sent as parameters.
locdev db query
Run SQL. Destructive statements ask for the database's name
<sql> | One or more statements; quote them for the shell |
<site> | |
--conn | A connection id from `locdev db list` instead of the site's first database |
--allow-remote | Open a database on another host (it may be production) |
locdev db query "select count(*) from users"
locdev db query "delete from sessions" shopDROP, TRUNCATE, ALTER … DROP, GRANT/REVOKE and UPDATE/DELETE without WHERE (or with one that is always true, like 1=1) ask for the database's name on a terminal; the daemon checks it again. At most 1,000 rows come back; operations time out after 35 s.
locdev db insert
Insert a row: `--set column=value` for each column you give
<table> | `table` or `schema.table` |
<site> | |
--set | |
--null | Columns set to NULL (repeatable) |
--conn | A connection id from `locdev db list` instead of the site's first one |
--allow-remote | Open a database on another host (it may be production) |
locdev db insert users --set name=Ana --set email=ana@example.testlocdev db update
Change one row, found by its primary key (`--key id=5`)
<table> | `table` or `schema.table` |
<site> | |
--key | Primary key column=value (repeat for composite keys) |
--set | |
--null | |
--conn | A connection id from `locdev db list` instead of the site's first one |
--allow-remote | Open a database on another host (it may be production) |
locdev db update users --key id=5 --set name=Ana --null deleted_atlocdev db delete
Delete one row, found by its primary key (asks first)
<table> | `table` or `schema.table` |
<site> | |
--key | |
-y, --yes | |
--conn | A connection id from `locdev db list` instead of the site's first one |
--allow-remote | Open a database on another host (it may be production) |
locdev db keys
Redis/Valkey keys, a page at a time (SCAN)
<pattern> | Glob pattern (`session:*`) |
<site> | |
--cursor | The cursor `locdev db keys` printed, for the next page |
--conn | A connection id from `locdev db list` instead of the site's first one |
--allow-remote | Open a database on another host (it may be production) |
locdev db keys
locdev db keys "session:*"locdev db get
A Redis/Valkey key's type, TTL and value
<key> | |
<site> | |
--conn | A connection id from `locdev db list` instead of the site's first one |
--allow-remote | Open a database on another host (it may be production) |
locdev db set
Set a Redis/Valkey string key
<key> | |
<value> | |
<site> | |
--conn | A connection id from `locdev db list` instead of the site's first one |
--allow-remote | Open a database on another host (it may be production) |
locdev db expire
Set or remove (`none`) a Redis/Valkey key's expiry, in seconds
<key> | |
<seconds> | Seconds, or `none` to keep the key forever |
<site> | |
--conn | A connection id from `locdev db list` instead of the site's first one |
--allow-remote | Open a database on another host (it may be production) |
locdev db expire cache:home 300
locdev db expire cache:home nonelocdev db del
Delete a Redis/Valkey key (asks first)
<key> | |
<site> | |
-y, --yes | |
--conn | A connection id from `locdev db list` instead of the site's first one |
--allow-remote | Open a database on another host (it may be production) |
locdev db create
Create a database on the site's server (the one its config names by default)
<site> | |
<database> | Name to create (default: the one the site's config names) |
--conn | A connection id from `locdev db list` instead of the site's first database |
locdev db create shop
locdev db create shop shop_testingOnly when you run it: a missing database is reported, never created on its own.
Config files
locdev config
A site's config files: options, analysis, history (comments are kept)
locdev config list
The site's config files (only the ones that exist)
<site> |
locdev config list
locdev config list shop --jsonOnly files that exist are listed; LocDev never creates a config file to fill the list.
locdev config show
A file's options as LocDev reads them, or its text with --text
<file> | A path from `locdev config list` (`vite.config.ts`, `src/app.css`) |
<site> | |
--text | Print the file instead of its options |
locdev config show vite.config.ts
locdev config show tsconfig.json --textJavaScript and TypeScript configs are parsed, never executed; values computed in code are shown as code and can only be changed in the text.
locdev config set
Change one option, keeping comments and formatting. Shows the diff first
<file> | |
<key> | Dotted option key (`server.port`, `compilerOptions.strict`) |
<value> | JSON literal (`true`, `5173`, `"bundler"`); anything else is text |
<site> | |
-y, --yes | Save without asking (the diff is still printed) |
locdev config set vite.config.ts server.port 5180
locdev config set tsconfig.json compilerOptions.moduleResolution '"bundler"'Comments and formatting are kept; the diff is shown before saving, options the installed version doesn't have are refused, and the previous content goes to the history.
locdev config check
Check the config against the installed versions; nothing is changed
<site> |
locdev config check
locdev config check --jsonEach finding names the versions it applies to and its official source. Nothing is changed; a suggested fix is a `locdev config set` you run yourself.
locdev config history
Versions LocDev kept before each save
<file> | |
<site> |
locdev config revert
Put a kept version back (the current one is kept too)
<file> | |
<id> | An id from `locdev config history` |
<site> | |
-y, --yes |
Deploy assistant
locdev deploy
Deploy assistant: platforms that fit, what they need, readiness. Sends nothing
locdev deploy analyze
What the site needs from a host, the platforms that fit and readiness checks
<site> |
locdev deploy analyze
locdev deploy check shop --jsonPlatforms are ranked by what the site needs (runtime, server rendering, WebSockets, workers, scheduler, databases, disk), never by popularity; each fact links its source. Variables are listed by name only. Nothing is sent to any platform.
locdev deploy config
Print the config file LocDev would write for a platform; --write creates it
<provider> | `render` or `netlify` (others set themselves up; the analysis says how) |
<site> | |
--write | Create the file (never over an existing one) |
-y, --yes | Write without asking |
locdev deploy config render
locdev deploy config netlify --writerender.yaml for Node.js apps and netlify.toml for static builds; secrets are declared for the platform to ask, never copied from .env. An existing file is never replaced.
locdev deploy platforms
Platforms LocDev talks to (Vercel, Netlify) and which are connected
locdev deploy connect
Connect a platform with a token (read from stdin, kept in the system keyring)
<platform> | |
--team | Vercel team (slug or team_… ID) the token acts for |
locdev deploy connect vercel --team acme
printf %s "$NETLIFY_TOKEN" | locdev deploy connect netlifyThe token is read from stdin (never an argument), checked against the platform first, and kept in the system keyring; only the account's name is written to disk.
locdev deploy disconnect
Forget a platform's token
<platform> |
locdev deploy projects
The platform's projects (Vercel) or sites (Netlify)
<platform> |
locdev deploy link
Link a site to a remote project (by ID or name)
<platform> | |
<project> | |
<site> |
locdev deploy link vercel shop
locdev deploy link netlify my-blog bloglocdev deploy unlink
Remove the site's link (nothing changes on the platform)
<site> |
locdev deploy status
The linked project: deployments, domains, variable names, and what a deploy would build
<site> |
locdev deploy status
locdev deploy status shop --jsonVariables are listed by name only; LocDev never asks the platform for their values.
locdev deploy run
Deploy the pushed commit of the site's branch (a preview unless --production)
<site> | |
--production | |
-y, --yes |
locdev deploy run
locdev deploy run shop --productionBuilds the commit the branch has pushed to GitHub. Uncommitted changes, unpushed commits, another repository, or --production on a branch other than the production one are refused, so what's deployed matches the code here. Vercel builds that exact commit; Netlify builds the branch through its own Git integration.
locdev deploy cancel
Cancel a deployment that is building
<deployment> | |
<site> |
locdev deploy rollback
Send production traffic back to an earlier deployment
<deployment> | |
<site> | |
-y, --yes |
locdev deploy rollback dpl_8Fk2… shopVercel: points production at that deployment. Netlify: publishes that deploy again.
locdev deploy logs
A deployment's build log (or the dashboard page that has it)
<deployment> | |
<site> |
locdev deploy logs dpl_8Fk2…Netlify's public API has no build logs: the command prints the deploy's page instead.
Mailbox
locdev mail
The Mailbox: e-mail your sites send, captured locally (nothing is delivered)
locdev mail status
The capture server: port and how many messages it holds
locdev mail list
Captured messages, newest first
<site> | Only this site's box |
-s, --search | Text to find in the subject, sender, recipients or preview |
--unread | |
--attachments | |
--limit | (default: 50) |
locdev mail list
locdev mail list shop --search invoice --unreadlocdev mail show
One message: envelope, headers, text, links, attachments and problems
<id> | |
--html | Print the HTML part instead |
--headers | Print every header |
locdev mail show 1793700000000
locdev mail show 1793700000000 --headers
locdev mail show 1793700000000 --html > mail.htmlThe envelope (MAIL FROM, RCPT TO, HELO, AUTH) is what the SMTP session said; Date and the rest come from the message. Problems are checks against RFC 5322 and MIME.
locdev mail raw
Save the message as received (.eml)
<id> | |
-o, --output | File to write; prints to stdout without it |
locdev mail raw 1793700000000 -o message.emllocdev mail attachment
Save an attachment
<id> | |
<index> | |
-o, --output |
locdev mail attachment 1793700000000 0 -o invoice.pdflocdev mail delete
Delete messages
<ids> |
locdev mail clear
Delete every message, or one site's
<site> | |
-y, --yes |
locdev mail setup
How the site sends mail now and what turning the Mailbox on changes
<site> |
locdev mail setup shopLaravel, PHP's mail() (WordPress) and stacks whose .env names SMTP_*/MAIL_*/EMAIL_* variables are wired through the process environment; Django, Rails and Node apps that set SMTP in code get the snippet to add.
locdev mail enable
Send the site's mail to the Mailbox (in its processes' environment only)
<site> | |
--override-real | Replace the project's real SMTP or API transport while it's on |
locdev mail enable shop
locdev mail enable shop --override-realOnly the site's processes get the variables; the project's files are never edited. A project pointing at a real mail server (another host, SES, Postmark…) is refused without --override-real.
locdev mail disable
<site> |
locdev mail test
Send a test message to the Mailbox (never anywhere else)
<site> |
locdev mail test
locdev mail test shopEmail Studio
locdev new email
A new email template (Laravel: a Mailable via `make:mail` plus its view), or a component
<name> | The template's name (`contact`, `order-shipped`) |
--site | The site; defaults to the one in the current folder |
--markdown | A Laravel Markdown mailable instead of a Blade view |
locdev new email contact
locdev new email order-shipped --markdown --site shop
locdev new email component buttonLaravel: runs `php artisan make:mail <Name>Mail --view=emails.<name>` (or --markdown) and fills the view with editable blocks; components go to resources/views/components/mail (<x-mail.name>). Other stacks: emails/<name>.html and emails/components/. Existing files are never overwritten.
locdev new email component
A reusable email component (Laravel: <x-mail.name>, props from @props)
<name> | |
--site |
locdev email
Email Studio: a site's email templates and components, previews and test sends
locdev email list
The site's email templates, mailables and components
<site> |
locdev email list
locdev email list shop --jsonlocdev email preview
Render a template with its sample data (static, or by the framework)
<path> | A path from `locdev email list` |
<site> | |
--framework | Let the framework render it (runs the project's code in a separate process) |
--text | Print the text version instead of the HTML |
locdev email preview resources/views/emails/welcome.blade.php > welcome.html
locdev email preview resources/views/emails/welcome.blade.php --framework --textThe static preview substitutes sample data without running anything (Blade logic isn't evaluated); --framework lets Laravel render it in a separate, time-limited process.
locdev email send-test
Render a template and send it to the Mailbox (never anywhere else)
<path> | |
<site> | |
--framework |
locdev email send-test resources/views/emails/welcome.blade.php --frameworklocdev email show
A template's blocks (LocDev's) and code (yours), variables and sample data
<path> | |
<site> |
locdev email block
Change a block's properties, like the visual editor (the diff is shown first)
<path> | |
<id> | The block's id (`locdev email show`) |
--set | `prop=value`; JSON values (`true`, `12`, `"…"`) are parsed as JSON |
--regenerate | Regenerate a block edited outside LocDev from its properties |
--site | |
-y, --yes |
locdev email block resources/views/mail/welcome.blade.php b2 --set text="Welcome!"locdev email edit
Edit the template in $VISUAL/$EDITOR; saved with history, only if nothing else changed it meanwhile
<path> | |
<site> |
Uses $VISUAL, then $EDITOR (vi; Notepad on Windows).
locdev email save
Replace the template with a file's content (history kept)
<path> | |
--from | The new content (`-` for stdin) |
--site | |
-y, --yes |
locdev email history
Versions LocDev kept before each save
<path> | |
<site> |
locdev email version
Print a kept version
<path> | |
<id> | |
--site |
locdev email restore
Put a kept version back (the current one is kept too)
<path> | |
<id> | |
--site | |
-y, --yes |
locdev email sample
Set the sample data previews use (a JSON object; kept by LocDev, not in the project)
<path> | |
<data> | A JSON file (`-` for stdin) |
--site |
locdev email sample resources/views/mail/welcome.blade.php sample.jsonGit, GitHub, Actions and security
locdev git
A site's Git repository: status, history, branches, stashes
locdev git status
Branch, upstream and changed files
<site> |
locdev git status
locdev git status shop --jsonlocdev git log
Recent commits
<site> | |
-n, --limit | (default: 20) |
locdev git log -n 50locdev git branches
Local and remote branches
<site> |
locdev git stashes
Stashes
<site> |
locdev git history
What HEAD did (reflog) and what LocDev ran
<site> |
Lists what LocDev ran (and refused) in this repository, and the reflog, which is how a reset or a deleted branch is undone.
locdev git diff
A file's changes (working tree, or the index with --staged)
<path> | |
--staged | |
--site |
locdev git diff src/app.ts
locdev git diff composer.json --stagedlocdev git show
One commit: message, files and diff
<sha> | |
--site |
locdev git remotes
The repository's remotes
<site> |
locdev git stage
Stage files for the next commit
<paths> | |
--site |
locdev git stage src/app.ts README.mdlocdev git unstage
Take files out of the index (their changes stay)
<paths> | |
--site |
locdev git discard
Throw away working-tree changes in files (untracked ones are deleted)
Throw away working-tree changes in files (untracked ones are deleted). Destructive: shows what is lost and asks for the confirmation phrase (and the LocDev password, when one is set).
<paths> | |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git discard src/app.ts
locdev git discard tmp.txt --confirm "discard 1 file"Destructive: shows what is lost, asks for the phrase and the LocDev password (when set); a backup is saved first when backups are on.
locdev git commit
Commit what is staged
-m, --message | |
--site |
locdev git commit -m "fix: checkout total"locdev git branch
Create a branch (from HEAD, or --from)
<name> | |
--from | |
--switch | Switch to it right away |
--site |
locdev git branch feature/cart --switchlocdev git switch
Switch to a branch
<name> | |
--site |
locdev git delete-branch
Delete a local branch (--force when it isn't merged)
<name> | |
--force | |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git merge
Merge a branch into the current one
<branch> | |
--site |
locdev git merge-abort
Abort a merge in progress
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git fetch
Fetch from a remote (every remote when omitted)
<remote> | |
--site |
locdev git pull
Pull, fast-forward only: never creates a merge on its own
--site |
locdev git push
Push the current branch (asks first: it changes the remote)
--force | --force-with-lease: rewrites the remote branch |
-y, --yes | Do not ask before pushing |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git push
locdev git push --force--force uses --force-with-lease and is previewed as destructive.
locdev git worktree
Working trees: each branch in its own folder, optionally as its own site
locdev git worktree list
The repository's working trees and the LocDev site of each
--site |
locdev git worktree listlocdev git worktree add
Check out a branch in a new folder (next to the repository as `<repo>-<branch>` unless --path)
<branch> | |
-b, --create | Create the branch (from --from, or HEAD) |
--from | |
--path | An absolute folder for it |
--site-for-it | Register the folder as a LocDev site |
--copy-env | Copy the untracked .env files the new folder lacks |
--site |
locdev git worktree add feature/login --create --site-for-it --copy-env
locdev git worktree add hotfix --path /src/shop-hotfixThe folder goes next to the repository as <repo>-<branch> unless --path; with --site-for-it it becomes its own site (<repo>-<branch>.test), so two branches run side by side.
--copy-env copies the untracked .env files of the main folder that the new one lacks; it never overwrites.
locdev git worktree remove
Delete a working tree's folder (and its LocDev site). Destructive: shows what is lost and asks for the folder name
<path> | |
--force | Even with uncommitted changes |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git worktree remove ../shop-feature-loginDestructive: the folder is deleted (its branch and commits stay). Uncommitted changes block it unless --force; a snapshot of tracked changes goes under refs/locdev/backups/ first.
locdev git worktree prune
Forget working trees whose folders are gone
--site |
locdev git stash
Stashes: save, apply, pop, drop
locdev git stash push
Save the working tree's changes in a new stash
-m, --message | |
-u, --untracked | Include untracked files |
--site |
locdev git stash push -m "wip" --untrackedlocdev git stash apply
Apply a stash and keep it
<index> | |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git stash pop
Apply a stash and drop it
<index> | |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git stash drop
Delete a stash
<index> | |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git remote
Remotes: add, remove, change the URL
locdev git remote add
<name> | |
<url> | |
--site |
locdev git remote remove
The site and, for scripts, the confirmation of a destructive operation
<name> | |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git remote set-url
<name> | |
<url> | |
--site |
locdev git revert
A new commit that undoes another (history is kept)
<sha> | |
--site |
locdev git restore
Put files back as they were at a commit (in the working tree)
<sha> | |
<paths> | |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git reset
Move the branch to another commit (soft, mixed or hard)
<target> | |
--mode | (default: mixed) |
--site | |
--confirm | The phrase the preview asks for, to confirm without a terminal |
locdev git reset HEAD~1
locdev git reset origin/main --mode hardlocdev github
The GitHub account LocDev uses for issues, pull requests and workflows
locdev github status
The connected account
locdev github connect
Connect with a personal access token (read from stdin) or the GitHub CLI
--gh | Copy the token of a logged-in GitHub CLI (gh auth token), once |
locdev github connect < token.txt
locdev github connect --ghThe token goes to the system keyring (Secret Service, Keychain, Windows Credential Manager), never to a file. With no keyring available, connecting fails.
locdev github disconnect
Forget the token (removes it from the system keyring)
locdev github login
Connect in the browser with a one-time code (OAuth device flow)
Needs an OAuth App client id in LocDev's build; otherwise connect with a token (`locdev github connect`).
locdev github show
The site's repository on GitHub: overview, issues, pull requests, runs…
<section> | (default: overview) |
<site> |
locdev github show
locdev github show runs
locdev github show pulls shoplocdev github rerun
Re-run the failed jobs of a workflow run (asks first)
<run> | |
--site | |
-y, --yes |
locdev github cancel-run
Cancel a workflow run (asks first)
<run> | |
--site | |
-y, --yes |
locdev github dispatch
Start a workflow that has a workflow_dispatch trigger (asks first)
<workflow> | The workflow's id (`locdev github show workflows`) |
--ref | The branch or tag to run on (the default branch when omitted) |
--site | |
-y, --yes |
locdev github dispatch 1234567 --ref mainlocdev actions
GitHub Actions workflows: templates, checks, new files
locdev actions list
Templates that fit the site, and its workflow files
<site> |
locdev actions list
locdev actions list shop --jsonlocdev actions new
A workflow from a template, printed (or saved with --save)
<template> | |
<site> | |
--file | File name under .github/workflows/ (the template's by default) |
--save | Write it, after showing the file and the checks. Never replaces a file |
-y, --yes | Do not ask before saving |
locdev actions new node-ci
locdev actions new php-ci --save
locdev actions new pages --file deploy.yml --savePrints the workflow and its checks. --save creates the file after asking, and never replaces one: edit existing files in the app, which shows the diff.
locdev actions validate
Check the site's workflow files (or one of them, or any YAML file)
<site> | |
--file | Only this file (e.g. ci.yml) |
--yaml | Check a YAML file from disk instead (`-` for stdin); no site needed |
locdev actions validate
locdev actions validate --file ci.ymlStructure, script injection, pull_request_target, token permissions, unpinned and outdated actions; actionlint too when it is on PATH. Exits with 1 when there are errors.
locdev actions save
Write a workflow you edited as .github/workflows/<file>: the diff and the checks first; an existing file is replaced only as it was reviewed
<file> | File name under .github/workflows/ (e.g. ci.yml) |
--from | The YAML to write (`-` for stdin) |
--site | |
-y, --yes |
locdev actions save ci.yml --from ./ci.ymllocdev actions versions
The action versions templates use; --refresh asks GitHub
--refresh |
locdev actions history
Local versions LocDev kept of a workflow file; --show prints one
<file> | File name under .github/workflows/ (e.g. ci.yml) |
<site> | |
--show | A version id from the list |
locdev actions history ci.yml
locdev actions history ci.yml --show 1763900000000-savedLocDev keeps a version when it reads a workflow changed outside it and around every save (50 per file).
locdev actions install-actionlint
Download actionlint (verified) so validation uses it
locdev actions install-actionlintFrom rhysd/actionlint's latest GitHub release; installed only when the release's checksums file and GitHub's digest agree on the SHA-256.
locdev security
The password that guards destructive operations in LocDev
locdev security status
Whether a password guards destructive operations
locdev security password
Set, change or remove the password (asked on the terminal)
--remove | Remove the password |
locdev security password
locdev security password --removeOnly an Argon2id hash is stored. It protects operations started through LocDev (the app, the CLI); Git itself in a terminal is not affected.
locdev security options
Whether destructive operations ask for the password, and back up first
--require-password | Ask for the password on destructive operations (when one is set) |
--backups | Save a backup before destructive operations |
locdev security options
locdev security options --backups trueSystem integration
locdev settings
Automation, notification and network settings
locdev settings show
Automation, notification and network settings
locdev settings set
Change one setting, e.g. `automation.audit weekly` or `network.offline true`
<key> | |
<value> |
locdev settings set automation.audit weekly
locdev settings set network.offline on
locdev settings set notifications.native on
locdev settings set env.conflicts any_file
locdev settings set automation.definitions offlocdev startup
Start the daemon at login (per user, no administrator rights)
locdev startup status
Show whether the daemon starts at login
locdev startup install
Start the daemon at login
systemd --user on Linux, a LaunchAgent on macOS, the Run key on Windows. No administrator rights.
Was `locdev service install` until 0.3; that still works without a service name.
locdev startup uninstall
Stop starting the daemon at login
