cesiumcloud

中文文档
0.2.41发布于 2026/11/03UNLICENSEDCommonJS零依赖

CesiumCloud command-line client and SDK for cloud file management

原始使用文档
文档目录12 节
  1. Install and sign in
  2. Command reference
  3. Upload files and directories
  4. Download files, directories and the whole account
  5. Browse, organize and delete
  6. Cancelling transfers
  7. Upload settings
  8. JavaScript SDK
  9. Optional end-to-end encryption
  10. Troubleshooting and compatibility
  11. Windows version and package upgrades
  12. Folder deletion in 0.2.41

CesiumCloud — Node.js CLI and SDK

Release 0.2.41 · Node.js 22+ · Windows, macOS and Linux

Manage cloud files and folders from the terminal or from Node.js. Uploads, downloads, navigation, listing, searching, moving, renaming, deletion and optional locally encrypted files are supported.

Web app: https://cloud.cesiummc.space/app/ · npm: https://www.npmjs.com/package/cesiumcloud · Complete reference

Install and sign in

npm install -g [email protected]
cesiumcloud --version
cesiumcloud authenticate
cesiumcloud whoami

Follow the browser/device-authorization instructions. A locally saved credential is used for subsequent commands. You do not need to paste a token into terminal commands.

On Windows PowerShell or CMD, use npm.cmd and cesiumcloud.cmd if shell command resolution requires them. Always quote complete Windows paths containing spaces, special characters or parentheses.

npm.cmd install -g [email protected]
cesiumcloud.cmd authenticate
cesiumcloud.cmd upload "E:\Downloads\My project (1).zip"

cesiumcloud upgrade (or update) installs the current release from the official npm registry. cesiumcloud logout deletes the saved local credential; revoke devices separately through your CesiumCloud account.

Command reference

CommandPurpose
authenticate / whoami / logoutAuthorize, inspect or remove local authorization
upgrade / update / --versionUpgrade or inspect the installed CLI
statsShow current account capacity and usage
upload SOURCE [and SOURCE...]Upload local files and/or directories
upload --replace SOURCEReplace an existing file at the same cloud path
upload cancelCancel this computer's active CLI uploads, from a second terminal
uploadsInspect unfinished transfers and pending cleanup
cancel-upload UPLOAD_IDCancel an unfinished upload by session identifier
resume-upload UPLOAD_ID LOCAL_FILELegacy compatibility command; normal cancelled uploads are deleted
discard-upload UPLOAD_IDExplicitly discard an incomplete transfer
download CLOUDPATH [and CLOUDPATH...]Download named file(s) or a cloud folder
download --all LOCALDIRRestore the account's files beneath LOCALDIR
download cancelCancel this computer's active CLI downloads
list / search TERM / dirBrowse and change the current cloud directory
rename OLD NEW / move SOURCE [to] DESTRename or move cloud items
delete CLOUDPATHMove a selected cloud file to Trash, recoverable for 48 hours
e2ee helpSee optional client-side encryption commands

You can run cesiumcloud help COMMAND or cesiumcloud COMMAND --help for command-specific help. [and] and [to] are literal separators, not filenames. For multi-source commands, quote each path separately.

Upload files and directories

cesiumcloud upload "./backup.zip"
cesiumcloud upload "./Projects"
cesiumcloud upload "./backup.zip" --replace
cesiumcloud upload "./a.zip" [and] "./b.zip" -simultaneous 2
cesiumcloud upload "./My Folder" -simultaneous 20

Single-file uploads use the standard configuration described below. When uploading a directory, its nested paths and empty folders are preserved. Multiple sources and directory uploads run independent file transfers, with up to 40 active file uploads by default for directories; -simultaneous N or --simultaneous N controls concurrency (accepted N: 1–64; active upload limit 40). Uploads are admitted as capacity becomes available. An existing cloud path requires --replace.

Download files, directories and the whole account

cesiumcloud download "archive.zip"
cesiumcloud download "archive.zip" --location "./Restored"
cesiumcloud download "photos" --location "./Restored"
cesiumcloud download "first.zip" [and] "second.zip" --location "./Restored" -simultaneous 2
cesiumcloud download --all "./RestoredAccount" -simultaneous 8

Without --location, named downloads use the OS Downloads directory, not necessarily the current terminal directory. Existing local filenames are preserved by choosing a numbered alternative. When downloading a folder, the folder is created beneath the chosen destination with its nested structure and empty folders. --all restores the account hierarchy below the selected local directory. Download concurrency is 1–64 (default: 1).

Browse, organize and delete

cesiumcloud dir /
cesiumcloud dir "photos"
cesiumcloud dir ..
cesiumcloud list
cesiumcloud list -a
cesiumcloud list -n 20 -sort name
cesiumcloud list -next 15
cesiumcloud list -sort datecreated -long
cesiumcloud search ext:png
cesiumcloud search "holiday" [and] "2026"
cesiumcloud rename "old.txt" "new.txt"
cesiumcloud rename "old.txt" "newname" -ne
cesiumcloud move "a.txt" [and] "b.txt" [to] "archive"
cesiumcloud delete "archive/a.txt"

dir with no arguments shows the current cloud directory; dir / returns to account root. list defaults to the first 15 files sorted by size; -a lists recursively, -n N (or N / -N) controls count, -next N advances the saved cursor, -sort takes size, name, datecreated, lastmodified or reset; -long shows metadata. search uses case-insensitive path matching; ext:png matches extension. rename keeps an existing file's extension when a new name has no extension unless -ne is provided. delete is permanent.

Cancelling transfers

Since 0.2.41, Ctrl+C reports permanent cancellation as complete only after the remote upload session and its reservation have been deleted; it reports pending cleanup explicitly if deletion cannot be confirmed promptly after handing remote deletion and queue cleanup to a detached process. The message means cleanup is in progress, not that server deletion has already been confirmed. Check cesiumcloud uploads if needed.

  • During a Node.js CLI transfer, Ctrl+C requests cancellation. v0.2.29 adds Windows Ctrl+C and Ctrl+Break console handling; normal Unix SIGINT behavior remains supported. If the terminal treats Ctrl+C as copy while text is selected, clear the selection.
  • From a second terminal on the same computer, use cesiumcloud upload cancel or cesiumcloud download cancel. These commands also work when console interrupt keys are intercepted. They affect only jobs in the same CesiumCloud CLI configuration, not jobs on another device or the website.
  • cesiumcloud cancel-upload UPLOAD_ID can cancel a specific unfinished server upload. Use cesiumcloud uploads to inspect entries requiring cleanup.
  • A cancelled or failed upload is not kept for later resumption. Its unfinished server data is removed; already completed cloud files are preserved. Cancellation may take longer if the server is confirming cleanup. A forcibly terminated process may require automatic recovery and cleanup.
  • Cancelled downloads remove incomplete temporary local files; already completed downloads remain. No remote file is deleted by download cancellation.

Upload settings

Default for a single file (Node.js): 99,876,864-byte chunks (the largest 256 KiB-aligned size under 100,000,000 bytes), 1 MiB HTTP stream blocks and one-chunk read-ahead. No environment variables are needed. These defaults were selected from real transfer measurements; throughput depends on your connection and storage capacity.

VariableAccepted valuesBehavior
CESIUMCLOUD_UPLOAD_CHUNK_MB100Explicit near-100 MB chunks; overrides the MiB variable
CESIUMCLOUD_UPLOAD_CHUNK_MIB64 or 95Optional smaller chunks; maximum is 100 MB
CESIUMCLOUD_UPLOAD_PREFETCH0 or 11 is the default; 0 disables next-chunk read-ahead
CESIUMCLOUD_UPLOAD_STREAM_BLOCK_KIB256, 1024 or 4096Internal streaming blocks; default 1024 (1 MiB)
CESIUMCLOUD_CONFIG_DIRDirectory pathUse an alternate local authorization/configuration directory
CESIUMCLOUD_API_KEYExisting valid device tokenOptional programmatic/automation credential; never share it

Read-ahead may use about one additional 100 MB chunk of memory. Concurrent folder uploads use smaller per-file chunks to control memory usage.

PowerShell:

$env:CESIUMCLOUD_UPLOAD_PREFETCH = "0"
cesiumcloud.cmd upload "E:\Backups\archive.zip"
Remove-Item Env:\CESIUMCLOUD_UPLOAD_PREFETCH

Bash:

CESIUMCLOUD_UPLOAD_PREFETCH=0 cesiumcloud upload "./archive.zip"

Folder/batch transfers use a separate file-upload path and are not equivalent to a single large-file transfer.

JavaScript SDK

The package exports IsolatedTransferClient for file management and CesiumCloudClient for high-level device authorization and CLI-backed operations. In Node.js 22+:

const { IsolatedTransferClient } = require("cesiumcloud");
const client = new IsolatedTransferClient(process.env.CESIUMCLOUD_API_KEY);
async function example() {
  await client.uploadFile("./notes.txt", "docs/notes.txt");
  const files = await client.allFiles();
  const doc = files.find(file => file.path === "docs/notes.txt");
  if (doc) await client.download(doc.id, "./notes-restored.txt");
}
example().catch(console.error);

An SDK operation requires a valid authorized token. The lower-level client supports uploadFile, uploadPath, download, downloadPath, list, allFiles, byPath, delete, rename, renameFolder, mkdir, rmdir, directoryExists, pendingUploads, cancelUpload and more; see the SDK reference. SDK downloads reject an existing destination by default unless you explicitly enable overwrite, unlike CLI downloads that choose numbered filenames.

Optional end-to-end encryption

cesiumcloud e2ee keygen
cesiumcloud e2ee encrypt "./notes.txt" --location "./Encrypted"
cesiumcloud e2ee decrypt "./Encrypted/notes.txt.ccenc" --location "./Restored"
cesiumcloud e2ee upload "./notes.txt"
cesiumcloud e2ee download "notes.txt.ccenc" --location "./Restored"
cesiumcloud e2ee migrate "old.txt"

keygen creates a locally stored recovery key. Back it up offline and never disclose it. Normal upload remains unencrypted. The encrypted .ccenc format protects contents, not paths, filenames, sizes or activity metadata. e2ee migrate creates and verifies an encrypted copy while retaining the original by default; removal of the original requires both --purge-original and --i-backed-up-key. Never set the purge flags without retaining a usable recovery key.

Troubleshooting and compatibility

SymptomAction
cesiumcloud is not recognized in PowerShellRun cesiumcloud.cmd or reinstall the global npm package and open a fresh terminal
Ctrl+C appears ineffective on WindowsUpgrade to 0.2.29+, clear selected text, or use cesiumcloud.cmd upload cancel from another terminal
Upload path not foundQuote the entire local filename, including parentheses
File already exists remotelyAdd --replace only when you intend to replace it
Download filename already existsThe CLI chooses a numbered alternate; the SDK requires an explicit overwrite decision
Upload stopped mid-transferRun cesiumcloud uploads to inspect cleanup; normal cancelled uploads are not resumable
Error 413, capacity limit or long queueUse standard chunk defaults, reduce concurrent transfers or retry when account capacity permits
Can't decrypt a .ccenc fileRestore the exact backed-up recovery key; reauthentication alone cannot decrypt it

For help use cesiumcloud --help and cesiumcloud e2ee help. For command examples, environment variables, and historical changes, consult the documentation included with the source release.

Safety: CLI delete uses recoverable 48-hour Trash; explicit SDK deletion is permanent, and upload replacement can change existing content. Preserve independent backups of important files and encryption keys.

Windows version and package upgrades

Use where cesiumcloud to check which executable Windows starts. Python's Scripts executable may precede the npm CLI on PATH. Use cesiumcloud.cmd version for the npm global client or python -m cesiumcloud version for Python. The upgrade and update commands update both package types when both are installed. For npm global installation use npm install -g cesiumcloud; without -g npm installs into the current project.

Uploads are admitted through a queue before bytes are transferred. The service enforces admission to prevent skipping the queue by making direct requests. Upload chunk sizes are capped at 100 MB.

Folder deletion in 0.2.41

Use the delete command with a quoted cloud folder path. It moves that directory and all its contents into the 48-hour recoverable Trash, including empty folders; it never calls permanent deletion. A trailing Windows backslash is supported.

版本与发布记录

cesiumcloud 共发布 59 个版本,首次发布于 2026/10/27;过去 12 个月发布了 59 个版本。

版本发布日期距今
0.2.41latest2026/11/03今天
0.2.402026/11/03今天
0.2.392026/11/03今天
0.2.382026/11/03今天
0.2.372026/11/03今天
0.2.362026/11/03今天

关于 cesiumcloud 的常见问题

cesiumcloud 是什么?

CesiumCloud命令行客户端和SDK用于云文件管理

如何安装 cesiumcloud?

在项目目录运行 npm install cesiumcloud,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 cesiumcloud,可以用 npx cesiumcloud 直接运行。

cesiumcloud 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/cesiumcloud 是否存在。

cesiumcloud 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

cesiumcloud 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

cesiumcloud 可以商用吗?

cesiumcloud 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

cesiumcloud 还在维护吗?

最新版本 0.2.41 发布于 2026/11/03(今天);至今共发布 59 个版本,其中过去 12 个月发布了 59 个;首次发布于 2026/10/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。