# Настройка и обслуживание (/ru/docs/max/commands-setup)

Здесь собраны команды настройки и обслуживания. Вы найдёте параметры входа, профилей, настроек, фонового сервера, локального хранилища, диагностики и подключения агента.

Вход, профили, настройки, фоновый сервер, локальное хранилище, диагностика, подключение агента и обновления.

## Общие опции [#общие-опции]

Действуют на любую команду.

| Опция | Что делает |
| --- | --- |
| `-V, --version` | output the version number. |
| `-v, --verbose` | more detail in what is shown: -v ids, -vv everything we know. По умолчанию: `0`. |
| `--json` | machine-readable output: one JSON value on stdout, nothing else. |
| `--agent-json` | JSON для ИИ-агента: невидимые управляющие символы показаны явно; обычный --json сохраняет текст. |
| `--jsonl` | machine-readable output: one JSON object per line, for streaming and jq. |
| `--quiet` | diagnostics off. |
| `--trace` | one line per request on stderr: ids and timings, never message content. |
| `--debug` | при сбое — полная запись (причина и стек) вместо короткой строки. |
| `--timeout <duration>` | give up on the whole command after this — 30s, 2m, 500ms. |
| `--offline` | answer from what was recorded and never connect; fails if nothing was. |
| `--no-input` | не запрашивать ввод и не открывать интерактивный вход; ввод через канал остаётся доступным. |
| `--max-input-bytes <bytes>` | максимальный размер буферизованного ввода в байтах (по умолчанию: 16777216). |
| `--max-output-bytes <bytes>` | максимальный размер машинного вывода в байтах (по умолчанию: 4194304; 0 отключает ограничение). |
| `--fields <paths>` | поля элементов или объекта через запятую: id,text; сохранять пагинацию и идентификаторы операций. |
| `--brief` | найденные сообщения и письма — только ссылка, название, время, отправитель и отрывок. |
| `--full` | найденные сообщения и письма целиком, со всеми полями провайдера. |
| `--dry-run` | предварительно показать разобранные аргументы и разрешения перед выполнением действия. |
| `--yes` | go ahead without the question an ask level puts before a write. |
| `--record` | keep this run under `max runs`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-runs "Справочник команды: max runs") — ids and timings, never message content. |
| `--no-record` | do not keep it, whatever the configuration says. |
| `--serve` | start `max serve`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-serve "Справочник команды: max serve") in the background if it is not running (the default). |
| `--no-serve` | do not start it; log in on this command's own connection unless one is running. |

## Команды [#команды]

## `max session` [#max-session]

the stored MAX session for this profile

### `max session start` [#max-session-start]

log this profile in to MAX

```sh
max session start [method]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `method` | необязательный | token (pasted or piped), qr, qr-chrome or sms. Одно из: `token`, `qr`, `qr-chrome`, `sms`. По умолчанию: `token`. |

### `max session end` [#max-session-end]

выйти из этого профиля на стороне MAX и удалить сохранённую здесь сессию

**Меняет что-то в MAX.**

```sh
max session end
```

## `max setup` [#max-setup]

set up your personal MAX account and connect your agent

**Меняет что-то в MAX.**

```sh
max setup [options]
```

| Опция | Что делает |
| --- | --- |
| `--agent <agent>` | install the skill for this agent; asks at a terminal, otherwise none. Одно из: `none`, `codex`, `cursor`, `claude`, `gemini`, `all`. |
| `--method <method>` | how to log in when there is no session. Одно из: `token`, `qr`, `qr-chrome`, `sms`. По умолчанию: `qr`. |

## `max account` [#max-account]

the logged-in account

### `max account list` [#max-account-list]

все профили на этом компьютере и аккаунт каждого; не обращается к мессенджеру

```sh
max account list
```

### `max account show` [#max-account-show]

who this profile is logged in as; the phone number shows its last four digits

```sh
max account show [options]
```

| Опция | Что делает |
| --- | --- |
| `--show-phone` | показать номер телефона целиком. |

### `max account update` [#max-account-update]

change the name, the description or the photo everyone sees on your profile

**Меняет что-то в MAX.**

```sh
max account update [options]
```

| Опция | Что делает |
| --- | --- |
| `--first-name <name>` | your first name. |
| `--last-name <name>` | your last name. |
| `--description <text>` | about you. |
| `--photo <file>` | a new profile photo — an image file. |

### `max account sessions` [#max-account-sessions]

where else this account is logged in — not `max session`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-session "Справочник команды: max session"), which is this tool's own login

#### `max account sessions list` [#max-account-sessions-list]

every device and app logged in to this account; nothing is ended

```sh
max account sessions list
```

#### `max account sessions end` [#max-account-sessions-end]

log out every other device, your phone included; this one stays

**Меняет что-то в MAX.**

```sh
max account sessions end [options]
```

| Опция | Что делает |
| --- | --- |
| `--others` | every session but this one. |

### `max account privacy` [#max-account-privacy]

кто может найти аккаунт, позвонить или добавить его

#### `max account privacy show` [#max-account-privacy-show]

настройки приватности аккаунта; чтение ничего не меняет

```sh
max account privacy show
```

#### `max account privacy set` [#max-account-privacy-set]

изменить, кто может найти аккаунт, позвонить или добавить его; остальные настройки сохраняются

**Меняет что-то в MAX.**

```sh
max account privacy set [options]
```

| Опция | Что делает |
| --- | --- |
| `--find-by-phone <who>` | кто находит аккаунт по номеру: everyone, contacts или nobody; MAX принимает everyone и contacts. |
| `--phone-number <who>` | кто видит номер: everyone, contacts или nobody. |
| `--calls <who>` | кто может звонить: everyone, contacts или nobody. |
| `--chat-invites <who>` | кто добавляет аккаунт в группы и каналы: everyone, contacts или nobody. |
| `--hide-online <on\|off>` | скрыть статус онлайн и время последнего входа. |

## `max store` [#max-store]

the local store of messages

### `max store status` [#max-store-status]

per chat: messages stored, the oldest and newest, and the stretches held completely

```sh
max store status [chat]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `chat` | необязательный | чат: его ID или часть названия. |

### `max store gaps` [#max-store-gaps]

проверить записанные внутренние пробелы охвата и явно загрузить данные для них

#### `max store gaps plan` [#max-store-gaps-plan]

локальный план охвата; отсутствие идентификаторов сообщений само по себе не означает нехватку истории

```sh
max store gaps plan <chat>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `chat` | обязательный | чат: его ID или часть названия. |

#### `max store gaps repair` [#max-store-gaps-repair]

загрузить данные внутренних пробелов с ограничениями и перепроверить охват; никогда не удалять сообщения, которые не встретились при загрузке

```sh
max store gaps repair <chat> [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `chat` | обязательный | чат: его ID или часть названия. |

| Опция | Что делает |
| --- | --- |
| `--limit <n>` | общее число сообщений при этом устранении пробелов, по умолчанию 500. |
| `--max-gaps <n>` | не более указанного числа пробелов, по умолчанию 5. |
| `--repair-time <duration>` | время, отведённое на восстановление, по умолчанию 30s. По умолчанию: `30s`. |
| `--page-size <n>` | число сообщений на страницу провайдера. |
| `--pause <duration>` | пауза между страницами провайдера. По умолчанию: `5s`. |
| `--fingerprint <hash>` | отказать, если этот ранее проверенный план охвата изменился. |
| `--catch-up` | подготовить локальный поиск после устранения пробелов; переопределяет searchCatchUp. |
| `--no-catch-up` | пропустить подготовку локального поиска после устранения пробелов. |
| `--catch-up-chunks <n>` | максимальное число подготавливаемых локальных фрагментов. |
| `--catch-up-messages <n>` | максимальное число сохранённых сообщений, читаемых для подготовки. |
| `--catch-up-time <duration>` | время подготовки в пределах оставшегося лимита устранения пробелов. |
| `--background` | устранять пробелы через существующий механизм заданий хранилища; проверять через store jobs show. |

### `max store jobs` [#max-store-jobs]

фоновые задания синхронизации

#### `max store jobs list` [#max-store-jobs-list]

фоновые задания синхронизации, новые сверху

```sh
max store jobs list [options]
```

| Опция | Что делает |
| --- | --- |
| `--state <state>` | Только задачи в состоянии `running`, `done`, `failed`, `cancelled` или `died`. |

#### `max store jobs show` [#max-store-jobs-show]

one background job — the newest when none is named — and what the store now holds of its chat

```sh
max store jobs show [job]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `job` | необязательный | ID задания, который напечатала `messages sync --background`[↗](/llms.mdx/docs/ru/max/commands-personal/content.md#max-messages-sync "Справочник команды: max messages sync"). |

#### `max store jobs cancel` [#max-store-jobs-cancel]

остановить идущее фоновое задание после текущей страницы; следующая синхронизация продолжит с того же места

```sh
max store jobs cancel <job>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `job` | обязательный | the job id. |

#### `max store jobs retry` [#max-store-jobs-retry]

запустить частичное, неудавшееся или умершее задание заново, новым заданием; синхронизация продолжится с того места, где остановилось хранилище

```sh
max store jobs retry [job] [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `job` | необязательный | ID задания. |

| Опция | Что делает |
| --- | --- |
| `--failed` | каждый чат, чьё последнее задание осталось частичным, завершилось ошибкой или умерло. |

#### `max store jobs clear` [#max-store-jobs-clear]

забыть завершённые задания и удалить их логи; работающее задание остаётся

**Меняет что-то только на этом компьютере.**

```sh
max store jobs clear
```

### `max store export` [#max-store-export]

сохранённые сообщения чата, от старых к новым: --jsonl — одно сообщение на строку, --json — один объект \{ items, page, limit, hasMore }; к мессенджеру не обращается

```sh
max store export [chats] [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `chats`[↗](/llms.mdx/docs/ru/max/commands-personal/content.md#max-chats "Справочник команды: max chats") | необязательный | a chat: its id, or part of its title; several with --to. |

| Опция | Что делает |
| --- | --- |
| `--format <format>` | jsonl: одно сообщение на строку, по умолчанию с --output; markdown: стенограмма с заголовком на каждый день, ответы и пересылки цитируются. |
| `--since-time <time>` | only from this ISO 8601 time, or 30m / 2h / 1d ago, on. |
| `--output <file>` | write JSON lines, or the transcript, to this new file, readable only by you. |
| `--to <dir>` | write into this folder, a file per chat and a manifest; run again on it for only what changed since. |
| `--kind <kinds>` | with --to: every stored chat of these kinds, comma-separated: dialog, group, channel, saved. |
| `--all` | with --to: every stored chat of this account. |
| `--encrypt` | compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept — lose it and the file cannot be opened. |

### `max store clear` [#max-store-clear]

delete from the store the chats this account has left, with their messages

```sh
max store clear [options]
```

| Опция | Что делает |
| --- | --- |
| `--left` | the chats this account has left — the only thing this clears. |
| `--allow-dangerous` | yes, delete — it cannot be undone, and a chat you left cannot be fetched again. |

### `max store info` [#max-store-info]

the store file: where it is, its size, its schema and how many rows it holds; changes nothing

```sh
max store info
```

### `max store check` [#max-store-check]

whether the store is healthy — integrity, search indexes, disk, and which chats are behind

```sh
max store check
```

### `max store migrate` [#max-store-migrate]

обновить схему архива, нормализовать сообщения и заметки, построить индексы слов и основ

```sh
max store migrate
```

### `max store reindex` [#max-store-reindex]

перестроить индексы слов, опечаток, основ, файлов и заметок без удаления данных

```sh
max store reindex
```

### `max store backup` [#max-store-backup]

copy the store into a new file, while it is in use; never overwrites a file

```sh
max store backup <file> [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `file` | обязательный | the new file. |

| Опция | Что делает |
| --- | --- |
| `--encrypt` | compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept — lose it and the file cannot be opened. |

### `max store restore` [#max-store-restore]

put a backup in place of the store; the store it replaces is kept beside it, never deleted

```sh
max store restore <file>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `file` | обязательный | a file `store backup`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-store-backup "Справочник команды: max store backup") wrote; one written with --encrypt asks for its password. |

### `max store decrypt` [#max-store-decrypt]

open a file written with --encrypt into a new file; asks for its password

```sh
max store decrypt <file> [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `file` | обязательный | a file `store backup --encrypt`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-store-backup "Справочник команды: max store backup") or `store export --encrypt`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-store-export "Справочник команды: max store export") wrote. |

| Опция | Что делает |
| --- | --- |
| `--output <file>` | the new file, readable only by you. |

### `max store repair` [#max-store-repair]

bring every table to this build's shape, deleting nothing: a table of the wrong shape is kept as a copy beside a new one

```sh
max store repair [options]
```

| Опция | Что делает |
| --- | --- |
| `--dry-run` | say what it would do, and change nothing. |

### `max store reset` [#max-store-reset]

back the store up beside itself, then delete it and start an empty one at this build's schema; asks first, or --yes

```sh
max store reset [options]
```

| Опция | Что делает |
| --- | --- |
| `--no-backup` | delete the store without backing it up first. |

### `max store copies` [#max-store-copies]

the tables `store repair`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-store-repair "Справочник команды: max store repair") kept as copies

#### `max store copies delete` [#max-store-copies-delete]

delete one copy `store repair`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-store-repair "Справочник команды: max store repair") kept, named exactly; refuses any other table

```sh
max store copies delete <name>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `name` | обязательный | the copy's name, as `store repair`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-store-repair "Справочник команды: max store repair") printed it. |

## `max flood` [#max-flood]

the waits MAX asked this profile to keep, and a hold on its writes

### `max flood clear` [#max-flood-clear]

забыть их, снять приостановку и ограничение темпа профиля, когда MAX больше не ограничивает аккаунт; на стороне MAX ничего не меняется

```sh
max flood clear
```

## `max models` [#max-models]

models that run on this machine

### `max models audio` [#max-models-audio]

speech models for transcribing voice messages

#### `max models audio list` [#max-models-audio-list]

the speech models, most suitable first, which are downloaded, and which one is the default

```sh
max models audio list
```

#### `max models audio download` [#max-models-audio-download]

download a speech model once, checked against the sha256 this version expects

```sh
max models audio download <model>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `model` | обязательный | a model id from `models audio list`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-models-audio-list "Справочник команды: max models audio list"). |

### `max models text` [#max-models-text]

embedding models for searching conversations by meaning

#### `max models text list` [#max-models-text-list]

the embedding models, most suitable first, which are downloaded, and which one is the default

```sh
max models text list
```

#### `max models text download` [#max-models-text-download]

download an embedding model once, checked against the sha256 this version expects

```sh
max models text download <model> [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `model` | обязательный | a model id from `models text list`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-models-text-list "Справочник команды: max models text list"). |

| Опция | Что делает |
| --- | --- |
| `--accept-terms` | accept the model's licence terms, for a model that has its own. |

#### `max models text key` [#max-models-text-key]

API keys for embedding and analysis providers

#### `max models text key set` [#max-models-text-key-set]

store a key, typed at a hidden prompt or piped on stdin — never as an argument

```sh
max models text key set <provider>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `provider` | обязательный | openai, anthropic, or the host of a --base-url server that wants a key. |

#### `max models text key remove` [#max-models-text-key-remove]

forget a stored key

```sh
max models text key remove <provider>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `provider` | обязательный | openai, anthropic, or a server's host. |

## `max serve` [#max-serve]

stay connected to MAX and stream new messages to `max watch`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-watch "Справочник команды: max watch"), until Ctrl-C

```sh
max serve [options]
```

| Опция | Что делает |
| --- | --- |
| `--idle <duration>` | stop after this long with nobody using it — 15m, 1h is 60m. |

## `max server` [#max-server]

`max serve`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-serve "Справочник команды: max serve") in the background: start, stop, restart, status, logs; install adds a systemd or launchd unit

### `max server start` [#max-server-start]

start serve in the background — through the unit if one is installed — and answer once it connects

```sh
max server start [options]
```

| Опция | Что делает |
| --- | --- |
| `--idle <duration>` | остановиться, если им никто не пользуется столько времени — 15m, 1h. |

### `max server stop` [#max-server-stop]

stop this profile's serve — through the unit if it runs under one

```sh
max server stop
```

### `max server restart` [#max-server-restart]

stop it and start it again

```sh
max server restart [options]
```

| Опция | Что делает |
| --- | --- |
| `--idle <duration>` | остановиться, если им никто не пользуется столько времени — 15m, 1h. |

### `max server status` [#max-server-status]

whether serve runs for this profile, since when, who started it, and the unit if there is one

```sh
max server status
```

### `max server logs` [#max-server-logs]

serve's latest log lines — from the journal under systemd, else its log file

```sh
max server logs [options]
```

| Опция | Что делает |
| --- | --- |
| `-n, --lines <n>` | how many lines. По умолчанию: `50`. |

### `max server install` [#max-server-install]

write a systemd user unit or a launchd agent for this profile; starts nothing

```sh
max server install
```

### `max server uninstall` [#max-server-uninstall]

remove this profile's unit; stop it first

```sh
max server uninstall
```

## `max watch` [#max-watch]

print new messages as they arrive, from a running `max serve`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-serve "Справочник команды: max serve")

```sh
max watch [options]
```

| Опция | Что делает |
| --- | --- |
| `--events` | также выводить правки, удаления, реакции, прочтения и изменения чатов; каждая строка содержит вид события. |

## `max config` [#max-config]

the settings in force, and where each one came from

### `max config show` [#max-config-show]

the profile, the profiles that exist, and each setting with where it came from

```sh
max config show [options]
```

| Опция | Что делает |
| --- | --- |
| `--bot` | the settings a bot command on this profile gets, rather than the personal account's. |

### `max config migrate` [#max-config-migrate]

replace legacy access settings with permissions, preserving effective levels

**Меняет что-то только на этом компьютере.**

```sh
max config migrate [options]
```

| Опция | Что делает |
| --- | --- |
| `--dry-run` | show the migration without writing the file. |

### `max config set` [#max-config-set]

save a setting to the configuration file

**Меняет что-то только на этом компьютере.**

```sh
max config set <setting> <value> [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `setting` | обязательный | одно из: limit, timeoutMs, color, record, keepRunsForDays, readOnly, allow, permissions, sendsPerHour, requestsPerMinute, embeddingProvider, embeddingModel, embeddingBaseUrl, embeddingDims, analysisProvider, analysisModel, analysisBaseUrl, models, senderColors, catchUpMarksRead, searchCatchUp, serve, mcpTools, readOtherBots, updateCheck, skillHint, transcribeModel, defaultProfile, searchStemmers.cyrillic, searchStemmers.latin. |
| `value` | обязательный | a number, true or false, or for allow a list like send,reaction. |

| Опция | Что делает |
| --- | --- |
| `--defaults` | изменить значение для всех профилей, а не только для этого. |
| `--personal` | только для личных аккаунтов — раздел personal в файле. |
| `--bot` | только для ботов — раздел bot в файле. |

### `max config unset` [#max-config-unset]

remove a setting from the configuration file

**Меняет что-то только на этом компьютере.**

```sh
max config unset <setting> [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `setting` | обязательный | одно из: limit, timeoutMs, color, record, keepRunsForDays, readOnly, allow, permissions, sendsPerHour, requestsPerMinute, embeddingProvider, embeddingModel, embeddingBaseUrl, embeddingDims, analysisProvider, analysisModel, analysisBaseUrl, models, senderColors, catchUpMarksRead, searchCatchUp, serve, mcpTools, readOtherBots, updateCheck, skillHint, transcribeModel, defaultProfile, searchStemmers.cyrillic, searchStemmers.latin. |

| Опция | Что делает |
| --- | --- |
| `--defaults` | изменить значение для всех профилей, а не только для этого. |
| `--personal` | только для личных аккаунтов — раздел personal в файле. |
| `--bot` | только для ботов — раздел bot в файле. |

## `max doctor` [#max-doctor]

the state this installation is in, without contacting MAX unless --online

```sh
max doctor [options]
```

| Опция | Что делает |
| --- | --- |
| `--online` | also log in once, read one chat and start the MCP server; sends nothing. |

### `max doctor report` [#max-doctor-report]

what a problem report holds and where it goes; writes nothing

#### `max doctor report create` [#max-doctor-report-create]

write a problem report to a file, and print how to send it

```sh
max doctor report create [options]
```

| Опция | Что делает |
| --- | --- |
| `--run <id>` | the run the report is about; the newest failed one if not given. |
| `--output <file>` | where to write it; a new file in this directory if not given. |

## `max runs` [#max-runs]

recorded runs — what this tool did, and when

### `max runs list` [#max-runs-list]

recorded runs, newest first

```sh
max runs list [options]
```

| Опция | Что делает |
| --- | --- |
| `--limit <n>` | how many to show. По умолчанию: `20`. |

### `max runs show` [#max-runs-show]

один запуск: что это было, чем закончилось и что пошло не так; -v — все события

```sh
max runs show <run-id>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `run-id` | обязательный | ID из `max runs list`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-runs-list "Справочник команды: max runs list"). |

### `max runs search` [#max-runs-search]

search recorded diagnostic metadata and events; no message contents

```sh
max runs search [query] [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `query` | необязательный | case-insensitive literal diagnostic text. |

| Опция | Что делает |
| --- | --- |
| `--status <status>` | run outcome. Одно из: `success`, `failed`, `partial`, `running`. |
| `--error-code <code>` | one stable error code. |
| `--operation <name>` | one operation, such as messages.download. |
| `--profile <name>` | one recorded profile. |
| `--since-time <time>` | runs starting on or after an ISO time or 2h / 1d ago. |
| `--limit <n>` | matches per page, at most 100. По умолчанию: `20`. |
| `--page <n>` | result page. По умолчанию: `1`. |

### `max runs path` [#max-runs-path]

the directory holding one run

```sh
max runs path <run-id>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `run-id` | обязательный | ID из `max runs list`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-runs-list "Справочник команды: max runs list"). |

## `max skill` [#max-skill]

the instructions an agent is given for this tool

### `max skill show` [#max-skill-show]

print SKILL.md — `max skill install`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-skill-install "Справочник команды: max skill install") puts it where Claude Code, Codex and Gemini CLI look for it

```sh
max skill show [name]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `name` | необязательный | один из навыков для задачи, которые идут в комплекте: follow-ups, link-conversations. |

### `max skill install` [#max-skill-install]

write SKILL.md to \~/.claude/skills/max-cli/ (Claude Code) and \~/.agents/skills/max-cli/ (Codex, Gemini CLI)

```sh
max skill install [options]
```

| Опция | Что делает |
| --- | --- |
| `--for <agents>` | which agents to install for. Одно из: `claude`, `agents`, `all`. По умолчанию: `all`. |

## `max commands` [#max-commands]

commands, options and exit codes as JSON — inspect one command path per call

### `max commands schema` [#max-commands-schema]

argv и схемы результатов одной команды, эффекты, разрешения и указания по повторным попыткам

```sh
max commands schema <path>
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `path` | обязательный | один путь команды, например: stats messages show. |

## `max upgrade` [#max-upgrade]

upgrade max with the package manager that installed it; --check only looks

```sh
max upgrade [options]
```

| Опция | Что делает |
| --- | --- |
| `--check` | say whether a newer version exists, and install nothing. |

## `max complete` [#max-complete]

shell completion: `max complete zsh`[↗](/llms.mdx/docs/ru/max/commands-setup/content.md#max-complete "Справочник команды: max complete") prints the script to source

```sh
max complete [words]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `words` | необязательный | |

## `max mcp` [#max-mcp]

serve this profile to an agent over MCP, on stdin and stdout — `claude mcp add max -- max mcp`

```sh
max mcp [options]
```

| Опция | Что делает |
| --- | --- |
| `--permission <key=level>` | переопределить разрешение только для этого сервера; повторите для нескольких ключей. |
| `--allow-dangerous` | больше не используется — операции записи не показывают форму; решение определяют разрешения профиля. |
| `--allow-send` | устарело: используйте permissions.messages.send в настройках; доступа не даёт. |
| `--confirm-send` | больше не используется — операции записи не показывают форму; решение определяют разрешения профиля. |
| `--allow-mark-read` | устарело: используйте permissions.chats.mark-read в настройках; доступа не даёт. |
| `--allow-delete` | устарело: используйте permissions.messages.delete в настройках; доступа не даёт. |
| `--allow-moderate` | устарело: используйте permissions.chats.moderate и правила группы; доступа не даёт. |
| `--http` | предоставлять HTTP-сервер на 127.0.0.1 для ChatGPT и Claude в браузере через ваш туннель; действуют права профиля. |
| `--http-confirmation <mode>` | больше не используется — операции записи не показывают форму; решение определяют разрешения профиля. |
| `--port <port>` | the local port for --http (default 8765). |
| `--public-url <url>` | the tunnel's https address the browser apps use, e.g. https\://<name>.ts.net. |
| `--revoke` | forget every login given to a browser app; each must log in again. |

### `max mcp config` [#max-mcp-config]

print the mcpServers entry for Claude Desktop, Cursor and others, with full paths; writes nothing

```sh
max mcp config [options]
```

| Опция | Что делает |
| --- | --- |
| `--permission <key=level>` | переопределить разрешение только для этого сервера; повторите для нескольких ключей. |
| `--allow-dangerous` | больше не используется — операции записи не показывают форму; решение определяют разрешения профиля. |
| `--allow-send` | устарело: используйте permissions.messages.send в настройках; доступа не даёт. |
| `--confirm-send` | больше не используется — операции записи не показывают форму; решение определяют разрешения профиля. |
| `--allow-mark-read` | устарело: используйте permissions.chats.mark-read в настройках; доступа не даёт. |
| `--allow-delete` | устарело: используйте permissions.messages.delete в настройках; доступа не даёт. |
| `--allow-moderate` | устарело: используйте permissions.chats.moderate и правила группы; доступа не даёт. |

### `max mcp setup` [#max-mcp-setup]

add this profile's local MCP server to Codex or Claude Code

**Меняет что-то только на этом компьютере.**

```sh
max mcp setup <client> [options]
```

| Аргумент | Обязательность | Что это |
| --- | --- | --- |
| `client` | обязательный | codex or claude-code. |

| Опция | Что делает |
| --- | --- |
| `--allow-writes` | acknowledge that this profile offers writing tools. |
| `--permission <key=level>` | переопределить разрешение только для этого сервера; повторите для нескольких ключей. |
| `--allow-dangerous` | больше не используется — операции записи не показывают форму; решение определяют разрешения профиля. |
| `--allow-send` | устарело: используйте permissions.messages.send в настройках; доступа не даёт. |
| `--confirm-send` | больше не используется — операции записи не показывают форму; решение определяют разрешения профиля. |
| `--allow-mark-read` | устарело: используйте permissions.chats.mark-read в настройках; доступа не даёт. |
| `--allow-delete` | устарело: используйте permissions.messages.delete в настройках; доступа не даёт. |
| `--allow-moderate` | устарело: используйте permissions.chats.moderate и правила группы; доступа не даёт. |

### `max mcp doctor` [#max-mcp-doctor]

check this profile's local MCP handshake and tool list

```sh
max mcp doctor [options]
```

| Опция | Что делает |
| --- | --- |
| `--permission <key=level>` | переопределить разрешение только для этого сервера; повторите для нескольких ключей. |
| `--allow-dangerous` | больше не используется — операции записи не показывают форму; решение определяют разрешения профиля. |
| `--allow-send` | устарело: используйте permissions.messages.send в настройках; доступа не даёт. |
| `--confirm-send` | больше не используется — операции записи не показывают форму; решение определяют разрешения профиля. |
| `--allow-mark-read` | устарело: используйте permissions.chats.mark-read в настройках; доступа не даёт. |
| `--allow-delete` | устарело: используйте permissions.messages.delete в настройках; доступа не даёт. |
| `--allow-moderate` | устарело: используйте permissions.chats.moderate и правила группы; доступа не даёт. |

## Коды возврата [#коды-возврата]

Скрипт ветвится по коду, а не по тексту: текст меняется, код — нет.

| Код | Когда |
| --- | --- |
| `0` | получилось |
| `2` | `validation_error` |
| `3` | `configuration_error` |
| `4` | `authentication_error` |
| `5` | `permission_error` |
| `6` | `not_found` |
| `7` | `confirmation_required` |
| `8` | `rate_limited` |
| `9` | `timeout` |
| `10` | `network_error` |
| `11` | `provider_error` |
| `12` | `provider_unavailable` |
| `13` | `invalid_response` |
| `14` | `outcome_unknown` |
| `130` | `cancelled` |
| `1` | всё остальное |

`0` и только `0` означает, что операция выполнена. `14` — `outcome_unknown` — означает, что
сообщение **могло** уйти: не отправлено и не провалено, и повторять его можно только с тем же
`--send-id`.
