Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 51 additions & 7 deletions website/content/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,48 @@ title: "Getting Started"

## Requirements

- **Node.js** >= 18 ([download](https://nodejs.org))
- **Node.js** >= 20 ([download](https://nodejs.org))
- **Docker** with daemon running ([download](https://docs.docker.com/get-docker/))

## Install

Install both the orchestrator and the execution server:

```bash
npm install -g light-process
npm install -g light-process @enixcode/light-run
```

`light-process` delegates container execution to `light-run`. Two usage modes:

- **All-in-one (default):** leave `LIGHT_RUN_URL` unset. `light serve` and `light run` auto-spawn a local `light-run` process on a free port (requires the binary above).
- **Explicit runner:** start `light-run serve` yourself, then point `LIGHT_RUN_URL` at it. Useful when the runner lives on a separate host or you want to share it across terminals.

Verify your environment:

```bash
light doctor
```

Expected output:
Expected output when `LIGHT_RUN_URL` is unset (all-in-one mode):

```
Checking environment...

[ok] Node.js: v20.x.x
[warn] LIGHT_RUN_URL: not set (all-in-one mode)
[ok] light-run binary: found - `light serve` will start it automatically

[ok] Ready (all-in-one)
```

When `LIGHT_RUN_URL` is set and the runner is reachable:

```
Checking environment...

[ok] Node.js: v20.x.x
[ok] Docker: Docker version 24.x.x
[ok] Docker daemon: running
[ok] LIGHT_RUN_URL: http://localhost:3001
[ok] light-run /health: reachable

[ok] Ready
```
Expand Down Expand Up @@ -107,13 +126,19 @@ light describe example

Outputs a text tree and generates `describe.html` with an interactive Mermaid diagram.

## Start the dashboard
## Start the server

```bash
light serve --port 3000
```

Open `http://localhost:3000` to see the web dashboard with your workflow DAG.
This starts the REST API server. The web dashboard (`ui/out/`) is **not built by default** - if it is absent, `GET /` returns 404 and a warning is printed at startup. To build the UI:

```bash
cd ui && npm install && npm run build
```

Once built, open `http://localhost:3000` to see the web dashboard.

## Add a new node

Expand All @@ -124,6 +149,25 @@ light init --node ./transform

This creates a `transform/` folder with `.node.json`, `index.js`, `lp.js`, and auto-registers it in `workflow.json`.

Wire it to the existing `hello` node so output flows from one to the other:

```bash
cd ..
light link example --from hello --to transform
```

Verify the links were added:

```bash
light link example --list
```

Use `--when` to add a condition (link fires only when the condition matches):

```bash
light link example --from hello --to transform --when '{"status": "ok"}'
```

## Add a Python node

```bash
Expand Down
Loading