| name | splitwise-cli |
| description | Manage Splitwise expenses, groups, friends, and balances from the command line. Use when the user wants to interact with Splitwise — view balances, create or split expenses, manage groups, list friends, or check notifications. |
Splitwise CLI
A Go CLI that covers the entire Splitwise API v3.0.
Troubleshooting
If which splitwise-cli returns nothing, the binary is not installed. Install it:
curl -sSL https://raw.githubusercontent.com/hewliyang/splitwise-cli/main/install.sh | bash
If the API key is not configured (splitwise-cli me returns an error), ask the user to:
- Go to https://secure.splitwise.com/apps, log in, register an app, and generate an API key
- Run
splitwise-cli auth <their-key>
Never attempt to create, retrieve, or manage API keys on behalf of the user.
Commands
All commands support --json for raw JSON output.
User
splitwise-cli me
splitwise-cli user <id>
splitwise-cli update-user <id> key=value ...
Groups
splitwise-cli groups
splitwise-cli group <id>
splitwise-cli create-group "Name" --type trip --simplify
splitwise-cli delete-group <id>
splitwise-cli restore-group <id>
splitwise-cli add-to-group <group_id> --user-id <uid>
splitwise-cli add-to-group <group_id> --email a@b.com --first Ada --last Lovelace
splitwise-cli remove-from-group <group_id> <user_id>
Friends
splitwise-cli friends
splitwise-cli friend <id>
splitwise-cli add-friend email@example.com --first Ada --last Lovelace
splitwise-cli delete-friend <id>
Expenses
splitwise-cli expenses --group <id> --limit 20 --after 2024-01-01
splitwise-cli expense <id>
splitwise-cli create-expense --desc "Dinner" --cost 60 --group <id> --split-equally --currency SGD
splitwise-cli create-expense --desc "Groceries" --cost 50 --group <id> \
--user 111:50:25 \
--user 222:0:25
splitwise-cli update-expense <id> --cost 75 --desc "Updated description"
splitwise-cli delete-expense <id>
splitwise-cli restore-expense <id>
Comments
splitwise-cli comments <expense_id>
splitwise-cli create-comment <expense_id> "message here"
splitwise-cli delete-comment <comment_id>
Notifications
splitwise-cli notifications --limit 10
splitwise-cli notifications --after 2024-06-01T00:00:00Z
Other
splitwise-cli currencies
splitwise-cli categories
splitwise-cli balances
splitwise-cli balances --group <id>
Notes
- Monetary amounts are strings with 2 decimal places (e.g.
"25.00")
- Some endpoints return 200 even on failure — the CLI checks
success / errors fields automatically
- User arrays in the API use flattened format
users__{index}__{property} — the CLI handles this via --user flags
--split-equally assumes the authenticated user is the payer; use --user flags to set a different payer