> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.neetocal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Output formats

> Pretty tables, JSON, quiet, and TOON — and when to use each.

Every command can print its result in one of four formats. Pretty output is the default in an interactive terminal; the flags below switch to a machine-readable format.

| Format | Flag                      | Best for                                                          |
| ------ | ------------------------- | ----------------------------------------------------------------- |
| Pretty | *(default in a terminal)* | Reading a result yourself.                                        |
| JSON   | `--json`                  | Machine-readable payloads with pagination metadata.               |
| Quiet  | `--quiet`                 | Piping an identifier into another command or `jq`.                |
| TOON   | `--toon`                  | Feeding list/show output back to an LLM (fewer tokens than JSON). |

If more than one is set, precedence is `--toon` > `--quiet` > `--json` > pretty.

## Pretty

The default when writing to a terminal — tables for lists, key-value pairs for a single record. Not intended for machine consumption.

```bash theme={"system"}
neetocal bookings list --type upcoming
```

## JSON

The JSON envelope wraps the resource body along with breadcrumbs and, for list commands, pagination:

```json theme={"system"}
{
  "data": [
    { "id": "8sqtzrs", "name": "Oliver Smith", "email": "oliver@example.com" }
  ],
  "breadcrumbs": [{ "label": "Show details", "command": "neetocal bookings show <sid>" }],
  "pagination": {
    "total_records": 250,
    "total_pages": 10,
    "current_page_number": 1,
    "page_size": 30
  }
}
```

For a list command, `data` is the array of records itself — the resource key from the API response is unwrapped. For `show`, `create`, and `update`, `data` is the single-record body as the API returns it, such as `{ "booking": { ... } }`.

`breadcrumbs` is omitted when empty, and `pagination` is present only for list commands. JSON is used automatically when output is piped (a non-TTY), or force it with `--json`.

## Quiet

`--quiet` emits only the `data` payload — no envelope. For action commands (`create` / `update`) it prints just the resource identifier; for `delete` it prints `success`. This makes it ideal for scripting:

```bash theme={"system"}
neetocal bookings create \
  --meeting-slug demo --name "Oliver Smith" --email oliver@example.com \
  --slot-date 2026-05-15 --slot-start-time 10:00 --time-zone "America/New_York" \
  --quiet
# → prints the new booking id
```

## TOON

`--toon` re-encodes the same data as [TOON](https://github.com/alpkeskin/gotoon) (Token-Optimized Output Notation) — the same shape as JSON with compressed whitespace and keys, typically 30–60% fewer tokens. Prefer it when handing list or show output to an AI assistant.

```bash theme={"system"}
neetocal meetings list --search "demo" --toon
```

## Pagination

List commands page their results. Two flags control paging, and the `pagination` block in the JSON envelope tells you where you are in the result set.

### Pagination Parameters

<ParamField body="--page" type="integer">
  The page of results to retrieve, starting from 1.
</ParamField>

<ParamField body="--page-size" type="integer">
  The number of records to return per page (max 100).
</ParamField>

### Example Usage

```bash theme={"system"}
neetocal bookings list --page 2 --page-size 50
```

This retrieves the second page of bookings, 50 records per page.

### Response Structure

For list commands the JSON envelope carries a `pagination` block alongside the data:

```json theme={"system"}
{
  "pagination": {
    "total_records": 250,
    "total_pages": 5,
    "current_page_number": 2,
    "page_size": 50
  }
}
```

<ResponseField name="pagination.total_records" type="integer">
  The total number of records across all pages.
</ResponseField>

<ResponseField name="pagination.total_pages" type="integer">
  The total number of pages available.
</ResponseField>

<ResponseField name="pagination.current_page_number" type="integer">
  The page you are currently on.
</ResponseField>

<ResponseField name="pagination.page_size" type="integer">
  The number of records returned per page.
</ResponseField>

### Default Behavior

Omit both flags and the CLI sends no paging parameters, so the server defaults apply: the first page with 30 records per page. Set either flag to override — `--page-size` accepts up to 100.

### Best Practices

* To walk every page, increment `--page` until `current_page_number == total_pages`.
* Use `--json` or `--toon` when scripting so you can read the `pagination` block. `--quiet` strips the envelope, so pagination metadata is not available in quiet mode.
* Read `total_records` up front to size the work before you start paging.
