Настройка и обслуживание

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

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

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

Общие опции

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

ОпцияЧто делает
-V, --versionoutput the version number.
-v, --verbosemore detail in what is shown: -v ids, -vv everything we know. По умолчанию: 0.
--jsonmachine-readable output: one JSON value on stdout, nothing else.
--agent-jsonJSON для ИИ-агента: невидимые управляющие символы показаны явно; обычный --json сохраняет текст.
--jsonlmachine-readable output: one JSON object per line, for streaming and jq.
--quietdiagnostics off.
--traceone 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.
--offlineanswer 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предварительно показать разобранные аргументы и разрешения перед выполнением действия.
--yesgo ahead without the question an ask level puts before a write.
--recordkeep this run under max runs — ids and timings, never message content.
--no-recorddo not keep it, whatever the configuration says.
--servestart max serve in the background if it is not running (the default).
--no-servedo not start it; log in on this command's own connection unless one is running.

Команды

max session

the stored MAX session for this profile

max session start

log this profile in to MAX

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

max session end

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

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

max session end

max setup

set up your personal MAX account and connect your agent

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

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

the logged-in account

max account list

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

max account list

max account show

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

max account show [options]
ОпцияЧто делает
--show-phoneпоказать номер телефона целиком.

max account update

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

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

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

where else this account is logged in — not max session, which is this tool's own login

max account sessions list

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

max account sessions list

max account sessions end

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

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

max account sessions end [options]
ОпцияЧто делает
--othersevery session but this one.

max account privacy

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

max account privacy show

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

max account privacy show

max account privacy set

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

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

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

the local store of messages

max store status

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

max store status [chat]
АргументОбязательностьЧто это
chatнеобязательныйчат: его ID или часть названия.

max store gaps

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

max store gaps plan

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

max store gaps plan <chat>
АргументОбязательностьЧто это
chatобязательныйчат: его ID или часть названия.

max store gaps repair

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

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 list

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

max store jobs list [options]
ОпцияЧто делает
--state <state>Только задачи в состоянии running, done, failed, cancelled или died.

max store jobs show

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

max store jobs show [job]
АргументОбязательностьЧто это
jobнеобязательныйID задания, который напечатала messages sync --background.

max store jobs cancel

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

max store jobs cancel <job>
АргументОбязательностьЧто это
jobобязательныйthe job id.

max store jobs retry

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

max store jobs retry [job] [options]
АргументОбязательностьЧто это
jobнеобязательныйID задания.
ОпцияЧто делает
--failedкаждый чат, чьё последнее задание осталось частичным, завершилось ошибкой или умерло.

max store jobs clear

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

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

max store jobs clear

max store export

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

max store export [chats] [options]
АргументОбязательностьЧто это
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.
--allwith --to: every stored chat of this account.
--encryptcompress 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

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

max store clear [options]
ОпцияЧто делает
--leftthe chats this account has left — the only thing this clears.
--allow-dangerousyes, delete — it cannot be undone, and a chat you left cannot be fetched again.

max store info

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

max store info

max store check

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

max store check

max store migrate

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

max store migrate

max store reindex

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

max store reindex

max store backup

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

max store backup <file> [options]
АргументОбязательностьЧто это
fileобязательныйthe new file.
ОпцияЧто делает
--encryptcompress 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

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

max store restore <file>
АргументОбязательностьЧто это
fileобязательныйa file store backup wrote; one written with --encrypt asks for its password.

max store decrypt

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

max store decrypt <file> [options]
АргументОбязательностьЧто это
fileобязательныйa file store backup --encrypt or store export --encrypt wrote.
ОпцияЧто делает
--output <file>the new file, readable only by you.

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

max store repair [options]
ОпцияЧто делает
--dry-runsay what it would do, and change nothing.

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

max store reset [options]
ОпцияЧто делает
--no-backupdelete the store without backing it up first.

max store copies

the tables store repair kept as copies

max store copies delete

delete one copy store repair kept, named exactly; refuses any other table

max store copies delete <name>
АргументОбязательностьЧто это
nameобязательныйthe copy's name, as store repair printed it.

max flood

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

max flood clear

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

max flood clear

max models

models that run on this machine

max models audio

speech models for transcribing voice messages

max models audio list

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

max models audio list

max models audio download

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

max models audio download <model>
АргументОбязательностьЧто это
modelобязательныйa model id from models audio list.

max models text

embedding models for searching conversations by meaning

max models text list

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

max models text list

max models text download

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

max models text download <model> [options]
АргументОбязательностьЧто это
modelобязательныйa model id from models text list.
ОпцияЧто делает
--accept-termsaccept the model's licence terms, for a model that has its own.

max models text key

API keys for embedding and analysis providers

max models text key set

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

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

forget a stored key

max models text key remove <provider>
АргументОбязательностьЧто это
providerобязательныйopenai, anthropic, or a server's host.

max serve

stay connected to MAX and stream new messages to max watch, until Ctrl-C

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

max server

max serve in the background: start, stop, restart, status, logs; install adds a systemd or launchd unit

max server start

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

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

max server stop

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

max server stop

max server restart

stop it and start it again

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

max server status

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

max server status

max server logs

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

max server logs [options]
ОпцияЧто делает
-n, --lines <n>how many lines. По умолчанию: 50.

max server install

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

max server install

max server uninstall

remove this profile's unit; stop it first

max server uninstall

max watch

print new messages as they arrive, from a running max serve

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

max config

the settings in force, and where each one came from

max config show

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

max config show [options]
ОпцияЧто делает
--botthe settings a bot command on this profile gets, rather than the personal account's.

max config migrate

replace legacy access settings with permissions, preserving effective levels

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

max config migrate [options]
ОпцияЧто делает
--dry-runshow the migration without writing the file.

max config set

save a setting to the configuration file

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

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

remove a setting from the configuration file

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

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

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

max doctor [options]
ОпцияЧто делает
--onlinealso log in once, read one chat and start the MCP server; sends nothing.

max doctor report

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

max doctor report create

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

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

recorded runs — what this tool did, and when

max runs list

recorded runs, newest first

max runs list [options]
ОпцияЧто делает
--limit <n>how many to show. По умолчанию: 20.

max runs show

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

max runs show <run-id>
АргументОбязательностьЧто это
run-idобязательныйID из max runs list.

search recorded diagnostic metadata and events; no message contents

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

the directory holding one run

max runs path <run-id>
АргументОбязательностьЧто это
run-idобязательныйID из max runs list.

max skill

the instructions an agent is given for this tool

max skill show

print SKILL.md — max skill install puts it where Claude Code, Codex and Gemini CLI look for it

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

max skill install

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

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

max commands

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

max commands schema

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

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

max upgrade

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

max upgrade [options]
ОпцияЧто делает
--checksay whether a newer version exists, and install nothing.

max complete

shell completion: max complete zsh prints the script to source

max complete [words]
АргументОбязательностьЧто это
wordsнеобязательный

max mcp

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

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://.ts.net.
--revokeforget every login given to a browser app; each must log in again.

max mcp config

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

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

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

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

max mcp setup <client> [options]
АргументОбязательностьЧто это
clientобязательныйcodex or claude-code.
ОпцияЧто делает
--allow-writesacknowledge 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

check this profile's local MCP handshake and tool list

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

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