Documents & filesYandex Disk

Yandex Disk CLI configuration

See and change the Yandex Disk CLI settings: profiles, folders, variables and their order.

Change how ydisk behaves for one profile or for all of them: what an agent may change on your Disk, how long run records are kept, and how search orders its hits. Settings live in one file, config.json, in the folder ydisk doctor shows. Each profile has its own part, and defaults apply to every profile.

ydisk personal config show
ydisk personal config set limit 50
ydisk personal config unset limit

config show lists each setting and where it came from: the file, a variable or the default.

Permissions

permissions decides what a command may do for this profile. Each command has its own key, named after it, such as files.move or files.upload, and each key has one of four levels:

LevelWhat happens
allowThe command runs.
askAt a terminal the tool asks first. Over MCP there is no one to ask, so the command runs.
readonlyA read runs. A change is refused.
denyThe command is refused, with exit code 5.

Two keys guard the changes that are hard to undo. They are ask until you change them. The other files keys are allow:

KeyWhat it guards
files.deletefiles delete, and an upload, a copy or a move with --replace, which overwrites a file. In the api group: a delete, emptying the trash, and any overwrite.
files.sharefiles publish and files unpublish: a link anyone who has it can open. In the api group: the public-link operations.
ydisk personal config set permissions.files.delete deny
ydisk personal config set permissions.files.share deny
ydisk personal config set permissions.files.upload deny

An api command that does what a files command does also checks that command's key: files.move set to deny stops api resources-move too. --dry-run on any change shows each key it checks and its level, without doing the change.

YDISK_READ_ONLY=1 refuses every change, whatever the permissions say. For one MCP server only, --permission files.delete=deny makes a key stricter. See connect your agent.

Run records

A command that fails is kept as a run, for ydisk runs list and runs show. A command that reaches Yandex Disk, such as files list, sync or session status --check, is kept when it succeeds too, unless record is false (then only failures) or it ran with --no-record. record_input decides whether a run keeps the words you typed. It is true unless you set it to false. Secrets are masked either way. See Security.

SettingDefaultWhat it does
recordtrueKeep every run. false keeps failed runs only.
record_inputtrueKeep the words typed on the command line: true, false, or failed.
keep_runs_for_days30Days a run is kept.
keep_successful_runs_for_days7Days a successful run is kept.
runs_size_limit_mb200The most megabytes all runs may take.

Other settings

SettingDefaultWhat it does
limit20How many items a list shows at once.
search_rerankermmarcoThe model that orders search's first hits, or off.
embedding_providerlocallocal or openai: what turns text into vectors for search by meaning. openai sends the text to OpenAI.
update_checktrueCheck once a day for a newer version.
skill_hinttrueTell an agent once a day that skill install would give it this tool's skill.

Environment variables

VariableWhat it does
YDISK_PROFILEThe profile for commands that name none.
YDISK_READ_ONLY1 refuses every change.