sales
Capsule CRM CLI for Headless Automation
Use the Capsule CRM CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Bearer token auth
Capsule CRM 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 Capsule CRM CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Capsule CRM CLI for Headless Automation
kosmokrator integrations:configure capsule --set access_token="$CAPSULE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call capsule.capsule_list_contacts '{"page":1,"per_page":1}' --json Discovery Before Execution
Agents and scripts can inspect Capsule CRM docs and schemas before choosing a function.
kosmo integrations:docs capsule --json
kosmo integrations:docs capsule.capsule_list_contacts --json
kosmo integrations:schema capsule.capsule_list_contacts --json
kosmo integrations:search "Capsule CRM" --json
kosmo integrations:list --json Useful Capsule CRM CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
capsule.capsule_list_contacts | Read | page, per_page | List contacts (people and organisations) from Capsule CRM. Returns paginated results with contact details. |
capsule.capsule_get_contact | Read | id | Retrieve a single contact (person or organisation) from Capsule CRM by ID. |
capsule.capsule_create_contact | Write | type, firstName, lastName, emailAddresses | Create a new contact (person or organisation) in Capsule CRM. Provide at least a first name and last name for a person contact. |
capsule.capsule_list_opportunities | Read | page, per_page, status | List sales opportunities from Capsule CRM. Optionally filter by status (OPEN, WON, LOST, CLOSED). Returns paginated results. |
capsule.capsule_get_opportunity | Read | id | Retrieve a single sales opportunity from Capsule CRM by ID. |
capsule.capsule_list_tasks | Read | page, per_page, status | List tasks from Capsule CRM. Optionally filter by status (OPEN, COMPLETED). Returns paginated results. |
capsule.capsule_get_current_user | Read | none | Get the currently authenticated Capsule CRM user. Use this to verify credentials or identify the connected account. |
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.