Cursor + LoopCLI
Cursor blends AI pair programming with a focused IDE experience. This guide shows how to connect LoopCLI so you can scaffold, run, and deploy automation loops from the Cursor workflow builder.
1. Install LoopCLI & expose it to Cursor
- Verify LoopCLI is installed (
loopcli version). - Ensure the binary is discoverable by Cursor:
- macOS/Linux: add
export PATH="$HOME/.local/bin:$PATH"(or whereverloopclilives) to.zshrc/.bashrc. - Windows: add
%USERPROFILE%\.loopclito your PATH and restart Cursor.
- macOS/Linux: add
- Open Cursor’s terminal (
Ctrl+``) and confirmloopcli version` works.
2. Create workflow builder actions
Cursor’s workflow builder lets you define reusable commands. Add two actions:
- Run Active Loop
- Command:
loopcli loop run ${relativeFile} - Set “Working directory” to your repo root.
- Command:
- Deploy Active Loop
- Command:
loopcli loop deploy ${relativeFileBasename} --activate
- Command:
Now you can trigger loops directly from the AI side panel or command palette.
3. Boost AI understanding of LoopCLI YAML
Cursor’s strength is AI-assisted editing. Feed it the LoopCLI schema so completions are accurate:
- Create a file
.cursor/rules/loopcli.yamlwith snippets for common steps (HTTP, CLI, schedule, secrets). - Add a short README explaining how loops pass data between steps.
- Use the “Teach Cursor” feature to highlight a working loop and label it “LoopCLI example.”
This context keeps the model from hallucinating invalid keys.
4. Terminal automation & secrets
- Use Cursor tasks (
Taskstab) to run scripts such asloopcli secret addorloopcli loop list. - Keep secrets in the LoopCLI Vault—never commit
.envfiles. When the AI suggests environment variables, remind it to referenceloopcli secretinstead.
5. Suggested workflow builder recipes
| Action | Result |
|---|---|
loopcli loop run onboarding --watch |
Stream live output in the integrated terminal. |
loopcli loop deploy onboarding --schedule "0 12 * * *" --activate |
Deploy a daily lunch-and-learn summary loop. |
loopcli loop run --prompt |
Let Cursor generate a loop name and pass it into an interactive run. |
Save these actions so the AI can reference them in future plans.
6. Troubleshooting
| Issue | Fix |
|---|---|
| AI suggests invalid YAML keys | Re-teach Cursor using a fresh loop example; pin the schema in .cursor/rules. |
| Command not found inside actions | Re-open Cursor after updating PATH; Windows users may need to launch Cursor from a shell once. |
| Secrets missing in terminal | Check that Cursor respects your shell init files (Preferences → Terminal → Default shell). |
Next steps
- Pair this setup with Starter Recipes for quick automation wins.
- Explore Connectors to wire SaaS APIs into Cursor-driven loops.
- Want tighter AI integration? Request features in Discord—we maintain a Cursor-focused backlog.