Windsurf + LoopCLI
Windsurf is Codeium's new agentic IDE that brings AI flow mode to your development workflow. This guide shows how to connect LoopCLI so you can scaffold, run, and deploy automation loops directly from Windsurf's intelligent editor.
1. Install LoopCLI & expose it to Windsurf
- Verify LoopCLI is installed (
loopcli version). - Ensure the binary is discoverable by Windsurf:
- macOS/Linux: add
export PATH="$HOME/.local/bin:$PATH"(or whereverloopclilives) to.zshrc/.bashrc. - Windows: add
%USERPROFILE%\.loopclito your PATH and restart Windsurf.
- macOS/Linux: add
- Open Windsurf's terminal (
Ctrl+``) and confirmloopcli version` works.
2. Configure Windsurf tasks
Windsurf supports custom tasks that integrate with its AI flow mode. Add these to your .vscode/tasks.json (Windsurf uses VS Code task format):
{
"version": "2.0.0",
"tasks": [
{
"label": "LoopCLI: Run Active Loop",
"type": "shell",
"command": "loopcli loop run ${relativeFile}",
"problemMatcher": []
},
{
"label": "LoopCLI: Deploy Active Loop",
"type": "shell",
"command": "loopcli loop deploy ${relativeFileBasename} --activate",
"problemMatcher": []
}
]
}
Now Windsurf's AI can suggest and trigger these tasks as part of its flow mode.
3. Teach Windsurf AI about LoopCLI YAML
Windsurf's strength is its agentic AI capabilities. Feed it the LoopCLI schema so suggestions are accurate:
- Create a
.windsurf/rules.mdor.codeium/rules.mdfile with:- Common LoopCLI YAML patterns (HTTP steps, CLI steps, schedules)
- Examples of how loops pass data between steps
- Secret management conventions
- Reference the LoopCLI documentation in your workspace context
- Use Windsurf's "Cascade" AI to walk through creating a loop the first time—it learns from the interaction
This context prevents the AI from hallucinating invalid configurations.
4. Terminal automation & secrets
- Windsurf's integrated terminal respects your shell environment, making
loopclicommands seamless - Use the AI command palette to run
loopcli secret addorloopcli loop listwithout typing - Keep secrets in the LoopCLI Vault—never commit
.envfiles. When Windsurf's AI suggests environment variables, redirect it to useloopcli secretinstead
5. AI flow mode with LoopCLI
Windsurf's flow mode can help you build complex automation workflows:
| Ask Cascade to... | What happens |
|---|---|
| "Create a LoopCLI workflow that checks GitHub PRs" | AI scaffolds a YAML loop with HTTP connector steps |
| "Add error handling to this loop" | AI adds retry logic and failure notifications |
| "Deploy this loop to run every hour" | AI runs loopcli loop deploy with cron schedule |
| "Show me the last 10 execution logs" | AI runs loopcli loop logs and formats output |
The AI learns LoopCLI patterns and suggests improvements as you work.
6. Troubleshooting
| Issue | Fix |
|---|---|
| AI suggests invalid YAML keys | Add LoopCLI schema examples to .windsurf/rules.md; re-index workspace |
| Command not found | Verify loopcli is in PATH; restart Windsurf after PATH changes |
| Secrets missing in terminal | Check Windsurf terminal shell settings (Settings → Terminal → Default shell) |
| Flow mode doesn't know LoopCLI | Reference docs in chat: "See https://docs.loopcli.com for LoopCLI syntax" |
Next steps
- Combine Windsurf's AI with Starter Recipes for rapid automation
- Explore Connectors to integrate SaaS APIs into your loops
- Join Discord to share Windsurf + LoopCLI workflows with the community