A quick guide to building your first automation.
Prerequisites:
- Node.js 16+
- pnpm (or npm/yarn)
git clone https://github.com/Dyan-Dev/loopi.git
cd loopi
pnpm installpnpm startThis launches the Electron app with hot reload for development.
Access app preferences via the settings icon (⚙️) in the dashboard header:
Theme Settings:
- Light Mode - Bright interface with dark text
- Dark Mode - Dark interface with light text
- System - Automatically matches your OS preference
Theme preference is saved and applied the next time you open the app.
Download Location:
- Default: Your system's Downloads folder
- Click "Browse" to select a custom download folder
- All automation downloads are saved to this location automatically
- Directory is created if it doesn't exist
Notifications:
- Toggle to enable/disable app notifications
- Preference is saved automatically
All settings are persisted to disk and restored when you restart the application.
pnpm run make # Package for your platform
pnpm run publish # Build and publish (requires config)- Open Loopi
- Click "New Automation"
- Enter name and description
- Click "Create"
- Click "+ Add Step" on the canvas
- Select "Navigate"
- Enter URL:
https://example.com - Click "Add Step"
- Click "+ Add Step"
- Select "Extract"
- Click "Pick Element" to select an element on the page
- Enter "Store As":
result - Click "Add Step"
- Click "+ Add Step"
- Select "Screenshot"
- Click "Add Step"
- Click "Run Automation" button
- Watch it execute in the browser window
- Check the execution log for results
Set a variable:
- Add "Set Variable" step
- Name:
username - Value:
john_doe - Click "Add Step"
Use the variable:
- In any step field, use:
{{username}} - Example in Navigate:
https://example.com/user/{{username}}
Fetch data from API:
- Add "API Call" step
- Method:
GET - URL:
https://api.github.com/users/torvalds - Store As:
userdata - Click "Add Step"
Access API response:
- In Navigate step, use:
https://github.com/{{userdata.login}} - In Type step, use:
{{userdata.name}}
Loop example - extract 5 items:
Step 1: Set Variable
name: index
value: 1
Step 2: Click
selector: .item-{{index}}
Step 3: Extract
selector: .title
storeKey: item_{{index}}
Step 4: Modify Variable
name: index
operation: increment
value: 1
Step 5: Condition
if index ≤ 5: go back to Step 2
else: go to Step 6
Step 6: Screenshot
Extract and decide:
-
Add "Extract With Logic" step
-
Selector:
.price -
Condition:
greaterThan -
Expected Value:
100 -
Click "Add Step"
-
From condition node, draw two edges:
- "if" branch → navigate to premium page
- "else" branch → navigate to regular page
1. Navigate to form page
2. Type email ({{email}})
3. Type password ({{password}})
4. Click submit button
5. Wait 2 seconds
6. Extract confirmation message
7. Screenshot
1. Navigate to page 1
2. Extract data, store in variables
3. Navigate to page 2
4. Extract data, store in variables
5. Compare and process
6. Screenshot results
1. API Call to get user list
2. Set index = 0
3. Navigate to user[0] profile
4. Extract user details
5. API Call to update profile
6. Increment index
7. Loop back if more users
1. API Call to fetch data
2. Extract With Logic to validate
3. If valid: proceed
4. If invalid: alert/screenshot
Loopi can control your system cursor and keyboard — not just the browser.
- Add "Desktop Mouse Move" step
- Set X and Y coordinates (screen position)
- Optionally set speed (pixels/sec)
- Add "Desktop Mouse Click" step
- Choose button: left, right, or middle
- Choose click type: single or double
- Optionally set X/Y to move before clicking
- Add "Desktop Keyboard" step
- Action "type" — types a string of text
- Action "press" — presses a single key (Enter, Escape, Tab, etc.)
- Action "hotkey" — key combination like
LeftControl+CorLeftAlt+Tab
- Add "Desktop Screenshot" step
- Optionally set save path and region (X, Y, Width, Height)
- Store the file path in a variable for later use
On Linux with Wayland, desktop control requires ydotool:
sudo apt install ydotoolThe example workflows handle setup automatically via pkexec (GUI auth prompt). After adding yourself to the input group and logging out/in, no auth is needed.
Run any shell command from your workflows.
- Add "System Command" step
- Enter command:
ls -laorgit statusordocker ps - Set "Store stdout As" to save output to a variable
- Store stdout As — saves command output to a variable
- Store stderr As — saves error output separately
- Store Exit Code As — saves the exit code (0 = success)
- Fail on non-zero — stop the workflow if the command fails
Commands support {{variable}} substitution:
echo "Hello {{username}}, you have {{count}} items"
Step 1: System Command — pwd → store as "cwd"
Step 2: System Command — hostname → store as "host"
Step 3: Set Variable — "Running on {{host}} in {{cwd}}"
- Test incrementally - Add steps one at a time and test
- Use variables - Store common values, reuse everywhere
- Watch execution - Keep the browser window visible while testing
- Inspect API responses - Check logs to understand data structure
- Use element picker - Click to select elements instead of typing selectors
- Add screenshots - Capture key points for verification
- Handle timing - Add Wait steps between dynamic page changes
- Test conditions - Use Extract With Logic for robust comparisons
- Desktop + Browser - Combine browser steps with desktop control for full automation
- System commands - Use shell commands to interact with git, docker, files, and any CLI tool
Export your automation:
- Click "Export" button
- Save JSON file
- Share with team
Import automation:
- Click "Import" button
- Select JSON file
- Automation loads in editor
You can also run and manage workflows from your terminal while the desktop app is running.
When Loopi is installed as a desktop app, the loopi-cli command is automatically available in your terminal:
# Check the desktop app is running
loopi-cli ping
# List all your saved workflows
loopi-cli list
# Run a workflow from a JSON file
loopi-cli run ./docs/examples/github_issue_tracker.json
# Run a saved workflow by its ID
loopi-cli run --id <workflow-id># Import a workflow JSON into the app
loopi-cli create ./my-workflow.json
# Export a workflow to a file
loopi-cli get <id> > exported.json
# Update an existing workflow
loopi-cli update <id> ./updated-workflow.json
# Delete a workflow
loopi-cli delete <id>If you're running Loopi from source in development mode, use pnpm run:workflow instead:
# Check the desktop app is running
pnpm run:workflow ping
# List all your saved workflows
pnpm run:workflow list
# Run a workflow from a JSON file
pnpm run:workflow run ./docs/examples/github_issue_tracker.json
# Run a saved workflow by its ID
pnpm run:workflow run --id <workflow-id># Import a workflow JSON into the app
pnpm run:workflow create ./my-workflow.json
# Export a workflow to a file
pnpm run:workflow get <id> > exported.json
# Update an existing workflow
pnpm run:workflow update <id> ./updated-workflow.json
# Delete a workflow
pnpm run:workflow delete <id>--port <port>— Use a specific port (default: auto-discovered)--no-headless— Show the browser window during execution--headless— Run browser steps in the background (default)
For the full CLI reference, see CLI.md.
Selector not working:
- Use element picker tool (Click button)
- Verify selector exists: open DevTools in preview
Variable not substituting:
- Check spelling:
{{variableName}} - Verify variable is set before use
- Check quotation marks in JSON
API call failing:
- Verify URL is correct
- Check authentication headers if needed
- Test URL in browser first
Condition not branching:
- Verify extracted value matches condition
- Check parsing options (strip currency, etc.)
- Test with Extract step first
- Read Variables & Data Types for advanced variable usage
- Check Steps Reference for detailed step documentation
- Browse Examples for real-world automations
- See Architecture for technical details