files (per-user files-backend)
Shared front door: load ../olares-shared/SKILL.md for suite routing, active-profile selection, platform entry points, and the auth proceed/stop gate. Load its auth reference only when login, profile switching, token storage, or auth recovery is actually needed.
Load the shared platform model when the task depends on userspace backends, durability, uid 1000, or system-managed Home directories. Use olares-cli files <verb> --help for syntax.
When to use
- Address, read, write, move, delete, share, or transfer known Olares file paths.
- Compress/extract or manage their asynchronous task queue.
- Mount SMB/NFS servers or manage Seafile repositories.
Finding files by name/content (and what the index covers — filenames everywhere vs. full-text only in /Documents/) lives in olares-search; configure which directories get full-text indexing via settings search dirs in olares-settings.
Paths and namespace support
Every resource uses fileType/extend[/subPath]. Before invoking a verb, confirm its namespace support and whether the target is a file or directory. Load path grammar and namespace rules whenever constructing or interpreting a path.
Backend quirks that change decisions
- Directory creation may auto-rename on collision instead of returning conflict. Upload does not pre-create destination directories. If exact naming matters, inspect the parent and create it deliberately.
- Direct raw GET of a file resource may return HTTP 500. Use
files cat or files download; do not retry the raw resource URL.
external/<node>/ is a virtual volume picker, not a write destination. Writes need external/<node>/<volume>/....
- Eleven reserved names are system-managed at the first level under
drive/Home/. rename, rm, and mv as a source are refused before any request goes out; cp and everything nested stay editable. The refusal enumerates all eleven and is a platform invariant, not a permission error to retry — act on a child instead. The names are matched exactly, so a name that merely looks similar is not protected.
cache/<node>/ is valid storage but not a concrete dataset for share creation; share cache/<node>/<sub>/.
Async task queue (compress / extract)
compress and extract enqueue server-side work and return a task id unless waiting.
- Ctrl-C stops only the local poll. Cancel the server task explicitly if that is the user's intent.
- Tasks are per-node; retain the node printed when the task was queued.
task cancel --all affects every task on the node, including work started elsewhere.
Version gate (Olares >= 1.12.6)
Archives, NFS, and drive/Common require Olares 1.12.6+. Treat daily builds by their major.minor.patch base. Follow the shared auth/version gate when the backend version cannot be established.
Verb index
| Verb |
Read when triggered |
ls |
listing and cloud shapes |
cat |
files cat --help |
download |
resume, overwrite, directory downloads |
upload |
collision decisions and cloud transfer |
edit |
text/size guards and writeback |
mkdir |
parents, auto-rename, external depth |
rm |
existence, directory intent, protected paths |
rename |
in-place rename and protected paths |
cp, mv |
destination and overwrite semantics |
chown |
UID and namespace decisions |
compress |
formats, conflicts, passwords, async task |
extract |
destination, conflicts, passwords, async task |
archive |
read-only archive inspection |
task |
per-node cancel/pause/resume |
share |
internal/public/SMB sharing |
smb |
discovery, mount, history |
nfs |
export discovery and mount |
repos |
files repos --help |
Safety contract
- Treat the user's requested file operation and named paths as task-scope authorisation. Ask again only when a target is ambiguous, bytes may be overwritten without explicit intent, deletion expands beyond the named target, or the action leaves that scope.
- For upload, first decide whether collision should overwrite, fail, or create a distinct name; backend auto-renaming is not an acceptable implicit decision.
- Do not retry a missing-path preflight by weakening safety flags.
- Confirm
task cancel --all separately because it affects unrelated work on that node.
- Never expose tokens or passwords. Use stdin-based secret input where available.
- Stop on ambiguous frontend paths, node/volume identity, overwrite intent, or concurrent deletion; re-list the parent and ask the user.
1---2name: olares-files3description: Olares Files via olares-cli files — browse known paths; upload or download file bytes; edit, share, mount SMB/NFS, compress/extract archives, and manage Seafile sync across Drive/cache/external/cloud. Use for Olares Files and LarePass Files operations, not URL/yt-dlp/torrent download tasks (olares-knowledge).4---5
6# files (per-user files-backend)
7
8> **Shared front door:** load [`../olares-shared/SKILL.md`](../olares-shared/SKILL.md) for suite routing, active-profile selection, platform entry points, and the auth proceed/stop gate. Load its auth reference only when login, profile switching, token storage, or auth recovery is actually needed.
9
10Load the shared [platform model](../olares-shared/references/olares-platform.md) when the task depends on userspace backends, durability, uid 1000, or system-managed Home directories. Use `olares-cli files <verb> --help` for syntax.
11
12## When to use
13
14- Address, read, write, move, delete, share, or transfer known Olares file paths.
15- Compress/extract or manage their asynchronous task queue.
16- Mount SMB/NFS servers or manage Seafile repositories.
17
18> **Finding files by name/content** (and what the index covers — filenames everywhere vs. full-text only in `/Documents/`) lives in [`olares-search`](../olares-search/SKILL.md); configure which directories get full-text indexing via `settings search dirs` in [`olares-settings`](../olares-settings/SKILL.md).
19
20## Paths and namespace support
21
22Every resource uses `fileType/extend[/subPath]`. Before invoking a verb, confirm its namespace support and whether the target is a file or directory. Load [path grammar and namespace rules](references/olares-files-paths.md) whenever constructing or interpreting a path.
23
24## Backend quirks that change decisions
25
26- **Directory creation may auto-rename on collision** instead of returning conflict. Upload does not pre-create destination directories. If exact naming matters, inspect the parent and create it deliberately.
27- **Direct raw GET of a file resource may return HTTP 500.** Use `files cat` or `files download`; do not retry the raw resource URL.
28- `external/<node>/` is a virtual volume picker, not a write destination. Writes need `external/<node>/<volume>/...`.
29- Eleven [reserved names](../olares-shared/references/olares-platform.md#system-managed-home-directories) are system-managed at the first level under `drive/Home/`. `rename`, `rm`, and `mv` as a source are refused before any request goes out; `cp` and everything nested stay editable. The refusal enumerates all eleven and is a platform invariant, not a permission error to retry — act on a child instead. The names are matched exactly, so a name that merely looks similar is not protected.
30- `cache/<node>/` is valid storage but not a concrete dataset for share creation; share `cache/<node>/<sub>/`.
31
32## Async task queue (compress / extract)
33
34- `compress` and `extract` enqueue server-side work and return a task id unless waiting.
35- Ctrl-C stops only the local poll. Cancel the server task explicitly if that is the user's intent.
36- Tasks are per-node; retain the node printed when the task was queued.
37- `task cancel --all` affects every task on the node, including work started elsewhere.
38
39## Version gate (Olares >= 1.12.6)
40
41Archives, NFS, and `drive/Common` require Olares 1.12.6+. Treat daily builds by their `major.minor.patch` base. Follow the shared auth/version gate when the backend version cannot be established.
42
43## Verb index
44
45| Verb | Read when triggered |
46|---|---|
47| `ls` | [listing and cloud shapes](references/olares-files-ls.md) |
48| `cat` | `files cat --help` |
49| `download` | [resume, overwrite, directory downloads](references/olares-files-download.md) |
50| `upload` | [collision decisions and cloud transfer](references/olares-files-upload.md) |
51| `edit` | [text/size guards and writeback](references/olares-files-edit.md) |
52| `mkdir` | [parents, auto-rename, external depth](references/olares-files-mkdir.md) |
53| `rm` | [existence, directory intent, protected paths](references/olares-files-rm.md) |
54| `rename` | [in-place rename and protected paths](references/olares-files-rename.md) |
55| `cp`, `mv` | [destination and overwrite semantics](references/olares-files-cp-mv.md) |
56| `chown` | [UID and namespace decisions](references/olares-files-chown.md) |
57| `compress` | [formats, conflicts, passwords, async task](references/olares-files-compress.md) |
58| `extract` | [destination, conflicts, passwords, async task](references/olares-files-extract.md) |
59| `archive` | [read-only archive inspection](references/olares-files-archive.md) |
60| `task` | [per-node cancel/pause/resume](references/olares-files-task.md) |
61| `share` | [internal/public/SMB sharing](references/olares-files-share.md) |
62| `smb` | [discovery, mount, history](references/olares-files-smb.md) |
63| `nfs` | [export discovery and mount](references/olares-files-nfs.md) |
64| `repos` | `files repos --help` |
65
66## Safety contract
67
68- Treat the user's requested file operation and named paths as task-scope authorisation. Ask again only when a target is ambiguous, bytes may be overwritten without explicit intent, deletion expands beyond the named target, or the action leaves that scope.
69- For upload, first decide whether collision should overwrite, fail, or create a distinct name; backend auto-renaming is not an acceptable implicit decision.
70- Do not retry a missing-path preflight by weakening safety flags.
71- Confirm `task cancel --all` separately because it affects unrelated work on that node.
72- Never expose tokens or passwords. Use stdin-based secret input where available.
73- Stop on ambiguous frontend paths, node/volume identity, overwrite intent, or concurrent deletion; re-list the parent and ask the user.