Example

Suppose your project has this structure:

src
├── backend
│   ├── database
│   └── server
└── frontend
    ├── lib
    └── ui

Each bottom-level component (ui, lib, server, database) can be started on its own.

1. Initialize the Project

From your repo root, run:

curo repo init > curo.toml

This prints a starter curo.toml for you to fill in.

2. Top-level curo.toml

Open the root curo.toml. For this layout:

curo_toml_version = "2.1.0"

[about]
name = "node-monorepo"
description = "Full-stack monorepo with Node.js frontend/backend and PostgreSQL database"
code_dir = "src"
components = ["frontend", "backend"]

[dev]
format = "prettier --write ."
lint = "eslint ."
  • code_dir = "src" tells curo all code lives in src/.
  • components lists the first-level folders in src/, in execution order.

3. src/frontend/curo.toml

curo_toml_version = "2.1.0"

[about]
name = "frontend"
components = ["ui", "lib"]

4. src/backend/curo.toml

curo_toml_version = "2.1.0"

[about]
name = "backend"
components = ["server", "database"]

5. Bottom-level curo.tomls

For src/frontend/ui/curo.toml:

curo_toml_version = "2.1.0"

[about]
name = "ui"

[dev]
install = "npm install"
start = "npm run start"

For src/frontend/lib/curo.toml:

curo_toml_version = "2.1.0"

[about]
name = "lib"

[dev]
install = "npm install"
build = "npm run build"

For src/backend/server/curo.toml:

curo_toml_version = "2.1.0"

[about]
name = "server"

[runtime.db]
start = "docker compose up -d --wait db"
exec = "docker compose exec db"
stop = "docker compose down"

[dev]
install = "npm install"
start = "npm run start"
test = { cmd = "npm run test", in = "db" }

The server's tests declare they run with the database up: curo test backend/server starts the db runtime, runs the tests inside it, and tears it down afterwards.

For src/backend/database/curo.toml:

curo_toml_version = "2.1.0"

[about]
name = "database"

[dev]
start = "docker compose up -d db"
stop = "docker compose down"

6. Example Usage

  • Install everything:
    curo install
    
  • Format all code:
    curo format
    
  • Lint all code:
    curo lint
    
  • Start just the server:
    curo start backend/server
    
  • Start the UI:
    curo start frontend/ui
    
  • Start only the database:
    curo start backend/database
    
  • Start everything:
    curo start