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

# Command-line interface

> Use gatetrix-cli for profile-scoped file access, connector operations, and delegated connection setup.

The CLI lets local scripts and agents use Access from a terminal. It uses an
agent profile's MCP credential, grants, approvals, and rate limits. It is not a
desktop administration command line.

## Enable and authenticate

1. Install Access and create an [agent profile and credential](/access/quickstart).
2. Open **Access Channels → CLI** and enable **Allow CLI commands**.
3. Supply the credential through `GATETRIX_MCP_TOKEN` or `GATETRIX_ACCESS_TOKEN`
   in the process environment. Use your local secret-management mechanism;
   do not put a real token in chat, a repository, or command history.

The installed app includes `gatetrix-cli`; no separate Node installation is
needed. With the app in its standard Applications location, inspect its help:

```sh theme={null}
/Applications/Gatetrix.app/Contents/MacOS/gatetrix-cli --help
```

The examples below assume that directory is on your `PATH` and the token is
already set in your environment.

## Inspect the profile and read a file

```sh theme={null}
gatetrix-cli profile list
gatetrix-cli root list
gatetrix-cli connector list
```

Use an ID returned by `root list` in place of `ROOT_ID`. Paths are relative to
that granted root:

```sh theme={null}
gatetrix-cli tree ROOT_ID /
gatetrix-cli read ROOT_ID "Documents/example.pdf"
```

Access only returns resources available to the authenticated profile. An empty
list can mean that no resources have been granted yet.

## Call a saved connector operation

Replace the IDs and input with a permitted operation's actual contract:

```sh theme={null}
gatetrix-cli connector call CONNECTION_ID OPERATION_ID --input '{}'
```

If the response contains `approval_required`, the operation has not executed.
Decide the request in Access and inspect its saved result through the app or
MCP approval tools. Do not repeat a write to retrieve an approved result.

## Delegate connection setup

```sh theme={null}
gatetrix-cli setup capabilities
gatetrix-cli setup status
gatetrix-cli setup http --file connection.json
```

The first two commands describe installed support and the profile's setup
window. Configuration writes require the owner to enable **Configuration Mode**.
Use `setup mcp` or `setup postgresql` for those connection types. CLI definition
files use camelCase outer fields such as `connectorId` and `expectedUpdatedAt`;
nested HTTP and manifest fields use snake\_case. Keep credentials out of the files.

Follow the [connector setup process](/access/connectors) for sign-in, review,
scope verification, and closing setup access. CLI cannot create credentials,
change inbound listeners, or administer profile grants.

## Troubleshooting

Check the token, profile grants, and CLI switch when a command is denied. The
MCP switches do not control the CLI, and the CLI switch does not control MCP.
Use `gatetrix-cli audit list` to inspect permitted audit events, or **Audit Log**
in the Mac app for the owner's view.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.