synology-file-station
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSynology File Station
Synology File Station
Core Goal
核心目标
- Run major Synology File Station file operations with one CLI script.
- Read connection credentials from env instead of hardcoding secrets.
- Return JSON output suitable for automation pipelines.
- 通过一个CLI脚本执行Synology File Station的主要文件操作。
- 从环境变量读取连接凭证,而非硬编码敏感信息。
- 返回适用于自动化流水线的JSON格式输出。
Workflow
工作流程
- Prepare env variables (see and
references/env.md).assets/config.example.env - Validate config:
bash
python3 scripts/synology_file_station.py check-config- Optional connection probe:
bash
python3 scripts/synology_file_station.py check-config --probe- Run the required file operation command (see ).
references/commands.md
- 准备环境变量(参考和
references/env.md)。assets/config.example.env - 验证配置:
bash
python3 scripts/synology_file_station.py check-config- 可选的连接探测:
bash
python3 scripts/synology_file_station.py check-config --probe- 运行所需的文件操作命令(参考)。
references/commands.md
Major Operations
主要操作
- Read/browse: ,
info,list-shares,listget-info - Search: ,
search-start,search-list,search-stopsearch-clean - Directory/file mutation: ,
mkdir,rename,copy,movedelete - Transfer: ,
uploaddownload - Archive workflows: (
extractis temporarily unavailable)compress - Background task control: ,
background-list,task-statustask-stop
- 读取/浏览:,
info,list-shares,listget-info - 搜索:,
search-start,search-list,search-stopsearch-clean - 目录/文件修改:,
mkdir,rename,copy,movedelete - 传输:,
uploaddownload - 归档工作流:(
extract暂时不可用)compress - 后台任务控制:,
background-list,task-statustask-stop
Environment Contract
环境变量约定
Required env:
SYNOLOGY_BASE_URLSYNOLOGY_USERNAMESYNOLOGY_PASSWORD
Optional env:
SYNOLOGY_VERIFY_SSLSYNOLOGY_TIMEOUTSYNOLOGY_SESSION- (default
SYNOLOGY_READONLY; setfalseto block mutation commands)true - (optional mutation path allowlist)
SYNOLOGY_MUTATION_ALLOW_PATHS
必填环境变量:
SYNOLOGY_BASE_URLSYNOLOGY_USERNAMESYNOLOGY_PASSWORD
可选环境变量:
SYNOLOGY_VERIFY_SSLSYNOLOGY_TIMEOUTSYNOLOGY_SESSION- (默认值
SYNOLOGY_READONLY;设置为false将阻止修改类命令)true - (可选的修改路径白名单)
SYNOLOGY_MUTATION_ALLOW_PATHS
Output Contract
输出约定
- Success: JSON object with and operation-specific fields.
type=status - Failure: JSON object with and structured error metadata.
type=error - Exit code:
- : success
0 - : runtime/API error
1 - : invalid env configuration
2
- 成功:返回的JSON对象,包含操作相关字段。
type=status - 失败:返回的JSON对象,包含结构化错误元数据。
type=error - 退出码:
- :成功
0 - :运行时/API错误
1 - :无效的环境配置
2
References
参考文档
references/env.mdreferences/commands.md
references/env.mdreferences/commands.md
Assets
资源文件
assets/config.example.env
assets/config.example.env
Scripts
脚本文件
scripts/synology_file_station.py
scripts/synology_file_station.py