Skip to content

rf init

rf init creates a new Radhflow project directory with a pipeline definition, sample data, and a .gitignore. If the directory already contains a pipeline.rf.yaml, the command exits without overwriting.

Terminal window
rf init [directory]

If directory is omitted, the current directory is used.

FlagDescription
--name <name>Set the pipeline name. Defaults to the directory name.
--template <template>Use a starter template: blank, csv-filter, api-fetch. Default: blank.
--no-gitSkip Git initialization.
my-pipeline/
pipeline.rf.yaml # pipeline definition
data/
sample.csv # sample input data (non-blank templates)
.gitignore # ignores artifacts/, .rf/
name: my-pipeline
version: 1
nodes: {}
name: my-pipeline
version: 1
nodes:
read-data:
type: source
op: file.read
params:
path: data/sample.csv
format: csv
outputs:
rows:
type: Table
filter:
type: deterministic
op: sql.query
params:
query: "SELECT * FROM rows WHERE score >= 50"
inputs:
rows:
type: Table
from: ref(read-data.rows)
outputs:
filtered:
type: Table
write-output:
type: deterministic
op: file.write
params:
path: output/filtered.json
format: json
inputs:
data:
type: Table
from: ref(filter.filtered)
artifacts/
.rf/
*.ndjson
!data/**/*.ndjson
Terminal window
$ rf init lead-scoring --template csv-filter
Created lead-scoring/
pipeline.rf.yaml pipeline definition (csv-filter template)
data/sample.csv sample input data
.gitignore configured
Initialized Git repository.
Next steps:
cd lead-scoring
rf run
  • If the target directory does not exist, rf init creates it.
  • If pipeline.rf.yaml already exists, the command exits with an error.
  • Git is initialized with an initial commit unless --no-git is passed.
  • Template files are written but never overwrite existing files.