Command-line interface for the Ledgi Agent API. Manage your accounts, holdings, net worth, snapshots, and ISA deposits from the terminal.
curl -fsSL https://raw.githubusercontent.com/LedgiApp/ledgi-cli/main/install.sh | bashOr build from source:
git clone https://github.com/LedgiApp/ledgi-cli.git
cd ledgi-cli
go build -o ledgi .# Authenticate with your API key (Settings > API Keys in the Ledgi dashboard)
ledgi login --api-key ledgi_sk_...
# List your accounts
ledgi accounts list
# Check your net worth
ledgi networth summaryledgi login --api-key ledgi_sk_...
ledgi login --api-key ledgi_sk_... --api-url https://custom-url.comCredentials are saved to ~/.ledgi/config.json (file permissions 0600).
# List all accounts
ledgi accounts list
# Filter by type
ledgi accounts list --type cash
ledgi accounts list --type isa_stocks
# Create or update a single account
ledgi accounts upsert \
--name "Main Current" \
--type current \
--currency GBP \
--balance 2500 \
--institution Monzo \
--external-id monzo-1
# Bulk upsert from a JSON file
ledgi accounts bulk-upsert --file accounts.jsonValid account types:
| Category | Types |
|---|---|
| Cash | cash, current, savings, premium_bonds |
| ISA | isa_cash, isa_stocks, isa_lifetime, isa_innovative |
| Pension | pension, pension_workplace, pension_sipp, pension_state |
| Investment | investment, crypto_wallet |
| Property | property |
| Debt | credit_card, loan, mortgage, student_loan |
| Other | other_asset, other_liability |
# List all holdings
ledgi holdings list
# Filter by account
ledgi holdings list --account-id abc123
# Bulk upsert from a JSON file
ledgi holdings bulk-upsert --file holdings.jsonledgi networth summary# List recent snapshots
ledgi snapshots list
ledgi snapshots list --limit 5
# Create a snapshot
ledgi snapshots create
ledgi snapshots create --date 2026-01-31# View ISA summary
ledgi isa summary
ledgi isa summary --tax-year 2025
# Log a deposit
ledgi isa deposit --account-id abc123 --amount 1000 --date 2026-02-24All commands default to JSON output. Use --output table for a human-readable table:
ledgi --output table accounts listThe CLI resolves configuration in this order (highest priority first):
- Flags —
--api-key,--api-url - Environment variables —
LEDGI_API_KEY,LEDGI_API_URL - Config file —
~/.ledgi/config.json - Default — API URL defaults to
https://api.ledgi.app
The CLI requires an API key with the appropriate scopes. Create one from Settings > API Keys in the Ledgi dashboard.
| Scope | Commands |
|---|---|
accounts:read |
accounts list |
accounts:write |
accounts upsert, accounts bulk-upsert |
holdings:read |
holdings list |
holdings:write |
holdings bulk-upsert |
networth:read |
networth summary |
snapshots:read |
snapshots list |
snapshots:write |
snapshots create |
isa:read |
isa summary |
isa:write |
isa deposit |
Copyright Ledgi. All rights reserved.