Configure which host directories agent containers can access. View, add, or remove mount allowlist entries. Triggers on "mounts", "mount allowlist", "agent acce
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-manage-mounts-22ef4517ea0e ,按照其中的说明把「manage-mounts」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Configure which host directories NanoClaw agent containers can access. The mount allowlist lives at ~/.config/nanoclaw/mount-allowlist.json.
cat ~/.config/nanoclaw/mount-allowlist.json 2>/dev/null || echo "No mount allowlist configured"
Show the current config to the user in a readable format: which directories are allowed, and whether each is read-only or read-write.
Ask which directories the user wants agents to access. For each path:
allowReadWrite: true) or read-only (allowReadWrite: false, the safer default)Build the JSON config and write it:
pnpm exec tsx setup/index.ts --step mounts --force -- --json '{"allowedRoots":[{"path":"/path/to/dir","allowReadWrite":true}],"blockedPatterns":[]}'
Use --force to overwrite the existing config.
Read the current config, show it, ask which entry to remove, then write the updated config through the same write path (build the trimmed JSON and pass it to --step mounts --force -- --json):
pnpm exec tsx setup/index.ts --step mounts --force -- --json '{"allowedRoots":[],"blockedPatterns":[]}'
pnpm exec tsx setup/index.ts --step mounts --force -- --empty
The allowlist is read fresh when a container is spawned, so new mounts apply to newly spawned containers automatically — no service restart needed.
To apply the new config to a group that already has a running container, restart just that group:
ncl groups restart --id <group-id>