About synology-file-station
Synology File Station is a skill that runs file-management operations on Synology through a Python CLI script. It uses environment-based credentials and structured JSON output for automation pipelines.
Key features
- 01Browse shares and files
- 02Search files and directories
- 03Create, rename, move, copy, or delete items
- 04Upload and download files
- 05Extract archives and control background tasks
- 06Return structured JSON results
Use cases
- 01Automate Synology file operations
- 02Search for files on a NAS
- 03Transfer files in a pipeline
- 04Restrict mutation commands to allowed paths
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ tiangong-ai/ agent-skills --skill synology-file-stationAfter installing, type/synology-file-stationin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlassets/config.example.envreferences/commands.mdenv.mdscripts/synology_file_station.pyDetails
From the project READMESynology 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.
Workflow
- Prepare env variables (see
references/env.mdandassets/config.example.env). - Validate config:
python3 scripts/synology_file_station.py check-config
- Optional connection probe:
python3 scripts/synology_file_station.py check-config --probe
- Run the required file operation command (see
references/commands.md).
Major Operations
- Read/browse:
info,list-shares,list,get-info - Search:
search-start,search-list,search-stop,search-clean - Directory/file mutation:
mkdir,rename,copy,move,delete - Transfer:
upload,download - Archive workflows:
extract(compressis temporarily unavailable) - Background task control:
background-list,task-status,task-stop
Environment Contract
Required env:
SYNOLOGY_BASE_URLSYNOLOGY_USERNAMESYNOLOGY_PASSWORD
Optional env:
SYNOLOGY_VERIFY_SSLSYNOLOGY_TIMEOUTSYNOLOGY_SESSIONSYNOLOGY_READONLY(defaultfalse; settrueto block mutation commands)SYNOLOGY_MUTATION_ALLOW_PATHS(optional mutation path allowlist)
Output Contract
- Success: JSON object with
type=statusand operation-specific fields. - Failure: JSON object with
type=errorand structured error metadata. - Exit code:
0: success1: runtime/API error2: invalid env configuration
References
references/env.mdreferences/commands.md
Assets
assets/config.example.env
Scripts
scripts/synology_file_station.py
Comments
Markdown supported