
This guide will help you get started with pflow in just a few minutes.
Installation
Install pflow using the install script:
curl -fsSL https://pflow.run/install.sh | shOr if you prefer using npm:
npm install -g @pflow/cliYour First Workflow
Create a simple workflow that fetches weather data:
import { workflow, http, shell } from "@pflow/core";
const getWeather = workflow("get-weather")
.input({ city: "string" })
.pipe(
http.get("https://api.weather.com/v1/current", {
params: { q: "${city}" },
})
)
.pipe(
shell.run('echo "Temperature: ${response.temp}°C"')
);
export default getWeather;Compiling Workflows
Once you've defined your workflow, compile it to a deterministic CLI command:
pflow compile ./workflows/get-weather.tsThis generates an optimized, standalone executable that runs without any AI inference.
Configuration
Create a pflow.config.ts file in your project root:
import { defineConfig } from "@pflow/cli";
export default defineConfig({
// Output directory for compiled workflows
outDir: "./dist",
// Enable verbose logging
verbose: true,
// Node types to enable
nodes: ["http", "shell", "mcp"],
});Next Steps
- Check out the examples repository
- Read the API reference
- Join our Discord community
Happy building! 🚀
