Skip to content
DocsRecipes

Recipes

Full working configs you can copy and adapt. The reference pages each show one concept in isolation; the recipes here stitch services and actions together into configs that mirror how a real project looks on day one. Find the one closest to your stack, paste it into a new project, and tweak from there.

Minimal blog. Start here if you just want one dev server and nothing else — a personal blog, a tiny side project, the “hello world” version of lpm. One service, no actions, no ceremony.

~/.lpm/projects/blog.ymlvalid
name: blog
root: ~/Projects/blog
services:
  web: npm run dev # the only thing you need to hit Start

Blog with tests and linting. Add this when your tests, linter, or build start taking long enough that retyping them feels wasteful. Same dev server as above, plus three one-click buttons in the toolbar.

~/.lpm/projects/blog.ymlvalid
name: blog
root: ~/Projects/blog
services:
  web: npm run dev
actions:
  # one-click buttons for the chores you used to retype
  test: npm test
  lint: npm run lint
  build: npm run build

Next.js plus a Node API. For the classic two-process web app: a Next.js front-end in the project root and a Node backend in ./server. Shows how to set cwd per service, label a port, add a guarded deploy, and pin a log tail to its own terminal tab.

~/.lpm/projects/webapp.ymlvalid
name: webapp
root: ~/Projects/webapp
services:
  web: npm run dev # Next.js front-end
  server:
    cmd: node server.js # API the front-end talks to
    cwd: ./server # lives in a subfolder
    port: 4000 # label for the Start menu and Open in browser
actions:
  deploy:
    cmd: ./scripts/deploy.sh
    confirm: true # ask before shipping
  logs:
    cmd: tail -f ./logs/server.log # keep server logs one click away
    type: terminal

Next.js with dev env vars. Pick this when your app needs a handful of environment variables to boot locally and you’re tired of remembering them. lpm sets them every time the service starts — keep real secrets in your own .env file, not here.

~/.lpm/projects/webapp.ymlvalid
name: webapp
root: ~/Projects/webapp
services:
  web:
    cmd: npm run dev
    port: 3000
    env:
      # dev-only values — real secrets belong in your own .env
      API_URL: http://localhost:4000
      NEXTAUTH_SECRET: dev-secret
      NODE_ENV: development

Monorepo with an app and docs. For a repo that holds more than one thing you want running at once — say an app in apps/web and a docs site in apps/docs. Both services live under one project and start together, each from its own folder.

~/.lpm/projects/mono.ymlvalid
name: mono
root: ~/Projects/mono
services:
  web:
    cmd: npm run dev
    cwd: ./apps/web # one app in the monorepo
    port: 3000
  docs:
    cmd: npm run dev -- --port 3001 # lpm doesn't pass the port for you
    cwd: ./apps/docs # another app, started together
    port: 3001

How to use a recipe

Copy the one closest to your stack, change name and root to match your project, then swap in your own commands. If a piece looks unfamiliar, open its reference page in the sidebar and tinker with the playground there.