Quick Start
Run flowgen
After installing flowgen, run:
flowgen The first run creates the workspace ~/flowgen, a git repository, and opens the web UI at http://127.0.0.1:8080/flowgen/:
~/flowgen/
├── flows/ one flow per YAML file
│ └── system/ the commit, release and deploy flows and Flowgen Agent
└── resources/ scripts, SQL and templates the flows read flowgen <folder> or FLOWGEN_HOME runs another workspace. flowgen --help lists the commands.
Your first flow
Create ~/flowgen/flows/hello.yaml:
flow:
tasks:
- generate:
name: ticker
interval: 5s
payload:
message: hello from flowgen
- script:
name: transform
code: |
#{
original: event.data.message,
uppercased: event.data.message.to_upper(),
processed_at: timestamp_to_iso(timestamp_now())
}
- log:
name: output Check it, then commit it:
cd ~/flowgen
flowgen validate
git add flows/hello.yaml
git commit -m "Add hello flow" Flowgen runs what is committed: within a minute it releases the commit and starts the flow. Every 5 seconds generate emits an event, script reshapes it and log prints it in the terminal where flowgen runs. The flow appears on the Flows page of the web UI with its graph and activity. A file that is not committed does not run. A change made in the web UI runs once it is approved, which commits it.
Next steps
- Flows: how tasks connect.
- Script (Rhai): the scripting API, and
flowgen testto run a script on sample events. - Configuration: running with
--config, as in a cluster, with the full config reference. - Kubernetes.