lokl init
Scan your project and generate a lokl.yaml configuration file.
lokl initWhat It Does
Section titled “What It Does”- Scans your project directory for services
- Detects package manager (pnpm, yarn, npm, bun)
- Finds runnable scripts in package.json files
- Infers ports from scripts or known tool defaults
- Prompts for script selection and configuration
- Generates a clean
lokl.yamlfile
Supported Detection
Section titled “Supported Detection”Currently supports Node.js projects:
- Monorepos with
apps/andpackages/directories - Single-app projects
- Package managers: pnpm, yarn, npm, bun
Example Session
Section titled “Example Session”$ lokl initScanning project...
Detected 2 service(s): - api (apps/api) - frontend (apps/frontend)
─── api ─── Available scripts: [1] dev [2] start [3] test [0] Skip this service Select script [1]: 1 Port (required): 3000
─── frontend ─── Available scripts: [1] dev [2] build [0] Skip this service Select script [1]: 1 Port [5173]:
Base domain [my-project.dev]:
✓ Created lokl.yaml✓ Run 'lokl up' to start your environmentPort Detection
Section titled “Port Detection”Ports are inferred from:
- Script flags —
--port 3000,-p 3000,PORT=3000 - Tool defaults — vite (5173), next (3000), etc.
- Manual input — Prompted if not detected