> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/cli/getting-started/global-flags.md).

# Global flags

Flags available on every `celigo` command. These override config-file and env-var values.

| Flag                     | Purpose                                                                                                                         |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `--token <value>`        | API bearer token. Overrides `CELIGO_API_TOKEN` and profile. Prefer the env var to avoid exposing the token in the process list. |
| `--base-url <url>`       | API base URL. Overrides `CELIGO_BASE_URL` and profile.                                                                          |
| `--profile <name>`       | Use a specific profile for this command only.                                                                                   |
| `--format <json\|table>` | Output format. Default `json`.                                                                                                  |
| `--jq <expr>`            | Transform JSON output through a jq expression.                                                                                  |
| `--verbose`              | Print the underlying HTTP request and response (redacted).                                                                      |
| `-v, --version`          | Print CLI version and exit.                                                                                                     |
| `-h, --help`             | Show help for the current command.                                                                                              |

## `--format`

Default is `json`. Override per invocation, per profile, or via env var:

```bash
celigo flows list --format table       # one command
export CELIGO_FORMAT=table             # shell session
celigo config set default_format table # active profile (persistent)
```

Not every resource honors `table` — if a list command has no defined columns, it falls back to JSON regardless of `--format`.

## `--jq`

Applies a jq expression to the JSON response. Useful for one-liners without piping:

```bash
celigo integrations list --jq '.[] | {_id, name}'
celigo flows get 5f83a9b2c7d3e8f1a2b3c4d5 --jq '{name, disabled, schedule}'
```

`--jq` is incompatible with `--format table` — a jq filter implies JSON input and output.

## `--verbose`

Prints each HTTP request and response to stderr. Auth headers are redacted.

```bash
$ celigo flows list --verbose
GET https://api.integrator.io/v1/flows
> Authorization: Bearer abc…xyz    [REDACTED]
> Accept: application/json

< 200 OK
< Content-Type: application/json
< Link: <…>; rel="next"
[ … body preview … ]
```

## Combine

All global flags can be mixed freely and placed before or after the subcommand:

```bash
celigo --profile eu --format json flows list
celigo flows list --profile eu --format json
```

## Field projection on `list` commands

`--fields` and `--limit` are not global flags. They appear on `list` verbs, and they control how much data a listing returns. This section documents them here because the projection default affects almost every `list` command.

### The default

A `list` command asks the API for a trimmed row rather than the complete resource document. Each row carries `_id`, `name`, and the fields the command's table columns need. This is the default because full collections are large: on one production account, `celigo exports list` returned 12.9 MB of JSON, and the projected listing returns 183 KB — 98.6% smaller. `celigo flows list` is 7.5 times smaller.

The lean shape is what most work needs. You list to find a resource, then `get` it by ID. `get` is never projected and always returns the complete document.

### `--fields`

| Value     | Result                                                                                                  |
| --------- | ------------------------------------------------------------------------------------------------------- |
| omitted   | The command's built-in projection: `_id`, `name`, and the table columns.                                |
| `default` | The same built-in projection, stated explicitly.                                                        |
| `all`     | Complete documents, as the API returns them.                                                            |
| `a,b,c`   | `_id`, `name`, and the named fields. Dot notation selects nested paths, for example `http.relativeURI`. |

```bash
# The default projection
celigo flows list --format table

# Complete flow documents
celigo flows list --fields all

# Just the schedule, plus the identity fields that always travel
celigo flows list --fields schedule,disabled
```

An explicit field list is a floor, not an exact shape. `_id` and `name` are always requested, and so is any field the command reads off each row internally. `celigo ai-agents list --fields lastModified` requests `lastModified` and `adaptorType`, because the command filters on `adaptorType` client-side. Dropping that field would break the command, not just the display. Expect at least the fields you named — never fewer.

### `--limit`

`--limit <n>` caps the number of rows and fetches a single page. It exists only on the standard `list` verb.

Seven listings are built differently and accept `--fields` without `--limit`:

* `ai-agents list`
* `guardrails list`
* `notifications list`
* `stacks list`
* `http-connectors list`
* `trading-partner-connectors list`
* `templates marketplace`

To cap output from those, filter with `--jq`.

### Precedence

Four inputs can decide the projection. They resolve in this order:

1. `--fields` on the command
2. `--jq` on the command, which requests complete documents
3. The profile's `list_fields` setting — see [Configuration reference](/cli/getting-started/configuration.md)
4. The command's built-in default projection

`--jq` implies complete documents only when `--fields` is absent. A jq expression addresses the full document, so projecting underneath it would return `null` instead of an error. Combining `--jq` with an explicit `--fields` projects the rows first, and the expression then reads whatever the projection kept:

```bash
# Complete documents, so the expression sees every field
celigo exports list --jq '.[] | select(.adaptorType == "RESTExport") | .name'

# Projected first: fields outside the list resolve to null
celigo exports list --fields name --jq '.[] | {name, adaptorType}'
```

### What is never projected

* `get` on any resource, and every other single-resource read.
* `account snapshot`, which builds the local index from complete documents.
* `jobs`, `sync-jobs`, and `recycle-bin` listings.
* `storage list` and `storage search`.
* `audit` listings and the flow error listings.

### Endpoints that ignore the request

The CLI requests a projection through the API's `include` query parameter. A few endpoints do not recognize it and return complete rows regardless. The CLI trims those rows locally, so the printed output matches the documented shape either way. Only the transfer size is unaffected.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.celigo.com/cli/getting-started/global-flags.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
