Examples
Browse copy-ready examples and generate a high-quality AI prompt that helps your coding agent produce a real flowlayer.jsonc for your project. Paste your repo paths, copy the prompt, send it to Claude, ChatGPT, or Copilot.
Need the full configuration reference? → Configuration
Project Roots
One path per line
- check_circle Paste repo roots, service dirs, or monorepo packages
- check_circle Works with any language, framework, or stack
- check_circle Prompt prevents service and port hallucination
Generated Prompt
Ready to paste into any coding agent
Enter at least one path
to generate your prompt
Tested with Claude 3.5+, GPT-4o, and GitHub Copilot. For best results, give the agent read access to your file system.
Common runtime situations
Reusable FlowLayer snippets for common runtime situations.
TCP Probe
Wait for a TCP port to accept connections before starting dependents. Use for databases and any non-HTTP service.
{ "services": { "db": { "cmd": "docker compose up db", "stopCmd": "docker compose down db", "port": 5432, "ready": { "type": "tcp", "port": 5432 } } } }
HTTP Health
Poll an HTTP endpoint until it returns a 2xx response. Use for API services that expose a health route.
{ "services": { "api": { "cmd": "node dist/server.js", "port": 3001, "ready": { "type": "http", "url": "http://localhost:3001/health" } } } }
One-shot
Run a command once and exit — migrations, seed steps, or build tasks. Dependents wait for it to complete successfully.
{ "services": { "db": { "cmd": "docker compose up db", "stopCmd": "docker compose down db", "ready": { "type": "tcp", "port": 5432 } }, "migrate": { "kind": "oneshot", "cmd": "npx prisma migrate deploy", "dependsOn": ["db"] } } }
Watch Mode
Long-running dev process with file watching. Use your project's real dev script when available — this snippet shows the pattern. --preserveWatchOutput keeps NestJS logs readable across recompiles.
{ "services": { "api": { "cmd": "npx nest start --watch --preserveWatchOutput", "port": 3000 } } }
Workers
Background queue worker that starts after its dependency. No readiness probe — workers don't expose a port.
{ "services": { "worker": { "cmd": "python -m celery -A app.tasks worker --loglevel=info", "dependsOn": ["broker"] } } }
Docker
Manage a Docker service with cmd and stopCmd. The live-logs form streams output so FlowLayer captures it.
{ "services": { "redis": { // Start detached, then stream logs so FlowLayer captures output "cmd": ["sh", "-c", "docker compose up redis -d && docker compose logs -f redis"], "stopCmd": "docker compose down redis", "port": 6379, "ready": { "type": "tcp", "port": 6379 } } } }
Shell
Use ["sh", "-c", "..."] for lightweight portability — cd, && chaining, no surprises. Use ["bash", "-lc", "..."] when you need login-shell behavior: sourcing .nvm, version managers, or your full dev environment.
sh -c — portable
{ "services": { "api": { "cmd": ["sh", "-c", "cd packages/api && pnpm dev"], "port": 3001 } } }
bash -lc — login shell / nvm
{ "services": { "frontend": { "cmd": ["bash", "-lc", "source ~/.nvm/nvm.sh && nvm use 22 >/dev/null && pnpm dev"], "port": 5173 } } }
Dependencies
Chain services so each waits for the previous. Here: database → migration → API.
{ "services": { "db": { "cmd": "docker compose up db", "stopCmd": "docker compose down db", "ready": { "type": "tcp", "port": 5432 } }, "migrate": { "kind": "oneshot", "cmd": "npx prisma migrate deploy", "dependsOn": ["db"] }, "api": { "cmd": "node dist/server.js", "port": 3001, "dependsOn": ["migrate"], "ready": { "type": "http", "url": "http://localhost:3001/health" } } } }
Environment
Inject service-specific variables with env. Ideal for local URLs, feature flags, credentials, and runtime toggles. Values are available to both cmd and stopCmd.
{ "services": { "web": { "cmd": "pnpm dev", "port": 5173, "env": { "VITE_API_URL": "http://localhost:3001", "FEATURE_BETA": "true" } }, "worker": { "cmd": "python -m worker", "env": { "DATABASE_URL": "postgresql://localhost:5432/mydb", "WORKER_CONCURRENCY": "4" } } } }
Event Stack
Bring up Kafka first, then start producers and consumers that wait on real infra readiness. This models a local event-driven stack with explicit boot ordering.
{ "services": { "kafka": { "cmd": "docker compose up kafka", "stopCmd": "docker compose down kafka", "ready": { "type": "tcp", "port": 9092 } }, "api": { "cmd": "pnpm --dir ./apps/api dev", "port": 3001, "dependsOn": ["kafka"], "env": { "KAFKA_BROKERS": "localhost:9092" } }, "worker": { "cmd": "go run ./cmd/worker", "dependsOn": ["kafka"], "env": { "KAFKA_BROKERS": "localhost:9092" } } } }
Ephemeral Job
Run disposable tooling in a container before booting the app. A reproducible one-shot gate keeps local workflows clean and consistent.
{ "services": { "go-test": { "kind": "oneshot", "cmd": [ "docker", "run", "--rm", "-v", "./:/workspace", "-w", "/workspace", "golang:1.24", "go", "test", "./..." ] }, "api": { "cmd": "go run ./cmd/api", "dependsOn": ["go-test"], "port": 8080, "ready": { "type": "http", "url": "http://localhost:8080/healthz" } } } }
Build Steps
Build a shared package before starting dependent services. Use kind: "oneshot" and dependsOn so services wait for the build to complete — a natural fit for monorepos.
{ "services": { "build-shared": { "kind": "oneshot", "cmd": "pnpm --filter @myapp/shared build" }, "api": { "cmd": "pnpm --dir ./apps/api dev", "port": 3001, "dependsOn": ["build-shared"] }, "web": { "cmd": "pnpm --dir ./apps/web dev", "port": 5173, "dependsOn": ["build-shared"] } } }
Python Logs
Python buffers stdout by default — output won't appear in FlowLayer until the buffer flushes. Pass -u or set PYTHONUNBUFFERED=1 to stream logs in real time.
Via flag
{ "services": { "worker": { "cmd": "python -u worker.py" } } }
Via env
{ "services": { "worker": { "cmd": "python worker.py", "env": { "PYTHONUNBUFFERED": "1" } } } }
Monorepo
Run a service from a subdirectory without a shell wrapper when your tooling supports --prefix or --dir. Direct commands are more reliable than cd && ....
{ "services": { "web": { // npm supports --prefix — no shell wrapper needed "cmd": ["npm", "--prefix", "./apps/web", "run", "dev"], "port": 3000 }, "api": { // pnpm supports --dir "cmd": ["pnpm", "--dir", "./apps/api", "dev"], "port": 3001 } } }
Port Wait
Wait for a dependency that lives outside FlowLayer — a shared database, a remote queue, or a service on another machine. A shell wrapper probes the TCP port in a loop, then hands off.
{ "services": { "api": { // Polls port 5432 until the external DB accepts connections, then starts "cmd": [ "sh", "-c", "until nc -z localhost 5432; do sleep 1; done && node dist/server.js" ], "port": 3001 } } }
Don't have FlowLayer yet?
Install it in seconds and run your first configuration.
download Download FlowLayer