Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.lofty.com/llms.txt

Use this file to discover all available pages before exploring further.

lofty-cli supports four output formats so you can pipe results into any downstream tool. The default is human-readable text; everything else is selected with --format (or the --json shortcut).

text (default)

Designed for terminals. Tables are aligned and colorized; long fields are truncated.
lofty-cli leads list
ID         FIRSTNAME  LASTNAME  STAGE       CREATED
12345      John       Smith     New         2026-04-01
12346      Jane       Doe       Contacted   2026-04-02
Use --no-color to drop ANSI sequences and --no-header to omit the column row — useful when piping to awk or cut:
lofty-cli leads list --no-header --no-color | awk '{print $1}'

json

Stable, machine-readable, and the only format that preserves nested fields and full precision for 64-bit IDs.
lofty-cli leads list --json
# or equivalently:
lofty-cli leads list --format json
[
  {
    "leadId": "1234567890123",
    "firstName": "John",
    "lastName": "Smith",
    "stage": "New"
  }
]
Lofty IDs are 64-bit integers. Always use --json (not text) when piping IDs to another script — see JavaScript / TypeScript Integration for why precision matters.
Combine with jq for ad-hoc filtering:
lofty-cli leads list --json | jq '.[] | select(.stage == "New") | .leadId'

csv

Round-trips cleanly into spreadsheets and csvkit / pandas.
lofty-cli leads list --format csv
leadId,firstName,lastName,stage,createdAt
1234567890123,John,Smith,New,2026-04-01T12:00:00Z
Add --no-header to drop the header row when appending to an existing file.

yaml

Useful for human review of nested API responses.
lofty-cli leads get --id 1234567890123 --format yaml
leadId: '1234567890123'
firstName: John
lastName: Smith
stage: New
addresses:
  - line1: 123 Main St
    city: San Francisco

Choosing fields

Most list and get commands accept --return-fields to reduce payload size and speed up downstream parsing:
lofty-cli leads list --return-fields leadId,firstName,lastName,stage
The server applies the projection — the wire response itself is smaller, not just the rendered output.

Exit codes

CodeMeaning
0Success — output is valid for the requested format
1Generic CLI error (validation, network, parsing)
2Authentication failure — see Authentication
>2API error — the response body is printed in the chosen format
Scripts should always check the exit code rather than inspect stderr text.