id = "baidupcs-go"
name = "BaiduPCS-Go"
homepage = "https://github.com/qjfoidnh/BaiduPCS-Go"
description = "A command-line client for Baidu Netdisk."
executables = ["BaiduPCS-Go"]
[dotfiles]
paths = []
secret = ["~/.config/BaiduPCS-Go/pcs_config.json", "%APPDATA%/BaiduPCS-Go/pcs_config.json"]
[commands]
format = 1
label = "BaiduPCS-Go"
description = "Download from and upload to Baidu Netdisk. Run login inside the program first. Listing, sharing and config commands are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false }
[[commands.source]]
id = "readme"
kind = "manual"
url = "https://raw.githubusercontent.com/qjfoidnh/BaiduPCS-Go/HEAD/README.md"
revision = "HEAD 2026-10-27"
evidence = """BaiduPCS-Go download <网盘文件或目录的路径1> <文件或目录2> <文件或目录3> ...
--test 测试下载, 此操作不会保存文件到本地
--ow overwrite, 覆盖已存在的文件
--save 将下载的文件直接保存到当前工作目录
--saveto value 将下载的文件直接保存到指定的目录
-p value 指定下载线程数 (default: 0)
--retry value 下载失败最大重试次数 (default: 3)
--nocheck 下载文件完成后不校验文件
BaiduPCS-Go upload <本地文件/目录的路径1> <文件/目录2> <文件/目录3> ... <目标目录>
所有上传均默认检测秒传, 可添加参数`--norapid`跳过"""
[[commands.subcommand]]
path = ["download"]
label = "Download"
description = "Download files or directories from the netdisk. Saves under the program's download/ directory unless a target is given."
[[commands.subcommand.source]]
id = "readme"
kind = "manual"
url = "https://raw.githubusercontent.com/qjfoidnh/BaiduPCS-Go/HEAD/README.md"
revision = "HEAD 2026-10-27"
evidence = """BaiduPCS-Go download <网盘文件或目录的路径1> <文件或目录2> <文件或目录3> ...
--test 测试下载, 此操作不会保存文件到本地
--ow overwrite, 覆盖已存在的文件
--save 将下载的文件直接保存到当前工作目录
--saveto value 将下载的文件直接保存到指定的目录
-p value 指定下载线程数 (default: 0)
--retry value 下载失败最大重试次数 (default: 3)
--nocheck 下载文件完成后不校验文件"""
[[commands.subcommand.field]]
id = "remote_paths"
label = "Netdisk paths"
type = "string"
position = 0
multiple = true
sources = ["readme"]
[[commands.subcommand.field]]
id = "saveto"
label = "Save to directory"
type = "path"
option = ["--saveto"]
path = { kind = "directory", role = "output", must_exist = false }
sources = ["readme"]
[[commands.subcommand.field]]
id = "save_cwd"
label = "Save in current directory"
type = "boolean"
option = ["--save"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "overwrite"
label = "Overwrite existing files"
type = "boolean"
option = ["--ow"]
effect = "overwrite"
sources = ["readme"]
[[commands.subcommand.field]]
id = "test"
label = "Test download (save nothing)"
type = "boolean"
option = ["--test"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "threads"
label = "Threads"
type = "integer"
option = ["-p"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "retry"
label = "Max retries"
type = "integer"
option = ["--retry"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "nocheck"
label = "Skip verification"
type = "boolean"
option = ["--nocheck"]
sources = ["readme"]
[[commands.subcommand.task]]
id = "download"
label = "Download to a directory"
fields = ["remote_paths", "saveto"]
required = ["remote_paths"]
[[commands.subcommand.task]]
id = "dry"
label = "Test download"
fields = ["remote_paths", "test"]
required = ["remote_paths"]
set = { test = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["remote_paths", "saveto", "save_cwd", "overwrite"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["test", "threads", "retry", "nocheck"]
[[commands.subcommand]]
path = ["upload"]
label = "Upload"
description = "Upload one local file or directory to a netdisk directory."
[[commands.subcommand.source]]
id = "readme"
kind = "manual"
url = "https://raw.githubusercontent.com/qjfoidnh/BaiduPCS-Go/HEAD/README.md"
revision = "HEAD 2026-10-27"
evidence = """BaiduPCS-Go upload <本地文件/目录的路径1> <文件/目录2> <文件/目录3> ... <目标目录>
所有上传均默认检测秒传, 可添加参数`--norapid`跳过"""
[[commands.subcommand.field]]
id = "local_path"
label = "Local file or directory"
type = "path"
position = 0
path = { kind = "any", role = "input", must_exist = true }
sources = ["readme"]
[[commands.subcommand.field]]
id = "remote_dir"
label = "Netdisk target directory"
type = "string"
position = 1
sources = ["readme"]
[[commands.subcommand.field]]
id = "norapid"
label = "Skip rapid-upload check"
type = "boolean"
option = ["--norapid"]
sources = ["readme"]
[[commands.subcommand.task]]
id = "upload"
label = "Upload"
fields = ["local_path", "remote_dir"]
required = ["local_path", "remote_dir"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["local_path", "remote_dir", "norapid"]