Quark CLI for Quark Drive

A Rust command-line client for 夸克网盘, built for servers, NAS, scripts, recursive folder downloads, resume, retry, and JSON automation.

$ quark ls /
$ quark get /tvtemp/01.mp4 ./01.mp4 --continue --retry auto
$ quark get /ai --continue
$ quark stat /tvtemp/01.mp4 --json

What is quark-cli?

quark-cli is an unofficial command-line tool for Quark Drive. The Cargo package is named quarkcli, and the installed executable is quark.

It is designed for people who manage Quark Drive files from Linux servers, NAS boxes, cron jobs, shell scripts, and regular terminal sessions.

Quick install

Prebuilt release

tar -xzf quark-linux-x86_64.tar.gz
chmod +x quark
./quark --version
sudo mv quark /usr/local/bin/quark

Cargo

cargo install --git https://github.com/i-sync/quark-cli quarkcli
quark --version

Save your Quark Drive web Cookie before using account operations:

quark auth set-cookie --from-stdin

Common commands

quark ls /
quark get /remote/file.mp4 ./file.mp4 --continue
quark get /remote/folder --continue
quark put ./backup.tar.gz /backup/
quark stat /remote/file.mp4 --json
quark probe download --fid <file_fid>

Why use this Quark CLI?

Large file and reliability notes

Quark Drive web-facing APIs can throttle downloads, reject some large-file requests, ignore Range resume requests, or return MD5 metadata that does not match the returned file bytes.

Starting with 0.4.2, automatic download verification treats MD5 mismatch as a warning rather than a hard failure. Use --verify always when you require strict failure, or --no-verify when you plan to verify archives externally.

quark-cli vs kuake_cli

Both projects use Quark web-facing APIs, but they optimize for different workflows.

Areaquark-clikuake_cli
LanguageRustGo
Main focusTerminal file operations, server/NAS downloads, resume, JSON automationBroader Go-based automation/API/MCP tooling
Daily command stylePath-first commands such as quark ls / and quark get /path/fileProject-specific command surface
Recursive downloadsYes, via folder get and download-dirAvailable depending on workflow
Resume model.part files and sibling .quark.task filesLess central in the public download flow
Download MD5 handlingauto warns on mismatch, always fails, --no-verify skipsDoes not enforce download MD5 in the basic download flow
Large-file limitsStill depends on Quark server policy, but uses a different download endpoint shape than some PC-web clientsIssue #27 reports PC web API size-limit failures
Best fitLinux servers, NAS, cron jobs, shell scripts, resilient folder downloadsGo users and broader API/MCP experiments

Choose based on workflow: quark-cli is optimized for simple terminal automation and resilient downloads; kuake_cli covers a broader Go-based automation surface.

FAQ

Is this the same as kuake_cli?

No. quark-cli is a Rust project published at i-sync/quark-cli. It focuses on terminal file operations, recursive downloads, resume, retry, and JSON automation.

Why does it need a Cookie?

The tool acts on your Quark Drive account through web-facing APIs. Treat your Cookie like a password and never publish it in logs, scripts, or repositories.

Can it download large files?

It can download files when Quark returns a usable download URL. Server-side limits, throttling, and CDN behavior still depend on Quark.

Does it support recursive folders?

Yes. Use quark get <folder> --continue for path-first recursive downloads, or download-dir when you already know a folder FID.