Skip to main content

zspace-cli

Manage your 极空间 (ZSpace) NAS from the terminal or AI agents — no password, no SSH, no DDNS.

Just keep the ZSpace desktop client logged in on macOS.

中文文档 · Skills


Install

pip install zspace-cli        # base
pip install "zspace-cli[mcp]" # optional MCP support
zs check                      # ✓ reads the desktop client login state

Prerequisite: the ZSpace desktop client is running and logged in on macOS.


Quick start

zs ls /sata11/my/data/影视
zs find "权力的游戏"                  # full-text search
zs tree /sata11/my/data -d 3
zs up ./本地文件.mp4 /sata11/my/data/影视   # upload
zs down /sata11/my/data/影视/某文件.mkv ./下载 # download
from zspace_cli import ZSpaceClient

with ZSpaceClient() as zs:
    for f in zs.ls("/sata11/my/data"):
        print(f"{'📁' if f.is_dir else '📄'} {f.name}")

Use with AI agents (Skills)

zs skill ~/your-project/.cursor/skills/   # Cursor
# zs skill ~/your-project/skills/         # Claude Code, etc.

Then tell your agent things like "list the files in /sata11/my/data". See skills/README.md for the full skill list.


Features

Operation CLI SDK MCP
List directory zs ls [path] client.ls(path) zspace_ls
File info zs info <path> client.info(path) zspace_info
Rename zs rename <path> <name> client.rename(path, name) zspace_rename
Create dir zs mkdir <parent> <name> client.mkdir(parent, name) zspace_mkdir
Move zs mv <src> <dest> client.move(src, dest) zspace_move
Copy zs cp <src> <dest> client.copy(src, dest) zspace_copy
Delete zs rm <path> client.remove(path) zspace_remove
Search zs find <keyword> client.search(kw) zspace_search
Tree view zs tree [path] client.tree(path) zspace_tree
Upload zs up <local> <dir> client.upload(local, dir) zspace_upload
Download zs down <path> [dir] client.download(path, dir) zspace_download
Health check zs check client.is_connected() zspace_check

ls pages through large directories automatically (the NAS API returns at most 50 entries per call). find uses the NAS full-text index, so it searches across directories.


How it works

ZSpace has no official CLI or public API. zspace-cli talks to the desktop client's local proxy, so it works behind NAT as long as the client is online:

Skill / zs / SDK / MCP  →  127.0.0.1:13579 (desktop client proxy)  →  NAS

Disclaimer — This is an unofficial, community-maintained project, not affiliated with or endorsed by ZSpace (极空间). It relies on the desktop client's local proxy interface, which is not officially documented. It only reads the login state of your own account on your own machine — it does not bypass authentication, crack encryption, or touch anyone else's data. Use at your own risk; make sure your use complies with the ZSpace user agreement and your local laws.

MCP configuration (optional)

{
  "mcpServers": {
    "zspace": { "command": "zs-mcp", "args": [] }
  }
}

API reference

Endpoint Key Parameters
/v2/file/list path, show_hidden, start, limit
/v2/file/info path
/v2/file/modify path, newname
/v2/file/newdir parent, name, rename=0
/v2/file/move / copy paths[], to
/v2/file/remove paths[]
/v2/file/create binary body, header path (upload)
/v2/file/download GET path, remote_port=8050
/file_search/file_search keyword

Note: the interface parameter names are non-standard (parent / to instead of path / dest) — documented by the community from the desktop client's behavior.


Roadmap

  • File upload/download
  • Linux / Windows client auth
  • Docker headless option
  • Batch glob helpers

Contributing

Open an issue first to discuss changes. PRs welcome.

License

MIT

Metadata

Release files for zspace-cli 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zspace-cli 0.1.1
File Size Uploaded
zspace_cli-0.1.1.tar.gz 29.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zspace-cli 0.1.1
File Interpreter ABI Platform
zspace_cli-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 52.6 kB

Release files / zspace_cli-0.1.1.tar.gz

Download URL zspace_cli-0.1.1.tar.gz
Size 29.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cc76e412e3bf45c86eaca7b214e5cc790ad2b56d536b1d9c088ca2c65caac175
BLAKE2b-256 checksum
How to use checksums
20b152dfe8a8906c6ac0d0350b5796b14756b7f6da0c5c2c9e3aadf4ddaa9a49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / zspace_cli-0.1.1-py3-none-any.whl

Download URL zspace_cli-0.1.1-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afeed2717b3b0bc0ec13643e8854a8410eba1eb771998c30d862f6f15cc981ff
BLAKE2b-256 checksum
How to use checksums
7f2c2f001e394aa21cf9aa5a51f16fb4225d73f455f5d67d19cd0082ad02b480
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page