Common Flags
Output Formats
Every list and show command supports JSON. list commands also support CSV and JSON file export, which auto-paginates up to 15,000 rows and respects all filters.
| Flag | Where | Effect |
|---|---|---|
--json | Any list or show | Print raw JSON to stdout instead of formatted output |
--format <fmt> | list | table (default), csv, or json — for csv / json the CLI auto-paginates and concatenates pages |
--output <path> | list with --format csv or --format json | Write to file instead of stdout |
fobs stm transactions list --format csv --output txns.csv
fobs stm transactions list --format json > txns.json
fobs stm transactions list --json | jq '.[] | .id'
Paging
| Flag | Default | Description |
|---|---|---|
--page <n> | 1 | Page number (1-indexed). Only applies to the default --format table view. |
--limit <n> | 100 | Page size. Max 500. |
fobs stm transactions list --page 2 --limit 50
Note: --limit / --page do not apply to --format csv, --format json, or --totals — those auto-paginate.
Field Selection
--fields overrides the default column set. Use it both to narrow output (smaller table) and to expose fields that aren't in the default columns.
fobs stm accounts list --fields id,name,opening_balance,created_at
fobs stm transactions list --fields id,date,particulars,inflow,outflow,balance
Each resource page documents the available fields.
Totals
list commands accept --totals to print a summary line under the table — counts, sums, and useful breakdowns.
fobs stm transactions list --from 2026-04-01 --to 2026-04-30 --totals
--totals auto-paginates across all matching rows, so the sums reflect the whole filter, not just the first page.
Help
| Flag | Effect |
|---|---|
-h, --help | Show help for the current level of the command tree |
-v, --version | Show CLI version |
fobs stm transactions --help
fobs stm transactions list --help
Environment Variables
| Variable | Effect |
|---|---|
FOBS_CONFIG_DIR | Override ~/.fobs/ (default config location) |
FOBS_DEBUG=1 | Print full stack trace on error |
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Any error — no current org, missing app creds, API error, network failure, validation rejection |
Amount Display
The Statements API stores monetary values as integer milli-units (× 1000). Three conventions apply across CLI output:
| Output | Format |
|---|---|
| Table view | CLI divides by 1000 and adds thousands separators (13519790 → 13,519.79) |
--format csv / --format json | Raw integer milli-units preserved as the API returns them |
accounts list opening balance | The accounts API already divides server-side; CLI shows the value as-is in currency units |
When you write a downstream script that consumes the CLI's CSV or JSON, divide by 1000 yourself before doing arithmetic.
Related
- Setup — Auth and config
- Accounts —
fobs stm accounts ... - Transactions —
fobs stm transactions ...