data
Weave CLI for AI Agents
Use the Weave CLI from KosmoKrator to call Weave tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Weave CLI Setup
Weave can be configured headlessly with `kosmokrator integrations:configure weave`.
# 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 weave --set access_token="$WEAVE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor weave --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 | WEAVE_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | WEAVE_URL | URL url | no | Weave API URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call weave.weave_list_patients '{"limit":1,"page":1,"query":"example_query"}' --json kosmo integrations:weave weave_list_patients '{"limit":1,"page":1,"query":"example_query"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs weave --json
kosmo integrations:docs weave.weave_list_patients --json
kosmo integrations:schema weave.weave_list_patients --json
kosmo integrations:search "Weave" --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.
weave.weave_list_patients
Search and list patients from Weave. Returns patient records with names, contact info, and metadata. Use the query parameter to search by name, phone, or email.
read - Parameters
- limit, page, query
kosmo integrations:call weave.weave_list_patients '{"limit":1,"page":1,"query":"example_query"}' --json kosmo integrations:weave weave_list_patients '{"limit":1,"page":1,"query":"example_query"}' --json weave.weave_get_patient
Retrieve a single patient by ID. Returns full patient details including demographics and contact information.
read - Parameters
- id
kosmo integrations:call weave.weave_get_patient '{"id":"example_id"}' --json kosmo integrations:weave weave_get_patient '{"id":"example_id"}' --json weave.weave_list_appointments
List appointments from Weave with optional date range filtering. Returns appointment records with patient info, scheduled times, and status.
read - Parameters
- startDate, endDate, limit
kosmo integrations:call weave.weave_list_appointments '{"startDate":"example_startDate","endDate":"example_endDate","limit":1}' --json kosmo integrations:weave weave_list_appointments '{"startDate":"example_startDate","endDate":"example_endDate","limit":1}' --json weave.weave_get_appointment
Retrieve a single appointment by ID. Returns full details including patient info, scheduled time, duration, and status.
read - Parameters
- id
kosmo integrations:call weave.weave_get_appointment '{"id":"example_id"}' --json kosmo integrations:weave weave_get_appointment '{"id":"example_id"}' --json weave.weave_list_messages
List patient messages from Weave with optional type filtering. Returns message records with sender, recipient, content previews, and status.
read - Parameters
- limit, page, type
kosmo integrations:call weave.weave_list_messages '{"limit":1,"page":1,"type":"example_type"}' --json kosmo integrations:weave weave_list_messages '{"limit":1,"page":1,"type":"example_type"}' --json weave.weave_get_message
Retrieve a single message by ID. Returns full message content, sender, recipient, timestamps, and delivery status.
read - Parameters
- id
kosmo integrations:call weave.weave_get_message '{"id":"example_id"}' --json kosmo integrations:weave weave_get_message '{"id":"example_id"}' --json weave.weave_get_current_user
Get the currently authenticated Weave user profile. Returns user details including name, email, role, and organization info.
read - Parameters
- none
kosmo integrations:call weave.weave_get_current_user '{}' --json kosmo integrations:weave weave_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
weave.weave_list_patients 3 parameters
kosmo integrations:schema weave.weave_list_patients --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of patients to return (default: 25). |
page | integer | no | Page number for pagination, 1-based (default: 1). |
query | string | no | Search query to filter patients by name, phone, or email. |
weave.weave_get_patient 1 parameters
kosmo integrations:schema weave.weave_get_patient --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique patient identifier. |
weave.weave_list_appointments 3 parameters
kosmo integrations:schema weave.weave_list_appointments --json | Parameter | Type | Required | Description |
|---|---|---|---|
startDate | string | no | Start date for the range (ISO 8601, e.g. "2025-01-01"). |
endDate | string | no | End date for the range (ISO 8601, e.g. "2025-01-31"). |
limit | integer | no | Maximum number of appointments to return (default: 25). |
weave.weave_get_appointment 1 parameters
kosmo integrations:schema weave.weave_get_appointment --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique appointment identifier. |
weave.weave_list_messages 3 parameters
kosmo integrations:schema weave.weave_list_messages --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of messages to return (default: 25). |
page | integer | no | Page number for pagination, 1-based (default: 1). |
type | string | no | Filter by message type (e.g. "sms", "email"). |
weave.weave_get_message 1 parameters
kosmo integrations:schema weave.weave_get_message --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique message identifier. |
weave.weave_get_current_user 0 parameters
kosmo integrations:schema weave.weave_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.