KosmoKrator

finance

Splitwise CLI for AI Agents

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

7 functions 6 read 1 write Bearer token auth

Splitwise CLI Setup

Splitwise can be configured headlessly with `kosmokrator integrations:configure splitwise`.

# 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 splitwise --set access_token="$SPLITWISE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor splitwise --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token SPLITWISE_ACCESS_TOKEN Secret secret yes Access Token
url SPLITWISE_URL URL url no API URL

Call Splitwise Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call splitwise.splitwise_list_expenses '{
  "group_id": 1,
  "friend_id": 1,
  "dated_after": "example_dated_after",
  "dated_before": "example_dated_before",
  "limit": 1,
  "offset": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:splitwise splitwise_list_expenses '{
  "group_id": 1,
  "friend_id": 1,
  "dated_after": "example_dated_after",
  "dated_before": "example_dated_before",
  "limit": 1,
  "offset": 1
}' --json

Agent Discovery Commands

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

kosmo integrations:docs splitwise --json
kosmo integrations:docs splitwise.splitwise_list_expenses --json
kosmo integrations:schema splitwise.splitwise_list_expenses --json
kosmo integrations:search "Splitwise" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Splitwise.

splitwise.splitwise_list_expenses

Read read

List shared expenses from Splitwise. Optionally filter by group, friend, or date range. Returns expense details including cost, description, category, and split information.

Parameters
group_id, friend_id, dated_after, dated_before, limit, offset

Generic CLI call

kosmo integrations:call splitwise.splitwise_list_expenses '{"group_id":1,"friend_id":1,"dated_after":"example_dated_after","dated_before":"example_dated_before","limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:splitwise splitwise_list_expenses '{"group_id":1,"friend_id":1,"dated_after":"example_dated_after","dated_before":"example_dated_before","limit":1,"offset":1}' --json

splitwise.splitwise_get_expense

Read read

Get detailed information about a specific expense in Splitwise, including cost, description, category, date, and how it was split among users.

Parameters
id

Generic CLI call

kosmo integrations:call splitwise.splitwise_get_expense '{"id":1}' --json

Provider shortcut

kosmo integrations:splitwise splitwise_get_expense '{"id":1}' --json

splitwise.splitwise_create_expense

Write write

Create a new shared expense in Splitwise. Specify the total cost, description, and users involved. The expense will be split equally unless custom owed_share amounts are provided per user.

Parameters
cost, description, users, group_id, currency_code, date, category_id, details

Generic CLI call

kosmo integrations:call splitwise.splitwise_create_expense '{"cost":"example_cost","description":"example_description","users":"example_users","group_id":1,"currency_code":"example_currency_code","date":"example_date","category_id":1,"details":"example_details"}' --json

Provider shortcut

kosmo integrations:splitwise splitwise_create_expense '{"cost":"example_cost","description":"example_description","users":"example_users","group_id":1,"currency_code":"example_currency_code","date":"example_date","category_id":1,"details":"example_details"}' --json

splitwise.splitwise_list_groups

Read read

List all groups the current user belongs to in Splitwise. Returns group names, member information, and balance summaries.

Parameters
none

Generic CLI call

kosmo integrations:call splitwise.splitwise_list_groups '{}' --json

Provider shortcut

kosmo integrations:splitwise splitwise_list_groups '{}' --json

splitwise.splitwise_get_group

Read read

Get detailed information about a specific group in Splitwise, including all members and their current balances.

Parameters
id

Generic CLI call

kosmo integrations:call splitwise.splitwise_get_group '{"id":1}' --json

Provider shortcut

kosmo integrations:splitwise splitwise_get_group '{"id":1}' --json

splitwise.splitwise_list_friends

Read read

List all friends on Splitwise with their current balance information. Shows how much you owe or are owed by each friend.

Parameters
none

Generic CLI call

kosmo integrations:call splitwise.splitwise_list_friends '{}' --json

Provider shortcut

kosmo integrations:splitwise splitwise_list_friends '{}' --json

splitwise.splitwise_get_current_user

Read read

Get the authenticated Splitwise user's profile, including name, email, default currency, and account settings.

Parameters
none

Generic CLI call

kosmo integrations:call splitwise.splitwise_get_current_user '{}' --json

Provider shortcut

kosmo integrations:splitwise splitwise_get_current_user '{}' --json

Function Schemas

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

splitwise.splitwise_list_expenses

List shared expenses from Splitwise. Optionally filter by group, friend, or date range. Returns expense details including cost, description, category, and split information.

Operation
Read read
Schema command
kosmo integrations:schema splitwise.splitwise_list_expenses --json
ParameterTypeRequiredDescription
group_id integer no Filter expenses by group ID.
friend_id integer no Filter expenses by friend ID.
dated_after string no Only expenses after this date (ISO 8601, e.g., "2025-01-01").
dated_before string no Only expenses before this date (ISO 8601, e.g., "2025-12-31").
limit integer no Number of expenses to return (default: 20, max: 10000).
offset integer no Offset for pagination (default: 0).

splitwise.splitwise_get_expense

Get detailed information about a specific expense in Splitwise, including cost, description, category, date, and how it was split among users.

Operation
Read read
Schema command
kosmo integrations:schema splitwise.splitwise_get_expense --json
ParameterTypeRequiredDescription
id integer yes The expense ID to retrieve.

splitwise.splitwise_create_expense

Create a new shared expense in Splitwise. Specify the total cost, description, and users involved. The expense will be split equally unless custom owed_share amounts are provided per user.

Operation
Write write
Schema command
kosmo integrations:schema splitwise.splitwise_create_expense --json
ParameterTypeRequiredDescription
cost string yes Total cost of the expense (e.g., "45.50").
description string yes Description of the expense (e.g., "Dinner at Italian restaurant").
users array yes Array of users sharing the expense. Each user should have "user_id" (integer) and optionally "owed_share" (string, e.g., "22.75"). If owed_share is omitted, cost is split equally.
group_id integer no Group ID to assign the expense to.
currency_code string no Three-letter currency code (e.g., "USD", "EUR"). Defaults to the user's default currency.
date string no Date of the expense in ISO 8601 format (e.g., "2025-01-15"). Defaults to today.
category_id integer no Category ID for the expense (e.g., 18 for "Food", 9 for "Entertainment").
details string no Additional notes or details about the expense.

splitwise.splitwise_list_groups

List all groups the current user belongs to in Splitwise. Returns group names, member information, and balance summaries.

Operation
Read read
Schema command
kosmo integrations:schema splitwise.splitwise_list_groups --json
ParameterTypeRequiredDescription
No parameters.

splitwise.splitwise_get_group

Get detailed information about a specific group in Splitwise, including all members and their current balances.

Operation
Read read
Schema command
kosmo integrations:schema splitwise.splitwise_get_group --json
ParameterTypeRequiredDescription
id integer yes The group ID to retrieve.

splitwise.splitwise_list_friends

List all friends on Splitwise with their current balance information. Shows how much you owe or are owed by each friend.

Operation
Read read
Schema command
kosmo integrations:schema splitwise.splitwise_list_friends --json
ParameterTypeRequiredDescription
No parameters.

splitwise.splitwise_get_current_user

Get the authenticated Splitwise user's profile, including name, email, default currency, and account settings.

Operation
Read read
Schema command
kosmo integrations:schema splitwise.splitwise_get_current_user --json
ParameterTypeRequiredDescription
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.