Skip to main content
Use the ledgers command to browse ledgers, open one record by ID, and create new ledgers on your connected Core instance. Ledgers group balances and transactions; start here when you need a ledger_id for balance setup.
CommandAliasDescription
listlBrowse all ledgers in a table; add --id to fetch one
createcCreate a ledger via interactive prompts

list

See every ledger on your connected Core instance in a paginated table with ID, name, and created time. Use this when you need a ledger_id before creating balances or when auditing how your books are partitioned.
Options
OptionTypeDefaultDescription
--{field}string-Filter by any indexed field. Quote comma-separated values for multiple matches.
-p, --pageinteger1Page number.
--per-pageinteger10Results per page.
-h, --helpboolean-Show help for this command.
Usage
1

List all ledgers

Run the command to view a paginated table of ledgers:
Paginate with -p and --per-page:
200 Success

list --id

Resolve one ledger by ledger_id, including its name and meta_data. Pass --json to print the same payload your application receives from the Core API.
Options
OptionTypeRequiredDescription
--idstringYesLedger ID to fetch (for example ldg_46074f0e-898d-4b48-bced-d647816168c0).
--jsonbooleanNoPrint the full API object as JSON instead of a formatted summary.
-h, --helpbooleanNoShow help for this command.
Usage
1

Get one ledger

Run the command with a ledger ID:

create

Add a ledger through guided prompts for name and optional JSON metadata. Create ledgers first when you are standing up a new product, region, or currency scope. Balances and transactions hang off a ledger.
Arguments The CLI prompts for these values. They are not passed on the command line.
ArgumentTypeRequiredDescription
namestringYesLedger name. Prompt: ledger name >
meta_dataobjectNoOptional metadata as JSON. Prompt: metadata (json) >. Press Enter to skip.
Options
OptionTypeDescription
--jsonbooleanAfter a successful create, print the full API response as JSON.
-h, --helpbooleanShow help for this command.
Usage
1

Create new ledger

Run the command:
The CLI prompts for each argument:
Press Enter at the metadata prompt to leave it empty.
2

Ledger created