Start here
Quickstart
Run your first Compaos workflow locally in about five minutes.
What you’ll build
You’ll create a small workflow, run it locally, and inspect its result. You need Node.js 20 or newer and a Compaos account.
1. Create a project
Create a new directory and initialize the Compaos starter:
npx create-compaos@latest hello-compaos
cd hello-compaos
The starter includes a workflow, an environment template, and a local runner. It does not send data anywhere until you connect an integration.
2. Add your API key
Copy the environment template, then add a project-scoped key from Settings → API keys.
cp .env.example .env.local
COMPAOS_API_KEY=cmp_live_your_key
Keep .env.local out of source control. The starter’s .gitignore already excludes it.
3. Run the workflow
npm install
npm run dev
Open the local URL shown in your terminal, submit a sample request, and inspect each step in the run timeline.
4. Make it yours
Edit src/workflows/hello.ts and change the response template. Saved changes are picked up automatically by the local runner.
import { workflow } from '@compaos/sdk';
export default workflow('hello', async ({ input, step }) => {
const name = await step('normalize-name', () => input.name.trim());
return { message: `Welcome, ${name}.` };
});
Next steps
- Learn how workflows are structured.
- Add a GitHub connection.
- Review production controls before handling sensitive data.