Skip to content

rf init

Terminal window
rf init [name] [options]

rf init creates a new project directory with a flow.yaml scaffold, a .rf/ runtime directory, and a .gitignore. If name is omitted, the current directory is used.

If the target directory already contains a flow.yaml, the command exits without overwriting.

FlagDefaultDescription
--template <name>blankStarter template: blank, csv-filter, api-fetch.
--no-gitSkip Git initialization.
--dir <path>.Create the project in a specific directory instead of using the name.
Terminal window
$ rf init lead-scoring
Created lead-scoring/
flow.yaml pipeline definition (blank template)
.rf/ runtime directory
.gitignore configured
Initialized Git repository.
Next steps:
cd lead-scoring
rf run
Terminal window
$ rf init lead-scoring --template csv-filter
Created lead-scoring/
flow.yaml pipeline definition (csv-filter template)
data/sample.csv sample input data
.rf/ runtime directory
.gitignore configured
Initialized Git repository.
Next steps:
cd lead-scoring
rf run
Terminal window
$ mkdir my-project && cd my-project
$ rf init --dir .
Created flow.yaml, .rf/, .gitignore in current directory.
my-project/
flow.yaml # pipeline definition
.rf/ # runtime directory (logs, state, artifacts)
data/ # sample input data (non-blank templates only)
sample.csv
.gitignore # ignores .rf/, artifacts/
name: my-project
version: 1
nodes: {}
name: my-project
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)
.rf/
artifacts/
*.ndjson
!data/**/*.ndjson
ErrorCause
Directory "foo" already contains flow.yamlA project already exists at that path. Pick a different name or delete the existing file.
Invalid project name "..."Names must be lowercase alphanumeric with hyphens. No spaces, no special characters.
Cannot create directory "..."Parent directory doesn’t exist or you don’t have write permissions.
CodeMeaning
0Project created successfully.
1Directory already contains flow.yaml.
2Invalid project name.