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

# Commands and output

> Find commands, build request bodies, upload files and choose between JSON, tables and JSON Lines

## Find commands

The CLI has one command for every API operation, grouped into areas such as assistants, calls, campaigns and phone numbers.

```bash theme={null}
famulor --help                 # areas and the most useful commands
famulor calls                  # every command in the calls area
famulor commands recording     # search commands by keyword
famulor get-call-recording --help
```

Each command's help shows what it does, the API request it sends, its arguments and options with types and allowed values, which fields are required, and an example. Options that take IDs say which command lists them, for example `famulor list-voices` for a voice.

You can also write the area first and then the verb: `famulor assistants create` runs `create-assistant`, and `famulor calls list` runs `list-calls`. When a verb fits more than one command, the CLI lists the candidates instead of guessing.

## Arguments and options

Path parameters are arguments in the order they appear in the API path. Everything else is an option.

```bash theme={null}
famulor get-assistant 3f0c6a8e-1d2b-4c5d-9e8f-0a1b2c3d4e5f
famulor update-assistant 3f0c6a8e-1d2b-4c5d-9e8f-0a1b2c3d4e5f --name "Front desk" --llm-temperature 0.4
famulor list-calls --status completed --limit 20
```

* A yes/no option takes `true`/`false` (also `yes`/`no`, `on`/`off`, `1`/`0`), or is turned off with `--no-` in front, for example `--no-recording-enabled`.
* Options that take a list accept commas or can be repeated: `--tags vip,new` or `--tags vip --tags new`. For values that contain commas, pass a JSON array: `--tags '["a,b"]'`.
* Text options read a file when the value starts with `@`: `--system-prompt @prompt.md`. Write `@@` for a literal `@`.
* A value of `null` clears a field that allows it.

## Request bodies

Top-level body fields are options. Objects and lists take JSON, or `@file.json` to read it from a file. Two more ways cover everything else, and all three can be combined: the JSON file first, then options, then fields.

<Tabs>
  <Tab title="JSON file or stdin">
    ```bash theme={null}
    famulor create-assistant --input assistant.json
    cat assistant.json | famulor create-assistant --input -
    ```
  </Tab>

  <Tab title="Single fields">
    ```bash theme={null}
    famulor create-assistant --name Mia -F tts_speed=1.1 -F 'tags[]=vip' -F metadata.source=cli -F system_prompt=@prompt.md
    ```

    `-F key=value` recognises numbers, `true`/`false`, `null` and JSON. A field the command knows keeps its declared type, so `-F to_number=4930123456` stays text. Dot paths set nested fields, `[]` appends to a list, and `@file` reads a file. Use `-f key=value` to always send the value as text. A field the command does not know is sent with a warning. On updates, an object or list you send replaces the stored one.
  </Tab>

  <Tab title="File uploads">
    ```bash theme={null}
    famulor set-assistant-avatar <id> --file avatar.png
    famulor set-assistant-greeting-audio <id> --file greeting.mp3
    ```
  </Tab>
</Tabs>

Before sending, the CLI checks that the JSON is valid and that every required field is set. An empty `--input` is an error, so a failed step earlier in a pipeline never sends a request with default values.

## Output formats

By default the CLI prints the API response as JSON: highlighted on a terminal, plain when piped. Progress and messages go to stderr, so the output stays clean for other tools.

| Option | Output |
| - | - |
| `--output json` | The full API response (default) |
| `--output table` | A table for lists, a label and value view for single records |
| `--output jsonl` | One JSON object per line for list items |

```bash theme={null}
famulor list-assistants --output table
famulor list-calls --columns id,status,to_number,created_at
```

`--columns` implies table output. Tables never shorten IDs, so you can copy them into the next command. On a terminal, times are shown in your time zone; in piped output they stay in the API's UTC format.

Set `FAMULOR_OUTPUT=table` to make tables the default in your shell.

## Pagination

Lists return one page at a time. `--all` follows the pages for you and returns every item. With `--output jsonl`, items are printed as soon as each page arrives.

```bash theme={null}
famulor list-leads <campaign-id> --all --output jsonl > leads.jsonl
```

## Audio and downloads

Commands that return audio or a recording save it with `--output-file`:

```bash theme={null}
famulor get-voice-preview <voice-id> --realtime-variant full_duplex --output-file preview.wav
famulor get-call-recording <call-id> --output-file call.ogg
```

## Any request

`famulor api` sends any request with your saved login, output options and retries. Paths are relative to `/api/v1`:

```bash theme={null}
famulor api GET /assistants --query limit=5
famulor api PATCH /assistants/<id> -F name="Front desk"
```
