KosmoKrator

data

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.

Splitwise CLI Setup

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

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 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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

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

Command Patterns

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

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

Discovery

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

Discovery commands
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

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.

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.

Read read
Parameters
group_id, friend_id, dated_after, dated_before, limit, offset
Generic 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
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

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

Read read
Parameters
id
Generic call
kosmo integrations:call splitwise.splitwise_get_expense '{"id":1}' --json
Shortcut
kosmo integrations:splitwise splitwise_get_expense '{"id":1}' --json

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.

Write write
Parameters
cost, description, users, group_id, currency_code, date, category_id, details
Generic 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
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

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

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

splitwise.splitwise_get_group

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

Read read
Parameters
id
Generic call
kosmo integrations:call splitwise.splitwise_get_group '{"id":1}' --json
Shortcut
kosmo integrations:splitwise splitwise_get_group '{"id":1}' --json

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.

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

splitwise.splitwise_get_current_user

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

Read read
Parameters
none
Generic call
kosmo integrations:call splitwise.splitwise_get_current_user '{}' --json
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 6 parameters
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 1 parameters
Schema command
kosmo integrations:schema splitwise.splitwise_get_expense --json
ParameterTypeRequiredDescription
id integer yes The expense ID to retrieve.
splitwise.splitwise_create_expense 8 parameters
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 0 parameters
Schema command
kosmo integrations:schema splitwise.splitwise_list_groups --json
ParameterTypeRequiredDescription
No parameters.
splitwise.splitwise_get_group 1 parameters
Schema command
kosmo integrations:schema splitwise.splitwise_get_group --json
ParameterTypeRequiredDescription
id integer yes The group ID to retrieve.
splitwise.splitwise_list_friends 0 parameters
Schema command
kosmo integrations:schema splitwise.splitwise_list_friends --json
ParameterTypeRequiredDescription
No parameters.
splitwise.splitwise_get_current_user 0 parameters
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.