productivity
Keap CLI for AI Agents
Use the Keap CLI from KosmoKrator to call Keap tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Keap CLI Setup
Keap can be configured headlessly with `kosmokrator integrations:configure keap`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure keap --set access_token="$KEAP_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor keap --json
kosmokrator integrations:status --json Credentials
Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | KEAP_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | KEAP_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call keap.keap_list_contacts '{"page":1,"limit":1}' --json kosmo integrations:keap keap_list_contacts '{"page":1,"limit":1}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs keap --json
kosmo integrations:docs keap.keap_list_contacts --json
kosmo integrations:schema keap.keap_list_contacts --json
kosmo integrations:search "Keap" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
keap.keap_list_contacts
List contacts from Keap CRM. Returns paginated results with contact details including name, email, and company.
read - Parameters
- page, limit
kosmo integrations:call keap.keap_list_contacts '{"page":1,"limit":1}' --json kosmo integrations:keap keap_list_contacts '{"page":1,"limit":1}' --json keap.keap_get_contact
Retrieve a single Keap contact by ID. Returns full contact details including email addresses, phone numbers, and tags.
read - Parameters
- id
kosmo integrations:call keap.keap_get_contact '{"id":1}' --json kosmo integrations:keap keap_get_contact '{"id":1}' --json keap.keap_create_contact
Create a new contact in Keap CRM. Provide at least a first name or last name. Email and company name are optional.
write - Parameters
- first_name, last_name, email, company_name
kosmo integrations:call keap.keap_create_contact '{"first_name":"example_first_name","last_name":"example_last_name","email":"example_email","company_name":"example_company_name"}' --json kosmo integrations:keap keap_create_contact '{"first_name":"example_first_name","last_name":"example_last_name","email":"example_email","company_name":"example_company_name"}' --json keap.keap_list_opportunities
List sales opportunities from Keap CRM. Optionally filter by pipeline stage. Returns paginated results with opportunity details.
read - Parameters
- page, limit, stage
kosmo integrations:call keap.keap_list_opportunities '{"page":1,"limit":1,"stage":"example_stage"}' --json kosmo integrations:keap keap_list_opportunities '{"page":1,"limit":1,"stage":"example_stage"}' --json keap.keap_get_opportunity
Retrieve a single Keap sales opportunity by ID. Returns full details including contact, stage, value, and notes.
read - Parameters
- id
kosmo integrations:call keap.keap_get_opportunity '{"id":1}' --json kosmo integrations:keap keap_get_opportunity '{"id":1}' --json keap.keap_list_tags
List all tags in Keap. Tags are used to categorize contacts and trigger automations.
read - Parameters
- none
kosmo integrations:call keap.keap_list_tags '{}' --json kosmo integrations:keap keap_list_tags '{}' --json keap.keap_get_current_user
Get the currently authenticated Keap user. Returns profile information for the user associated with the access token.
read - Parameters
- none
kosmo integrations:call keap.keap_get_current_user '{}' --json kosmo integrations:keap keap_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
keap.keap_list_contacts 2 parameters
kosmo integrations:schema keap.keap_list_contacts --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of contacts per page (default: 20, max: 200). |
keap.keap_get_contact 1 parameters
kosmo integrations:schema keap.keap_get_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The Keap contact ID. |
keap.keap_create_contact 4 parameters
kosmo integrations:schema keap.keap_create_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
first_name | string | no | First name of the contact. |
last_name | string | no | Last name of the contact. |
email | string | no | Primary email address for the contact. |
company_name | string | no | Company name to associate with the contact. |
keap.keap_list_opportunities 3 parameters
kosmo integrations:schema keap.keap_list_opportunities --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of opportunities per page (default: 20, max: 200). |
stage | string | no | Filter by opportunity stage (e.g., "New", "Appointment Scheduled", "Closed Won", "Closed Lost"). |
keap.keap_get_opportunity 1 parameters
kosmo integrations:schema keap.keap_get_opportunity --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The Keap opportunity ID. |
keap.keap_list_tags 0 parameters
kosmo integrations:schema keap.keap_list_tags --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
keap.keap_get_current_user 0 parameters
kosmo integrations:schema keap.keap_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.