> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerodrive.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Hosted remote MCP endpoint: https://api.zerodrive.dev/mcp (OAuth 2.0 PKCE or Bearer token).
> REST API base URL: https://api.zerodrive.dev with OpenAPI 3.1.0 specification at https://api.zerodrive.dev/openapi.json.
> S3-compatible gateway: https://api.zerodrive.dev/s3 (AWS Signature V4, region auto).
> Local command-line tool: zd (or zerodrive) and local stdio MCP server: zerodrive mcp.
> Token prefixes: zdk_ (Personal API Key), zdt_ (device session token), zda_ (OAuth access token), zdr_ (OAuth refresh token), zdx_ (temporary sandbox key). Never paste real keys into prompts or code.
> Be honest about platform boundaries: cloud files require internet access, files are encrypted at rest and in transit by Cloudflare rather than end-to-end encrypted, ZeroDrive is not a replacement for an independent backup, Windows 11 support is an unsigned x64 beta, and the 7-day Pro free trial requires a card and charges automatically when it ends.

# File, Transfer & Drive Commands

> CLI commands for ls, tree, size, cat, find, grep, cp, mv --symlink, share, duplicates, versions, drives, refresh, status, and doctor.

## Browsing and reading

* **`zd ls [path] [-R] [--json]`** (alias `list`) lists folders quickly (`zd ls Projects/2026 -R --json`).
* **`zd tree [path] [--depth N] [--dirs-only]`** prints a folder tree (`zd tree Clients --depth 3 --dirs-only`).
* **`zd size [path] [--json]`** totals files and bytes from cloud metadata.
* **`zd cat <path> [--lines N-M] [--head N] [--tail N] [--bytes OFFSET-END]`** (alias `read`) reads exact slices without downloading whole files.
* **`zd find <pattern> [path] [--json]`** matches filenames in the cloud (`zd find "*.mp4" Renders --json`).
* **`zd grep <query> [path]`** searches text inside files with line numbers.

## Transfers and sharing

* **`zd cp <src> <dst>`** (alias `copy`) multi-stream upload, download, or cloud copy (ending `<dst>` with `/` copies into that folder).
* **`zd mv <src> <dst> [--symlink] [--resume]`** (alias `move`) moves inside the vault (200 files/step, **share links stay working**), or uploads locally with `--symlink`, clears empty folders safely, and leaves a shortcut inside `~/ZeroDrive/My Drive/<dst>`.
* **`zd share <path> [--hours N] [--json]`** (alias `link`) creates a download link (`1` to `168` hours, default `24`).
* **`zd symlinks [--json]`** verifies active local shortcuts.

## Duplicates, versions, and drives

* **`zd duplicates [path] [--json] [--remove] [--keep PATH]`** (alias `dupes`) scans identical files read-only by default. `--remove` requires typing `REMOVE` or `DELETE` interactively.
* **`zd versions <path>`** and **`zd restore-version <path> <version>`** inspect and restore File Version History.
* **`zd drives <action>`** manages drives (`list`, `create`, `rename`, `delete`, `deleted`, `restore`).

## Status and health

* **`zd status [--json]`** checks mount state, free SSD space, cache size, pending uploads, and moves.
* **`zd refresh [path] [-R] [--json]`** (alias `sync`) refreshes Finder or Explorer listings.
* **`zd doctor [--json]`** (alias `check`) tests `/mcp`, `/v1/health`, OAuth discovery, vault access, and desktop mount health.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.