VS Code + LoopCLI
Visual Studio Code is the most popular home for LoopCLI development. This guide walks through installing the extension, wiring tasks, and keeping secrets safe while you iterate on automation loops.
1. Install the LoopCLI extension
- Open the Extensions view (
⇧⌘X/Ctrl+Shift+X). - Search for “LoopCLI Automation”.
- Click Install and reload the window when prompted.
The extension adds:
- YAML syntax highlighting for
.loop.ymlfiles. - A side panel that lists loops in your workspace.
- Quick actions to run, deploy, or open LoopCLI docs without leaving VS Code.
2. Verify the CLI path
Run the command palette (⇧⌘P / Ctrl+Shift+P) and select LoopCLI: Locate Binary.
Point it to the path where loopcli lives (e.g., /usr/local/bin/loopcli on macOS/Linux or C:\Users\you\.loopcli\loopcli.exe on Windows).
This ensures the extension can invoke the CLI even if VS Code launches with a limited PATH.
3. Create run & watch tasks
Add the following to .vscode/tasks.json to get one-click runs from the terminal panel:
{
"version": "2.0.0",
"tasks": [
{
"label": "LoopCLI: Run Active Loop",
"type": "shell",
"command": "loopcli loop run ${fileBasenameNoExtension}",
"problemMatcher": []
},
{
"label": "LoopCLI: Deploy Active Loop",
"type": "shell",
"command": "loopcli loop deploy ${fileBasenameNoExtension} --activate",
"problemMatcher": []
}
]
}
Now you can run or deploy the current loop with ⇧⌘B (Ctrl+Shift+B) and choose the appropriate task.
4. Secrets & environment variables
- Use
loopcli secret addfrom the integrated terminal to avoid storing credentials in.envfiles. - If you rely on environment variables for local testing, create a
.vscode/settings.jsonentry:
{
"terminal.integrated.env.osx": {
"LOOPCLI_ENV": "development"
}
}
Replace osx with linux or windows as needed.
5. Integrate with Git & AI assistants
- Enable format-on-save for YAML (
editor.formatOnSave) so loop files stay consistent. - Pin the LoopCLI YAML schema in your AI assistant (Copilot / Codeium / ChatGPT) notes so suggestions stay valid.
- Use the LoopCLI extension’s Docs tab to jump straight into relevant recipes without leaving the editor.
6. Troubleshooting
| Issue | Fix |
|---|---|
| “command not found” when running tasks | Re-run LoopCLI: Locate Binary and restart VS Code. |
| Secrets unavailable during tasks | Ensure the terminal launches with your shell (check terminal.integrated.defaultProfile). |
| Extension commands missing | Verify you’re on VS Code 1.80+ and reload the window after installation. |
Next steps
- Pair VS Code with the Cursor workflow builder for AI-assisted loops.
- Explore Starter Recipes for ready-to-run automations.
- Need a feature? Request it in Discord — the extension roadmap lives there.