Config layers
- Your project file
~/.lpm/projects/<name>.ymlEverything: root or ssh, services, actions, terminals, zones, profiles. Personal — stays outside the repo. The User tab in the app’s config editor.
- Repo config
<project root>/.lpm.ymlServices, actions, terminals, zones, profiles. Shared — commit it with the code. The Repo tab in the app’s config editor.
- Global config
~/.lpm/global.ymlActions, terminals, and zones. Every project on this computer. The Global tab in the app’s config editor.
Sharing a setup with your team. Commit a .lpm.yml at the root of the repository. Anyone who adds the folder to lpm gets its services, actions, terminals, and profiles — no name or root needed, since those come from each person’s own project file:
services:
web:
cmd: npm run dev
port: 3000
api:
cmd: npm run api
cwd: ./server
port: 4000
actions:
test: npm test
migrate:
cmd: npm run db:migrate
label: Migrate DB
confirm: true
profiles:
frontend: [web]
full: [web, api]
Overriding one field. Entries with the same key merge field by field: whatever the higher layer sets wins, and anything it leaves out comes from the layer below. To run the shared web service on another port, override its command and port in your own file — everything else about it still comes from the repo:
name: shop
root: ~/Projects/shop
services:
web:
cmd: npm run dev -- --port 3100 # wins over the repo's cmd
port: 3100 # and its port; the rest is inherited
Good to know
Maps like env are replaced whole, not merged key by key — if you override env, repeat every variable you still need. An overridden service doesn’t inherit the lower layer’s dependsOn, a profile with the same name replaces the lower one outright, and an action’s confirm: true can’t be switched off from a higher layer.
The repo layer applies to local projects only; SSH projects have no .lpm.yml. A duplicate also inherits from the project it was copied from, which sits between your file and the repo layer. Each layer can also pull in templates, which sit just below the file that names them.