Welcome to FlowMason! In this tutorial, you’ll install FlowMason, set up your development environment, and run your first AI pipeline.
What You’ll Learn
- Install FlowMason CLI and VSCode extension
- Create a new FlowMason project
- Understand the project structure
- Run your first pipeline
Step 1: Install FlowMason CLI
Open your terminal and install FlowMason using pip:
pip install flowmason
Verify the installation:
fm --version
You should see output like:
flowmason 0.7.3
Step 2: Install VSCode Extension
The VSCode extension provides IntelliSense, debugging, and visual editing for FlowMason pipelines.
From Command Line
code --install-extension flowmason.flowmason
From VSCode
- Open VSCode
- Press Cmd+Shift+X to open Extensions
- Search for “FlowMason”
- Click Install
Step 3: Create a New Project
Create a new FlowMason project:
fm init my-first-project
cd my-first-project
This creates the following structure:
my-first-project/
├── flowmason.json # Project configuration
├── components/ # Custom components
│ ├── nodes/ # AI-powered nodes
│ └── operators/ # Utility operators
├── pipelines/ # Pipeline definitions
│ └── main.pipeline.json # Sample pipeline
└── tests/ # Pipeline tests
Step 4: Explore the Project
Open the project in VSCode:
code .
flowmason.json
This file configures your project:
{
"name": "my-first-project",
"version": "1.0.0",
"components": {
"nodes": ["components/nodes/**/*.py"],
"operators": ["components/operators/**/*.py"]
}
}
Sample Pipeline
Open pipelines/main.pipeline.json to see a simple pipeline:
{
"name": "hello-world",
"version": "1.0.0",
"stages": [
{
"id": "greet",
"component": "generator",
"config": {
"prompt": "Say hello in a creative way!"
}
}
]
}
Step 5: Start FlowMason Studio
Studio is the backend service that executes pipelines:
fm studio start
You’ll see:
FlowMason Studio starting...
✓ API server running at http://localhost:8999
✓ WebSocket server ready
✓ Database initialized
Keep this terminal open while developing.
Step 6: Run Your First Pipeline
Using the CLI
fm run pipelines/main.pipeline.json
Using VSCode
- Open
pipelines/main.pipeline.json - Press F5 to run
You should see the AI-generated greeting in the output!
Step 7: Try Debugging
- Click in the gutter next to the “greet” stage to set a breakpoint
- Press F5 to start debugging
- When paused, inspect the Variables panel
- Press F5 to continue
What’s Next?
You’ve successfully set up FlowMason and run your first pipeline. In the next tutorial, you’ll build a more complex pipeline with multiple stages.
Key concepts covered:
- FlowMason CLI installation
- VSCode extension setup
- Project initialization
- Studio backend
- Pipeline execution
- Basic debugging
Ready for more? Continue to Building Your First Pipeline.