KosmoKrator

productivity

Cursor CLI for AI Agents

Use the Cursor CLI from KosmoKrator to call Cursor tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Cursor CLI Setup

Cursor can be configured headlessly with `kosmokrator integrations:configure cursor`.

Install, configure, and verify
# 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 cursor --enable --read allow --write ask --json
kosmokrator integrations:doctor cursor --json
kosmokrator integrations:status --json

Credentials

Authentication type: api key basic auth api_key_basic_auth. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call cursor.cursor_list_team_members '{}' --json
Provider shortcut
kosmo integrations:cursor cursor_list_team_members '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs cursor --json
kosmo integrations:docs cursor.cursor_list_team_members --json
kosmo integrations:schema cursor.cursor_list_team_members --json
kosmo integrations:search "Cursor" --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.

cursor.cursor_list_team_members

List all Cursor team members and their roles.

Read read
Parameters
none
Generic call
kosmo integrations:call cursor.cursor_list_team_members '{}' --json
Shortcut
kosmo integrations:cursor cursor_list_team_members '{}' --json

cursor.cursor_get_daily_usage_data

Get Cursor team daily usage data for a start and end date in epoch milliseconds.

Read read
Parameters
start_date, end_date
Generic call
kosmo integrations:call cursor.cursor_get_daily_usage_data '{"start_date":1,"end_date":1}' --json
Shortcut
kosmo integrations:cursor cursor_get_daily_usage_data '{"start_date":1,"end_date":1}' --json

cursor.cursor_get_spend

Get Cursor team spending data with optional search, sorting, and pagination.

Read read
Parameters
search_term, sort_by, sort_direction, page, page_size
Generic call
kosmo integrations:call cursor.cursor_get_spend '{"search_term":"example_search_term","sort_by":"example_sort_by","sort_direction":"example_sort_direction","page":1,"page_size":1}' --json
Shortcut
kosmo integrations:cursor cursor_get_spend '{"search_term":"example_search_term","sort_by":"example_sort_by","sort_direction":"example_sort_direction","page":1,"page_size":1}' --json

cursor.cursor_get_usage_events

Get detailed Cursor usage events filtered by date range, user ID, email, and pagination.

Read read
Parameters
start_date, end_date, user_id, email, page, page_size
Generic call
kosmo integrations:call cursor.cursor_get_usage_events '{"start_date":1,"end_date":1,"user_id":1,"email":"example_email","page":1,"page_size":1}' --json
Shortcut
kosmo integrations:cursor cursor_get_usage_events '{"start_date":1,"end_date":1,"user_id":1,"email":"example_email","page":1,"page_size":1}' --json

cursor.cursor_set_user_spend_limit

Set a whole-dollar Cursor spending limit for a team member.

Write write
Parameters
user_email, spend_limit_dollars
Generic call
kosmo integrations:call cursor.cursor_set_user_spend_limit '{"user_email":"example_user_email","spend_limit_dollars":1}' --json
Shortcut
kosmo integrations:cursor cursor_set_user_spend_limit '{"user_email":"example_user_email","spend_limit_dollars":1}' --json

cursor.cursor_list_repo_blocklists

List repository blocklists configured for the Cursor team.

Read read
Parameters
none
Generic call
kosmo integrations:call cursor.cursor_list_repo_blocklists '{}' --json
Shortcut
kosmo integrations:cursor cursor_list_repo_blocklists '{}' --json

cursor.cursor_upsert_repo_blocklists

Replace blocklist patterns for one or more Cursor team repositories.

Write write
Parameters
repos
Generic call
kosmo integrations:call cursor.cursor_upsert_repo_blocklists '{"repos":"example_repos"}' --json
Shortcut
kosmo integrations:cursor cursor_upsert_repo_blocklists '{"repos":"example_repos"}' --json

cursor.cursor_delete_repo_blocklist

Delete a repository blocklist entry from the Cursor team settings.

Write write
Parameters
repo_id
Generic call
kosmo integrations:call cursor.cursor_delete_repo_blocklist '{"repo_id":"example_repo_id"}' --json
Shortcut
kosmo integrations:cursor cursor_delete_repo_blocklist '{"repo_id":"example_repo_id"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

cursor.cursor_list_team_members 0 parameters
Schema command
kosmo integrations:schema cursor.cursor_list_team_members --json
ParameterTypeRequiredDescription
No parameters.
cursor.cursor_get_daily_usage_data 2 parameters
Schema command
kosmo integrations:schema cursor.cursor_get_daily_usage_data --json
ParameterTypeRequiredDescription
start_date integer no Start date as epoch milliseconds.
end_date integer no End date as epoch milliseconds.
cursor.cursor_get_spend 5 parameters
Schema command
kosmo integrations:schema cursor.cursor_get_spend --json
ParameterTypeRequiredDescription
search_term string no Search user names and emails.
sort_by string no Sort by amount, date, or user.
sort_direction string no Sort direction: asc or desc.
page integer no Page number, 1-indexed.
page_size integer no Results per page.
cursor.cursor_get_usage_events 6 parameters
Schema command
kosmo integrations:schema cursor.cursor_get_usage_events --json
ParameterTypeRequiredDescription
start_date integer no Start date as epoch milliseconds.
end_date integer no End date as epoch milliseconds.
user_id integer no Cursor user ID.
email string no Team member email address.
page integer no Page number, 1-indexed.
page_size integer no Results per page.
cursor.cursor_set_user_spend_limit 2 parameters
Schema command
kosmo integrations:schema cursor.cursor_set_user_spend_limit --json
ParameterTypeRequiredDescription
user_email string yes Team member email address.
spend_limit_dollars integer yes Spend limit in whole dollars. Use 0 for a zero-dollar limit.
cursor.cursor_list_repo_blocklists 0 parameters
Schema command
kosmo integrations:schema cursor.cursor_list_repo_blocklists --json
ParameterTypeRequiredDescription
No parameters.
cursor.cursor_upsert_repo_blocklists 1 parameters
Schema command
kosmo integrations:schema cursor.cursor_upsert_repo_blocklists --json
ParameterTypeRequiredDescription
repos array yes Array of repository objects with url and patterns fields.
cursor.cursor_delete_repo_blocklist 1 parameters
Schema command
kosmo integrations:schema cursor.cursor_delete_repo_blocklist --json
ParameterTypeRequiredDescription
repo_id string yes Repository blocklist ID to delete.

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.