Skip to content
DocsConfig layers

Config layers

A project’s settings can come from three files. lpm merges them every time it loads the project, so your team can share one setup while you keep personal tweaks out of the repo. Higher layers win.
  1. Your project file~/.lpm/projects/<name>.yml

    Everything: root or ssh, services, actions, terminals, zones, profiles. Personal — stays outside the repo. The User tab in the app’s config editor.

  2. Repo config<project root>/.lpm.yml

    Services, actions, terminals, zones, profiles. Shared — commit it with the code. The Repo tab in the app’s config editor.

  3. Global config~/.lpm/global.yml

    Actions, 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:

~/Projects/shop/.lpm.yml
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:

~/.lpm/projects/shop.yml
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.