Loops CLI for Headless Automation
Use the Loops CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
6 functions 3 read 3 write API key auth
Loops CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Loops CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Loops CLI for Headless Automation
kosmokrator integrations:configure loops --set api_key="$LOOPS_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call loops.loops_list_contacts '{"limit":1,"offset":1}' --json Discovery Before Execution
Agents and scripts can inspect Loops docs and schemas before choosing a function.
kosmo integrations:docs loops --json
kosmo integrations:docs loops.loops_list_contacts --json
kosmo integrations:schema loops.loops_list_contacts --json
kosmo integrations:search "Loops" --json
kosmo integrations:list --json Useful Loops CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
loops.loops_list_contacts | Read | limit, offset | List contacts from Loops with pagination. Returns contact records including email, name, and custom properties. |
loops.loops_get_contact | Read | contact_id | Get a single contact from Loops by their unique contact ID. Returns full contact details including email, name, and custom properties. |
loops.loops_create_contact | Write | email, first_name, last_name | Create a new contact in Loops. Requires an email address. Optionally include first and last name. |
loops.loops_update_contact | Write | contact_id, email, first_name, last_name, properties | Update an existing contact in Loops. Provide the contact ID and the fields to update (e.g., email, first_name, last_name, or custom properties). |
loops.loops_send_event | Write | email, event_name, properties | Send a custom event to Loops for a contact identified by email. Events can trigger automations and loops in your Loops account. |
loops.loops_get_current_user | Read | none | Get the currently authenticated Loops user. Use this to verify the API connection and see account details. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.