File: README.en.md
Features [](#features-)
Media Servers
- Multiple server types: connect to popular media servers such as Emby, Jellyfin, and Plex.
- Custom server icons: assign a custom icon to each media server so multiple instances are easy to tell apart.
- Aggregated home page: view Continue Watching, Recently Added, Movies, TV Shows, Anime, and more in one place.
- Full library browsing: browse by media type, including movies, TV series, anime, documentaries, poster wall, and list views.
- Media server search: search inside one server or across multiple servers at once.
- Episode details: show posters, ratings, summaries, episode lists, and playback progress.
Multiple Cloud Drives
- Multi-platform cloud drive support: supports Aliyun Drive, Baidu Netdisk, 123Pan, 115 Drive, and other mainstream cloud drive services.
- WebDAV connections: connect to Quark Cloud Drive, Tianyi Cloud, and more through WebDAV.
- Local folder import: import local folders and scrape TMDB metadata.
- Multi-account management: sign in to and manage multiple cloud drive accounts at the same time.
Smart Media Library
- TMDB metadata scraping: scan cloud drives and local files, then fetch movie and TV metadata from TMDB.
- Media organization: classify and organize media files into a complete personal media library.
- Unified search: search across cloud drives and local libraries to find media quickly.
Document AI
13.1 Single-document questions: open a supported PDF, EPUB, TXT, Markdown, or DOCX file and select BoxPlayer AI / Analyze with AI to ask about that document in Preview.
13.2 Multi-document conversations: select supported files from a cloud-drive list, folder, or search result, then ask one question across up to 10 sources.
13.3 Grounded answers: start with built-in prompts such as Summarize, Key takeaways, Improve, and Next steps; answers include hoverable source citations and PDF location jumps.
13.4 Source control: browse the current cloud drive from the conversation to add files in batches, use global filename search as a shortcut, and type @filename to clarify the source in a prompt.
13.5 Conversation controls: switch to a wider view, clear the current conversation, copy an answer, and submit response feedback without leaving the document workflow.
Playback
- Online HD playback: play original-quality videos in many formats directly from cloud drives.
- Multi-audio tracks: switch between audio tracks inside the player.
- External subtitles: load external subtitle files and switch between subtitle tracks.
- Video stream and quality switching: switch video streams and choose quality according to network conditions.
- Playback speed control: customize playback speed.
- Playlist management: create and manage playlists.
- External players: supports professional players such as MPV and IINA.
High-Speed Downloads
- Aria2c downloads: built-in high-speed Aria2c engine with multi-threaded downloads.
- Remote downloads: use remote Aria2 to download files directly to a VPS or NAS.
File Management
- Folder tree view: a dedicated folder tree for fast navigation and operations.
- Smart sorting: show folder sizes and sort folders and files together by name, size, or time.
- Batch operations: batch rename large numbers of files and deeply nested folders.
- Quick preview: copy files quickly, preview video sprite images, and delete files directly.
- Large-scale file handling: manage tens of thousands of folders and files, and list all files in a folder at once.
- Bulk transfer: upload or download massive numbers of files and folders in one operation.
Cross-Platform
- Platform support: supports Windows 7-11, macOS, and Linux.
Pro vs Open Source [](#pro-vs-open-source-)
BoxPlayer keeps the core client free and open source: file management, media playback, cloud-drive connections, local reading, and clouddrive-cli automation remain available. Pro mainly covers hosted AI features and account services that create recurring server costs.
| Capability | Not signed in | Signed in · Free | Pro |
|---|---|---|---|
| Multi-cloud file management, upload, download, folder tree | — | ✅ | ✅ |
| Video / music playback, local media library, media server clients | ✅ | ✅ | ✅ |
| Local book reading, bookshelf, highlights, notes, bookmarks | ✅ | ✅ | ✅ |
| clouddrive-cli / MCP Agent tools | ✅ | ✅ | ✅ |
| BYOK · Use your own third-party API key for AI | ✅ Your own quota | ✅ Your own quota | ✅ Your own quota |
| Built-in BoxPlayer AI models | ❌ | ❌ | ✅ Monthly hosted AI credits |
| AI Smart Search, semantic indexing | ❌ | ❌ | ✅ |
| AI Agent cloud-drive search | ❌ | ❌ | ✅ |
| PDF / EPUB AI reading companion | ❌ | ❌ | ✅ |
| Reader AI instant translation | ❌ | ❌ | ✅ |
| Reader AI cloud text-to-speech | ❌ | ❌ | ✅ 🚧 Coming soon |
| Reader basic text-to-speech (Local TTS) | ❌ | ✅ (sign-in required) | ✅ |
| One-click public share save | ❌ | 5/day | ✅ Unlimited |
| TMDB + Douban movie discovery | Basic | Basic | ✅ |
| Website support tickets and priority handling | Standard | Standard | ✅ Priority support |
AI credit notes: Pro hosted AI features (AI Search, AI Reading Companion, Translation, AI Media Scraping) draw from a unified credit pool that resets monthly. BYOK (bring your own key) is completely free for everyone — uses your own third-party API quota, no BoxPlayer credits consumed, works even without signing in. Signed-in free users also get local TTS and 5 public share saves per day. Cloud TTS is coming soon.
New Features [](#new-features-)
This release ships 45+ major upgrades, covering AI Read-Aloud / AI Reading Assistant / AI Translation / multi-model chat / advanced music playback / Download infrastructure / 3 new cloud drives / AI media organizer agent. Every new capability is grouped by module below.
Recent additions: built-in AI, Pro account, and support tickets
- Built-in BoxPlayer AI (Pro): new
boxplayer-cloudprovider lets Pro users use hosted DeepSeek / Workers AI without entering an API key, while OpenAI, DeepSeek, OpenRouter, Ollama, Vercel AI Gateway, and custom BYOK providers remain available. - Unified AI credit pool: chat, AI search, translation, embeddings, and TTS share one internal credit system. Anonymous users cannot call hosted AI; signed-in trial users receive a small daily pool; Pro users receive a monthly hosted AI allowance.
- Full-page bilingual reader translation: EPUB / PDF reading can show original text and translation line by line, or hide the original text for translated-only reading. Translation renders progressively by paragraph and is cached across page turns.
- Reader layout fixes: single-page, double-page, and scroll modes were recalibrated to fix multi-column text, half-width pages, scroll mode pagination, and double-page pagination bugs.
- AI Global Search upgrade: global search now connects to built-in AI Agent / OpenAI-compatible tool calling, semantic search, movie cards, and cloud-drive resource results.
- Pro account and payment flow: the website now has monthly / yearly / lifetime pricing, hosted Creem checkout, app callback handling, and post-payment polling to confirm Pro status inside the app.
- Website support ticket system:
/support/accepts anonymous or signed-in Bug / Feature tickets. Signed-in tickets are linked to the user account for follow-up. - AI settings redesign: provider config caching, model refresh, built-in AI Pro labeling, embedding model settings, and SQLite hybrid retrieval options are now managed in one API settings page.
Brand-new “Library” — AI-powered personal e-book reader
- AI Text-to-Speech (TTS): built-in Azure Neural TTS + Web Speech API dual engines, with dozens of natural voices (Xiaoxian / Xiaoxiao / Yunxi / Yunyang and more), reading any book aloud from the cursor with continuous cross-chapter playback, adjustable speed / voice / pitch — turn any e-book into a professional audiobook instantly.
- AI Reading Assistant: one-click access to 10+ leading models — OpenAI / DeepSeek / Zhipu GLM / Qwen / Moonshot Kimi / SiliconFlow / Ollama (local) / OpenRouter / Vercel AI Gateway — to summarize chapters / answer questions / recommend similar books / hold multi-turn conversations. Includes a local chapter-vector RAG index so “what does chapter 3 actually say?” gets a grounded answer.
- AI Word Translation + Whole-Book Translation: select to translate, with AI translation (DeepL-grade quality) / Azure / Google Translate, bilingual side-by-side reading, or whole-book translation mode — read any foreign-language book without friction.
- Multi-format e-book reader: supports EPUB / PDF / TXT / MOBI / AZW / AZW3 / FB2 / DOCX / MD / HTML / CBZ / CBR / CB7 / CBT — every major format.
- Three pagination modes: single / double-page / scroll, freely switchable. The new release fixes the “only partial text shown, large blank areas” rendering bug, restoring native pagination and container scrolling.
- Cloud + local dual book sources: every connected cloud drive auto-detects books; one-click local-folder import; auto-scrape covers / authors / publication dates / summaries.
- Professional typography engine: built-in Heti / Hanzi Standard Format / Chinese Web Typography Reset / Tufte CSS / Typebase academic-grade styles — better Chinese-English mixed typesetting than Kindle.
- Bookshelf / favorites / tags / trash: complete book lifecycle management with card / list / cover view modes.
- Notes / highlights / bookmarks / selection menu: customizable highlight colors, attached notes, in-document jumps, keyboard shortcuts.
- Bulk annotation export: one-click export of all highlights and notes to Markdown / JSON / CSV / TXT.
- Reading statistics: visualize daily reading time / page turns / completion rate.
- OPDS subscriptions: subscribe to any OPDS-compliant online library.
- PDF full-text search + chapter navigation + dictionary lookup + reference search.
Advanced Music Playback
- AudioContext audio engine: 10-band EQ + reverb + panning + pitch shift (without speed change) + real-time spectrum visualization.
- Word-by-word karaoke lyrics: per-character highlight animations powered by Web Animations API, with translation / romaji dual-line support.
- Floating desktop lyrics window: independent transparent always-on-top window, draggable, scrolling with playback.
- Multi-source lyrics / cover fallback: when LRCLIB has no match, automatically fetches lyrics and covers from NetEase / KuGou / QQ Music / Kuwo / Migu open APIs (metadata only, no audio stream download).
- Customizable theme system: 12-color visual editor + 15 built-in preset themes, fully CSS-variable-driven.
Download Infrastructure
- Main-process aria2c hosting: PID file + session resume + graceful shutdown + auto-reconnect on crash.
- EngineClient real-time events: aria2-lib low-latency event-driven, subscribes to
onDownloadStart/Complete/Error/Stop/BtComplete, sub-100ms state feedback. - UPnP automatic port mapping: BT downloads automatically open NAT ports for better seeding connectivity.
- BT tracker auto-sync every 12h: pulls the latest public trackers from ngosang/trackerslist every 12 hours after launch.
- Torrent file selector: select specific files within a BT task to avoid downloading the whole torrent.
- Task detail drawer: GID / total size / progress / speed / seeders / connections / InfoHash / save path / file list — all visible at a glance.
- Drag-and-drop add tasks: drop URLs / magnet links / .torrent files from browser address bars / Finder / File Explorer to create tasks instantly.
- Protocol associations:
magnet:///mo://automatically captured to open the download dialog (supports macOSopen-url/open-file). - Download progress indicator: macOS Dock / Windows taskbar shows real-time download progress ring.
- Completion system notifications: each completed file triggers a system notification; click to focus the main window.
- Batch pause / resume / delete: direct RPC, no polling delay.
- Per-platform aria2 configurations: 7 optimized
aria2.confprofiles across darwin / linux / win32 × x64 / arm64 / armv7l / ia32. - Expanded settings: upload speed cap, seed ratio, seed time, auto-resume unfinished tasks, browser extension RPC URL display, tracker editor (one URL per line) with instant sync.
- Sleep prevention: blocks system sleep while downloads are in progress.
New Cloud Drives
| Cloud Drive | App capabilities | clouddrive-cli --provider |
|---|---|---|
| Quark Cloud Drive | Login / browse / download / upload / rename / move / share / search | quark |
| China Mobile Cloud (139) | Login / browse / download / upload / rename / move | cloud139 |
| China Telecom Cloud (189) | Login / browse / download / upload / rename / move | cloud189 |
- clouddrive-cli adds three new providers —
cloud139/cloud189/quark— and extracts sharedossUpload/uploadUtilshelpers for unified resumable uploads, chunked transfer, and progress callbacks. - clouddrive-cli adds
commandManifestandmcpToolSchemametadata so MCP clients (Claude Desktop, Cursor, etc.) can auto-discover commands, parameters, and examples.
AI Media Organizer Agent
- AgentMediaOrganizer drawer: right-click any cloud-drive folder to launch “AI Organize”, letting the AI see the current directory and execute renames / moves / classifications according to your description, with multi-turn conversation.
- Powered by Vercel AI SDK: compatible with all OpenAI-protocol models (GPT / Claude / DeepSeek / Qwen / GLM / Moonshot / Ollama via Gateway, etc.).
- Reversible operation log: every AI action is recorded in
operationHistory; one-click rollback to the pre-operation state. - Pan-context tool set: built-in
walkDirectory/renamePlan/movePlan/mediaClassifierand other safe tools the AI can call. - clouddrive-cli
organizecommand: exposes the same capabilities to AI terminals (Claude Code, Cursor, etc.) so AI agents can organize cloud drives remotely.
Settings and Infrastructure Refactor
- Unified AI / API key configuration page (
SettingAPI.vue): centrally manage OpenAI / DeepSeek / Azure TTS / Vercel AI Gateway / translation API keys, shared by the reader and organizer agents. - Advanced download settings panel (
SettingDownloadAdvanced.vue): aggregates aria2, seeding, tracker, and protocol-association advanced parameters. shared/cross-cutting layer: constants, UA,configKeys,tracker, andrenameutilities reused by main process / renderer / CLI.- Protocol handler refactor: unified
electron/main/core/protocol.tshandles magnet / file / custom protocols, with unit-test coverage. - aria2 engine policy (
aria2EnginePolicy.ts): auto-selects the optimal aria2c binary and configuration based on platform and architecture.
Screenshots [](#screenshots-)
v5.0.36: Unified library and immersive details
The home page combines Continue Watching, favorites, movies, TV, music, and books, with draggable shelves and file sources.
Media-server lists share the home page's poster sizing, rounded corners, and title layout.
Immersive details bring together backdrop artwork, playback controls, and episode covers with centered play buttons. Trakt sign-in opens the system browser and supports watchlist and personal-rating updates.
Read the v5.0.36 release notes
AI Smart Search and Agent
Global resource search, AI Agent semantic search, and cloud-drive result cards.
AI Reader
Reader AI chat, TTS, full-page bilingual translation, translated-only view, and cached translations.
Particle Music Player
Real-time spectrum visualization with particle animation background, 10-band EQ, reverb, pan, pitch-shift, word-level karaoke lyrics, and desktop floating lyric window.
Music Library
Music library, lyric enhancements, local media library, and local search.
Document AI
Ask questions about supported documents and inspect cited passages.
Media Server
Media server home with Continue Watching and categorized media library browsing.
Episode Details
Episode detail page and collection view.
Search & Aggregation
Media server search and aggregated cross-drive search.
Media Library & Drive
Local media library list view and cloud-drive file management.
Multi-cloud account management and QR code login.
Installation [](#installation-)
Package Guide
The release folder contains installers for each platform and CPU architecture. Use the keywords in each filename to pick the right package.
Windows
| File name | Platform | Notes |
|---|---|---|
...-win.exe |
Windows universal | Detects system architecture automatically. Recommended for most users. |
...-win-x64.exe |
Windows x64 | For Intel / AMD 64-bit processors. |
...-win-ia32.exe |
Windows 32-bit | For 32-bit systems or older processors. |
...-win-arm64.exe |
Windows ARM64 | For ARM64 processors, such as Qualcomm Snapdragon X Elite. |
...-win-x64.zip |
Windows x64 portable | Extract and run, no installation required. |
...-win-ia32.zip |
Windows 32-bit portable | Extract and run, no installation required. |
...-win-arm64.zip |
Windows ARM64 portable | Extract and run, no installation required. |
How to install: double-click the .exe installer and follow the prompts. For the portable version, extract the .zip package and run xbyboxplayer.exe.
macOS
| File name | Platform | Notes |
|---|---|---|
...-mac-x64.dmg |
macOS Intel | For Macs with Intel chips. |
...-mac-arm64.dmg |
macOS Apple Silicon | For Macs with M1 / M2 / M3 / M4 chips. |
How to install: double-click the .dmg file and drag the app to the Applications folder. If Apple Silicon shows a damaged-file warning after installation, run:
sudo xattr -d com.apple.quarantine /Applications/xbyboxplayer.appLinux
| File name | Platform | Notes |
|---|---|---|
...-linux-amd64.deb |
Debian / Ubuntu x64 | For Debian, Ubuntu, and similar distributions on 64-bit Intel/AMD. |
...-linux-arm64.deb |
Debian / Ubuntu ARM64 | For ARM64 Debian / Ubuntu. |
...-linux-armv7l.deb |
Debian / Ubuntu ARMv7 | For 32-bit ARM Debian / Ubuntu. |
...-linux-x86_64.AppImage |
Generic Linux x64 | Portable package for most 64-bit Linux distributions. |
...-linux-arm64.AppImage |
Generic Linux ARM64 | Portable package for ARM64 Linux. |
...-linux-armv7l.AppImage |
Generic Linux ARMv7 | Portable package for 32-bit ARM Linux. |
...-linux-x64.pacman |
Arch Linux / Manjaro x64 | For Arch Linux and derivatives on 64-bit systems. |
...-linux-aarch64.pacman |
Arch Linux ARM64 | For Arch Linux ARM64. |
...-linux-armv7l.pacman |
Arch Linux ARMv7 | For Arch Linux ARMv7. |
...-linux-x64.zip / arm64.zip / armv7l.zip |
Linux portable | Extract and run the executable inside. |
How to install:
.deb:sudo dpkg -i <file>.deb.AppImage:chmod +x <file>.AppImage && ./<file>.AppImage.pacman:sudo pacman -U <file>.pacman.zip: extract and run the executable inside the folder
clouddrive-cli [](#clouddrive-cli-)
clouddrive-cli is the terminal and AI Agent automation interface for BoxPlayer. It supports Aliyun Drive, OneDrive, Dropbox, Box, Baidu Netdisk, 115 Drive, and PikPak.
Key capabilities:
- List and recursively walk cloud drive files
- Generate media rename plans compatible with Jellyfin / Emby / Plex
- Dry-run validation before executing trackable, reversible batch renames
- Upload plans with dry-run and cloud drive organization plans
- Expose the same capabilities to MCP-compatible AI clients (Claude Desktop, Cursor, etc.) via
clouddrive-mcp
Install (with App): open BoxPlayer → Account Settings → Install CLI
Standalone install:
npm install -g clouddrive-cliFull documentation: clouddrive-cli/README.en.md | 中文
WeChat Official Account [](#wechat-official-account-)
Community [](#community-)
Telegram
Credits [](#credits-)
This project continues development based on https://github.com/liupan1890/aliyunpan.
Thanks to liupan1890.
Global search feature from panhub.shenzjd.com
Disclaimer [](#disclaimer-)
This is a free and open-source project intended for sharing cloud-drive files, convenient downloads, and Electron learning. Please comply with all applicable laws and regulations and do not abuse it.
This program works through official SDKs and APIs and does not damage or bypass official interfaces.
This program only performs 302 redirects / traffic forwarding. It does not intercept, store, or tamper with user data.
Before using this program, you should understand and accept the related risks, including but not limited to account bans and download speed limits. These risks are unrelated to this program.
If there is any infringement, please contact me by email and I will handle it promptly.
File: README.md
BoxPlayer
BoxPlayer 是面向个人媒体资产的全平台播放器,支持 Apple 全家桶(iPhone、iPad、Mac、Apple TV)、Windows、Linux、Android 手机与平板,以及 Android TV。它把多个云盘、本地文件和 Jellyfin / Emby / Plex 内容放在统一入口中,支持文件管理、媒体刮削与播放、音乐库、电子书阅读及 AI 辅助操作。本仓库主要维护 Electron 桌面版;各平台客户端的界面、功能与发布节奏可能不同。
第一次使用?前往 安装,添加云盘或媒体服务器,然后在媒体库扫描内容。版本变更与已知限制见 v5.0.36 更新说明。
界面预览
统一媒体库
主屏幕汇集继续观看、收藏夹和媒体分类;详情页展示背景图、季集、演职员与播放进度。
音乐库与粒子播放器
按歌曲、歌手、专辑和自建歌单浏览;从音乐库播放后可进入粒子播放器,也能返回列表继续管理曲目。
文件、搜索与 AI
云盘文件管理与跨来源搜索共用一个工作区。AI 功能可辅助寻找媒体、整理文件和阅读文档。
能做什么
| 场景 | 主要能力 |
|---|---|
| 文件管理 | 多账号云盘浏览、搜索、上传下载、复制移动、分享与回收站;第三方云盘按其 API 能力展示操作。 |
| 影视媒体库 | 扫描云盘和本地目录,补全海报与元数据;统一浏览电影、剧集、季集、演员和分类。 |
| 媒体服务器 | 连接 Jellyfin、Emby、Plex,浏览媒体库、继续观看、搜索并播放。 |
| 视频播放 | 内置播放器与 MPV / IINA 外部播放;支持音轨、字幕、ASS/SSA、倍速、连续播放和进度恢复。 |
| 音乐 | 歌曲、歌手、专辑、自建歌单与播放队列;粒子播放器、歌词、音效和桌面歌词。 |
| 阅读 | EPUB、PDF、TXT 等电子书;书签、笔记、高亮与 AI 阅读辅助。 |
| AI 工作台 | 搜索与分析内容、规划文件整理、文档问答;执行写入操作前提供确认。 |
| 自动化 | clouddrive-cli 和 MCP Server,适合终端及 AI Agent 调用云盘能力。 |
云盘与内容来源
- 云盘:阿里云盘 / Alipan、百度网盘、123 网盘、115、夸克、PikPak、OneDrive、Dropbox、Box、中国移动云盘 139、天翼云盘 189、光鸭云盘。
- 媒体与目录:Jellyfin、Emby、Plex、WebDAV、AList、本地文件夹。
- 不同服务的官方能力、账号权限和限速可能不同。App 会尽量只展示当前来源支持的操作。
AI 与 Pro
核心的文件管理、媒体播放、音乐、阅读和 CLI 功能可直接使用。Pro 主要覆盖需要持续服务端成本的内置 AI、资源搜索额度与优先支持。也可以配置自己的 OpenAI 兼容服务或本地模型;第三方 API 费用由对应服务商收取。
命令行与 MCP
clouddrive-cli 提供文件遍历、搜索、媒体整理计划、dry-run 预览、操作记录等能力,并能作为 MCP Server 供 AI 客户端使用。详见 独立文档。
安装
官网:xbyvideohub.com,在「全部下载」中选择设备对应的版本:
| 设备 | 下载入口 |
|---|---|
| iPhone、iPad、Mac、Apple TV | BoxPlayer App Store |
| Android 手机、平板、Android TV | 官网 Android APK 下载 |
| macOS、Windows、Linux 桌面版 | 官网下载安装包 · GitHub Releases |
请以下载页面实际列出的文件和架构为准;GitHub 草稿 Release 尚不能作为公开下载版本。Apple 平台 App Store 版与本仓库的 Electron 桌面版是不同客户端。
macOS 如遇系统安全提示,请先确认下载来源,再通过系统设置允许打开;不要对来源不明的安装包解除隔离。
开发
要求 Node.js >= 22.12.0,使用 pnpm 管理依赖。
pnpm install
pnpm dev检查与构建:
CI=true pnpm exec vue-tsc --noEmit
pnpm run test
pnpm run test:clouddrive-cli
pnpm run buildpnpm run build 会先通过 version.mjs 自动递增 patch 版本,再进行类型检查和打包;只需检查类型时请运行上面的 vue-tsc 命令。平台打包命令见 package.json。
私有 client ID、secret 和 API key 放在忽略提交的 .env.local 中,运行 pnpm run secrets:generate 生成 src/secrets.generated.ts。不要提交真实凭据。
electron/ 主进程、窗口与系统集成
src/ Vue 界面、云盘与媒体功能
shared/ 主进程与渲染端共享代码
clouddrive-cli/ CLI 与 MCP Server
scripts/ 构建、密钥与发布脚本
screenshot/ README 使用的当前界面截图社区与声明
- 问题与建议:GitHub Issues
- 官网:xbyvideohub.com
- Telegram:BoxPlayer 社区
- 本项目基于 liupan1890/aliyunpan 继续开发,感谢原作者及贡献者。
请遵守所在地区法律法规、各云盘及媒体服务的条款,并确认自己有权访问和使用相关内容。第三方服务产生的额度消耗、费用与账号风险由使用者自行承担。
File: AGENTS.md
AGENTS.md — BoxPlayer (aliyunpan)
Quick reference
pnpm install # install deps (pnpm only, never npm/yarn)
pnpm dev # hot-reload Electron dev server
pnpm run build # typecheck + bundle (vue-tsc --noEmit && vite build)
pnpm run test # focused Vitest suite (not full repo)
pnpm run test:clouddrive-cli # clouddrive-cli tests onlyPackage manager: pnpm only
Lockfile is pnpm-lock.yaml. package-lock.json and yarn.lock are in .gitignore.
Never use npm install or yarn.
Node version
engines.node >= 22.12.0 in package.json. Electron 40 requires Node 22.12+ during install/build.
Build pipeline order matters
pnpm run build runs version bump → typecheck → vite bundle. The version bump (version.mjs) auto-increments the patch version in package.json before every build. The build removes dist/ and release/ directories on start.
pnpm run build:electron calls build first, then runs electron-builder.
For platform-specific packaging:
pnpm run build:mac # unsigned macOS
pnpm run build:mac:signed # signed + notarized
pnpm run build:linux
pnpm run build:windows
pnpm run build:all # cross-platform, sequentialSensitive config: generated secrets
Private client IDs, client secrets, API keys, and private API URLs live outside git:
pnpm run secrets:generateLocal development reads them from .env.local and generates src/secrets.generated.ts. GitHub Actions reads the same keys from GitHub Secrets and runs scripts/generate-secrets.mjs --mode=ci --strict before building.
.env.local and src/secrets.generated.ts are ignored and must never be committed. src/config.ts should import generated secrets or use placeholders, not contain real private values.
Architecture: Electron + Vue 3 + Vite
| Directory | Purpose |
|---|---|
electron/main/ |
Electron main process (entry: electron/main/index.ts) |
electron/preload/ |
Preload scripts |
src/ |
Vue 3 renderer (components, views, stores, API modules) |
shared/ |
Code shared between main + renderer |
scripts/ |
Build, CLI entry points, config management |
clouddrive-cli/ |
Standalone CLI package (published to npm as clouddrive-cli) |
Path aliases (set in tsconfig.json, vite.config.ts, vitest.config.ts):
@shared/*→shared/*@main/*→electron/main/*
Cloud provider API modules in src/: aliapi/, cloudbaidu/, cloud123/, cloud115/, pikpak/, onedrive/, box/, dropbox/, quark/, cloud139/, cloud189/.
GitHub Issue workflow
When the user asks to handle GitHub Issues, first fetch the complete list of unfinished/open Issues in the requested repository. Review each Issue individually, identify its likely cause and affected code, and report the triage before changing code. Then implement fixes and run focused regression tests for each applicable Issue. Do not jump straight into a code change based only on the newest Issue or close an Issue before its fix is verified. If the repository or Issue access is unavailable, state that limitation rather than assuming the list is complete.
Testing: Vitest, Node environment, selective includes
Default app inspection: attach to the existing dev app
- Unless the user explicitly asks to execute E2E tests, always connect to the app the user already started with
pnpm run devfor inspection, reproduction, debugging, and UI verification. - Use the existing Electron CDP endpoint (normally
http://127.0.0.1:9223; confirm the active endpoint). Playwright may attach withchromium.connectOverCDP; do not useelectron.launch, spawn another Electron process, or start anotherpnpm run devinstance. - Preserve the running app's real user-data directory, accounts, settings, and playback state. Do not substitute an isolated/temporary profile or seed test data into the user's app.
- Requests to review, investigate, reproduce, fix, or verify a bug are not explicit requests to run E2E tests. Do not automatically run
pretest:e2e,test:e2e, or Playwright specs whose fixtures launch a separate app. - If the existing app or relevant window is unavailable, report that and ask the user to start/reopen it. Do not silently launch a replacement. Request approval before restarting the user's dev app when a main-process or native-module change requires it.
- This rule takes precedence over the E2E workflow below. Record what was actually verified in the existing dev app; do not describe attached-session checks as production E2E acceptance. A pending E2E gate does not authorize launching another app.
Playwright acceptance gate when E2E execution is explicitly requested
When the user explicitly asks to execute E2E tests, verify bug fixes through Playwright against an actually launched Electron application using the workflow below. Unit tests, type checks, source inspection, and merely starting pnpm run dev cannot replace this E2E gate.
- Add or update a Playwright regression test that reproduces the reported failure through the user-visible application flow.
- Build the production Electron entry with
pnpm run pretest:e2e; do not test staledist/output or an installed older BoxPlayer build. - Run the focused Playwright regression test and record the exact command and result.
- For cloud-drive bugs, use the configured real account and exercise the real provider API. Do not skip the relevant real-account case or replace it with mocks.
- For platform-specific behavior that cannot execute on the current host, run Playwright on the target platform before calling the bug fixed. If that is unavailable, report the fix as unverified/blocked rather than complete.
- A failed, skipped, or unexecuted Playwright regression test blocks declaring the bug fixed and blocks release publication.
Keep the regression test after the fix so the same bug cannot silently return.
Tests run in Node environment (not jsdom). The vitest.config.ts lists explicit test directories — not a glob over **/*.test.ts. Tests outside these paths are not picked up:
electron/main/core/__tests__/,electron/main/aria/__tests__/shared/__tests__/,scripts/__tests__/src/down/motrix-integration/,src/media-server/__tests__/src/utils/__tests__/,src/aliapi/__tests__/src/pikpak/__tests__/,src/quark/__tests__/src/dropbox/__tests__/,src/onedrive/__tests__/,src/box/__tests__/clouddrive-cli/__tests__/
Default pnpm run test runs only a subset (aria2 tests, motrix integration, a couple utils files).
When adding tests in a new directory, update vitest.config.ts.
Pre-commit hooks
Do not rely on pre-commit cleanup for secrets. Secret safety is handled by keeping real values in ignored/generated files and GitHub Secrets.
Formatting conventions
From .prettierrc:
- Single quotes, no semicolons
- 260 printWidth (very wide)
- No trailing commas
- LF line endings
sortAttributes: trueon HTML/Vue
TypeScript
tsconfig.jsontargets ESNext, moduleResolution node, strict mode,@shared/*and@main/*path aliases- Includes
src/andshared/, excludesshared/__tests__ - References
tsconfig.node.jsonfor Electron-side code
Provider Integration Checklist
When adding a new cloud-drive provider, implement the following in order unless the user explicitly excludes a step. Do not stop after only wiring file listing. Sync/change-listening is not required by default.
1. Account And Auth
- Read the official OAuth/API documentation and prefer stable API versions.
- Add
src//auth.tswith auth URL, authorization-code token exchange, and refresh token support. - Define
CLIENT_ID/CLIENT_SECRETplaceholder constants, defaulting to empty strings. - Add app key / secret fields to
.env.example,src/secrets.example.ts, andscripts/generate-secrets.mjs. - Add the provider to
tokenfrominsrc/user/userstore.ts. - Wire login, token refresh, and drive loading in
src/user/userdal.ts. - Add login entry points in
src/user/UserLogin.vueandsrc/user/UserInfo.vue.
2. Provider Detection And Drive Model
- Add
isUserinsrc/aliapi/utils.ts. - Update
GetDriveIDandGetDriveType, modeling third-party drives as a single-root drive. - Filter unsupported virtual directories in
src/pan/PanLeft.vueandsrc/pan/pantreestore.ts.
3. File List And Detail
- Add
src//dirfilelist.ts. - Implement root listing, child directory pagination, and file detail.
- Map official file models to
IAliGetFileModel; at minimum filldrive_id,file_id,parent_file_id,name,isDir,category,icon,size,time,thumbnail, andcontent_hash. - Store provider-specific path, parent id, download URL, or similar metadata in
description. - Wire root loading, directory listing, and search-listing branches in
src/pan/pandal.ts. - Wire provider file detail in
src/aliapi/file.tsApiFileInfo.
4. Download And Playback
- Wire provider direct download URLs in
src/aliapi/file.tsApiFileDownloadUrl. - Third-party drives usually do not have Aliyun transcode APIs;
ApiVideoPreviewUrl/ApiAudioPreviewUrlshould return暂无转码信息orundefined, letting playback use the raw download URL. - Wire same-directory playlist loading in
src/layout/PageVideo.vue,src/utils/openfile.ts, andsrc/utils/playerhelper.ts. - Confirm clicking provider videos does not call Aliyun APIs.
5. Search
- Add
src//search.ts. - Support keyword search.
- If the existing UI uses special
file_idvalues for search conditions, implement parse/build/filter helpers. - Wire search-directory branches in
src/pan/pandal.ts.
6. Thumbnails And Preview
- Prefer thumbnails returned by list/detail APIs.
- If the provider needs a separate thumbnail API, add
src//thumbnail.ts. - Fill
thumbnailduring file mapping so media library and file lists can use it directly.
7. File Operations
- Add
src//filecmd.ts. - Implement create folder, move to recycle bin, permanent delete, rename, move, and copy. Clearly report unsupported official capabilities.
- Wire
ApiCreatNewForder,ApiTrashBatch,ApiDeleteBatch,ApiRenameBatch,ApiMoveBatch, andApiCopyBatchinsrc/aliapi/filecmd.ts. - Unsupported capabilities must not fall through to the Aliyun default branch.
8. Sharing
- Add
src//share.tswith share-link creation. - If the provider does not support password, expiration, or multi-file sharing, block it clearly in
src/aliapi/share.ts. - Update context-menu and top-menu share visibility.
9. Upload And New Files
- Add or extend
src//upload.ts. - Implement in-memory upload for new text files.
- Implement local-file upload worker support for ordinary file/folder uploads.
- Implement large files using the provider-recommended session/chunk API.
- Wire
src/aliapi/uploadmem.tsandsrc/workerpage/uploader.ts. - Third-party drives do not support app custom encrypted/private uploads by default; hide those menu items.
10. Media Library Scanning
- Wire provider folder traversal in
src/utils/mediaScanner.ts. - Wire provider subfolder entry in
src/components/MediaLibrary.vue. - Show the provider name in media-library source labels.
- Confirm scanning does not call Aliyun list APIs.
11. Folder Picker Modal
- Treat the provider as a single-root drive in
src/pan/topbtns/SelectPanDirModal.vue. - Wire lazy child directory loading.
- Move, copy, and save-location picker modals must browse provider directories.
12. Menu Capability Boundaries
- Update
src/pan/menus/FileRightMenu.vue,src/pan/menus/FileTopbtn.vue,src/pan/menus/DirLeftMenu.vue, andsrc/pan/menus/PanTopbtn.vue. - Show common capabilities: download, share, rename, move to, copy to, delete, properties, scan media library, normal upload, and normal new file/folder.
- Hide Aliyun-only capabilities: lucky bottle, fast transfer, favorite, transcode-related actions, mark encrypted, clear history, color labels, copy directory tree, encrypted/private new file, encrypted/private upload, and import share.
13. Properties, Versions, And Recycle Bin
- Wire provider file detail in
src/pan/topbtns/ShuXingModal.vue. - If folder size has no official API, return 0 or hide it; do not call Aliyun folder-size APIs.
- If the provider supports file versions, add
src//revisions.tsand expose version listing/restoration in properties. - If the provider supports recycle bin list/restore, add
src//recyclebin.tsand wire recycle-bin directory, restore, and permanent delete. - If the official API supports only some account types or needs higher permissions, record the limitation and keep it disabled by default.
14. Tests
- Add provider helper tests under
src//__tests__/. - Cover at least OAuth URL/token body, file-list path/body, model mapping, search path/body, share body/result mapping, file-operation body, upload session/chunk path, and version/recycle-bin path where applicable.
- Update
vitest.config.tsto include provider tests.
15. Verification
- Run provider unit tests.
- Run
pnpm run build. - If playback/media library is involved, verify provider videos use provider download URLs, same-directory playlists use provider list APIs, media-library scans use provider list APIs, and context menus do not expose unsupported capabilities.
Recommended File Structure
src/<provider>/
auth.ts
dirfilelist.ts
filecmd.ts
search.ts
share.ts
upload.ts
revisions.ts # optional
recyclebin.ts # optional
thumbnail.ts # optional
__tests__/Completion Criteria
- Login and token refresh work.
- The left tree shows root and folders.
- File list opens root, subdirectories, and search results.
- File detail, download, and video playback do not call the wrong provider API.
- Context menus and top menus expose only supported capabilities.
- Create folder, rename, move, copy, and delete call provider APIs.
- Share, upload, and media-library scanning are wired or explicitly reported unsupported.
- Provider unit tests pass.
pnpm run buildpasses.
Current Experience Notes
- Dropbox and OneDrive should both be treated as single-root third-party drives.
- Third-party drive video playback should prefer raw download URLs and must not reuse Aliyun transcode APIs.
- Media-library scanning and same-directory playlists are the easiest provider branches to miss.
- Auth pages should usually open in the system browser unless the provider explicitly requires an embedded flow.
- App key / secret placeholder constants must be included in the generated-secrets flow, not committed as real values.
Cloud Download URL And Subtitle Contract
Treat a cloud download URL and its request headers as one value. ApiFileDownloadUrl must return every provider-required header in IDownloadUrl.headers; callers must preserve those headers through playback, downloads, previews, and subtitles.
| Provider | Download request requirements |
|---|---|
| Aliyun / Alipan | Signed CDN URL; Electron may add the Aliyun Referer/Origin for direct renderer requests. |
| 115 | Authorization: Bearer <account token> and DRIVE115_DOWN_AGENT. The User-Agent used to consume the URL must match the one used to obtain it. Direct renderer playback must register URL-to-account auth context; never rely only on the currently selected account. |
| Baidu | URL includes access_token; send User-Agent: pan.baidu.com and Referer: https://pan.baidu.com/. |
| 123 | The returned signed download URL is self-authorizing; API Authorization is only for obtaining the URL. |
| Quark | Account Cookie plus Quark download User-Agent, Referer: https://pan.quark.cn/, Origin: https://pan.quark.cn, and x-urlp when required by the OSS URL. |
| 139 | cloud139DownloadHeaders(): provider User-Agent, Referer, and Origin. |
| 189 | cloud189DownloadHeaders(): provider User-Agent and Referer. |
| PikPak | Temporary download/stream URL returned by the provider. |
| Dropbox / OneDrive | Temporary or pre-authenticated download URL returned by the provider. |
| Box | Access token is encoded into the constructed download URL. |
Subtitle rules:
- Same-directory cloud subtitles must use
ApiFileDownloadUrl; never fetch a guessed provider URL directly. - The web player and external players must use the subtitle-specific local proxy URL and pass
IDownloadUrl.headersasproxy_headers. - The subtitle proxy must identify the account with
user_idand the provider withdrive_id; do not use a global/current-account token when an account-specific token is available. - Video streams remain direct URLs unless encryption requires the proxy. DLNA behavior is separate and must not be changed as part of subtitle or direct-play fixes.
- Any provider download-header change requires regression coverage for both the video/download URL contract and same-directory subtitle loading.
clouddrive-cli
Standalone CLI + MCP server for agent-driven cloud-drive operations. Docs: clouddrive-cli/README.md. The CLI supports 8 providers and has its own npm package (clouddrive-cli). Separate test command: pnpm run test:clouddrive-cli.
CI
Manual trigger only (workflow_dispatch) via .github/workflows/release.yml. Builds on windows-latest + ubuntu-latest, publishes draft GitHub Release. No automatic CI on push/PR.
Release ownership: drafts only
- The human user owns the final publication of every GitHub Release. The agent and CI may prepare commits/tags, build and upload assets, and create/update draft releases only when requested.
- Requests such as “发布 release”, “更新 release”, “重新提交代码更新 release”, or “继续发布” mean prepare/update a draft; they do not authorize making it public. The user publishes it manually in GitHub.
- Never run
gh release edit --draft=false, create a non-draft release, or enable automatic publication in a workflow or packaging configuration. Keep electron-builderreleaseTypeset todraftand the workflow's final release update in draft state. - Do not delete, recreate, demote, overwrite assets on, or otherwise modify an already-public release without a separate explicit request for that exact operation. A rerun targeting a public tag must stop rather than modify that release.
- Determine the next version from the latest public release plus one patch version, unless the user explicitly specifies a different version. Do not move an existing public tag to new code.
- Report draft creation and build/test status accurately. Never describe a draft or queued workflow as a published release.
Subprojects (gitignored, referenced locally)
Motrix/, koodo-reader/, CloudServiceKit/, XbyVideoHub/, OpenCLI/, QuarkPan/, PikPakAPI/ — these are local-only and not part of the main repo build.
File: CLAUDE.md
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Quick commands
pnpm install # pnpm only — never npm/yarn
pnpm dev # hot-reload Electron dev server (Vite + vue-tsc)
pnpm run build # version bump → typecheck → vite bundle
pnpm run build:electron # full build + electron-builder packaging
pnpm run test # focused Vitest suite (Node env, aria2 + motrix + utils)
pnpm run test:clouddrive-cli # clouddrive-cli tests only
pnpm run build:mac # unsigned macOS .dmg/.zip
pnpm run build:mac:signed # signed + notarized macOS
pnpm run build:linux # Linux .deb/.AppImage/.pacman
pnpm run build:windows # Windows .exe/.zip
pnpm run build:all # cross-platform sequentially
pnpm run config:clean # blank API keys in src/config.ts (pre-commit hook)
pnpm run config:restore # restore real keys after commitArchitecture (Electron + Vue 3 + Vite)
electron/main/ Electron main process (entry: electron/main/index.ts)
core/ Window lifecycle, IPC, auto-update, protocol, dialogs
aria/ Aria2c download engine (config, UPnP, runtime)
electron/preload/ Preload scripts (IPC bridge)
src/ Vue 3 renderer
aliapi/ Alibaba Cloud Drive SDK (files, share, user, etc.)
cloudbaidu/ Baidu Netdisk provider
cloud123/ 123Pan provider
cloud115/ 115Pan provider
pikpak/ PikPak provider
onedrive/ OneDrive provider
dropbox/ Dropbox provider
box/ Box provider
quark/ Quark provider
cloud139/ CMCloud provider
cloud189/ Tianyi Cloud provider
pan/ File manager UI (tree, menus, dialogs)
media-server/ Jellyfin/Emby/Plex integration
down/ Download manager + Aria2 integration
layout/ Main layout views (PageVideo, PageMusic, etc.)
module/ Feature modules (audioplayer, musicsdk, lyricplayer, theme)
store/ Pinia stores
components/ Shared Vue components
utils/ Shared utilities
user/ Auth, account management UI
shared/ Code shared between main + renderer (constants, config keys, UA)
scripts/ Build scripts, CLI entry points (clouddrive-cli.mjs, clouddrive-mcp.mjs)
clouddrive-cli/ Standalone CLI + MCP server package (npm: clouddrive-cli)
core/ Command implementations, MCP server, upload planning
providers/ 8 cloud-drive provider implementations
media/ Media matching + rename logicPath aliases: @shared/* → shared/*, @main/* → electron/main/*
Key patterns
- pnpm only — lockfile is
pnpm-lock.yaml;package-lock.json/yarn.lockare gitignored - Node ≥ 18
- Pre-commit hooks (
nano-staged.mjs): prettier + eslint on JS/TS, stylelint + prettier on Vue/CSS, typecheck on changedsrc/files - Formatting: single quotes, no semicolons, 260 printWidth, no trailing commas, LF,
sortAttributes: truein Vue - TypeScript: strict mode, ESNext target, node moduleResolution
- Sensitive config:
scripts/clean-config.jsblanks API keys pre-commit; restore withpnpm run config:restore - Vitest: Node environment only, explicit test directory list in
vitest.config.ts(not glob patterns). Add new test dirs to config. - CI: Manual trigger only via
.github/workflows/release.yml, publishes draft GitHub Release
clouddrive-cli (AI agent integration)
Standalone CLI + MCP server for agent-driven cloud-drive operations. Supports 8 providers: aliyun, cloud123, 115, baidu, pikpak, onedrive, box, dropbox.
Key bins: clouddrive-cli (CLI), clouddrive-mcp (MCP server). Both point to scripts/clouddrive-cli.mjs and scripts/clouddrive-mcp.mjs respectively.
Agent rules when using the CLI:
- Discover commands first:
clouddrive-cli list --format json - Check capabilities:
clouddrive-cli providers capabilities --format json - Always dry-run before destructive ops
- Never invent file IDs — they must come from
files list/walk/search/tree - Use
--output <file.json>for large results
Adding a new cloud-drive provider
Follow the 15-step checklist in AGENT.md (OAuth → provider detection → file listing → download/playback → search → thumbnails → file operations → sharing → upload → media scan → folder picker → menu boundaries → properties/recycle bin → tests → verification). The checklist is authoritative — do not ship a provider that only does file listing.
File: CONTRIBUTION.md
小白羊v3版本源码帮助
v3采用 ts + vue3 + vite + electron 模板开发
1.下载源代码
https://github.com/gaozhangmin/aliyunpan.git2.打开代码目录,安装依赖
npm install pnpm -g
pnpm install
pnpm config set registry https://registry.npmmirror.com3.环境配置
3.1 配置网盘 API 密钥
编辑 src/config.ts 文件,配置各网盘平台的 APP_ID 和 APP_SECRET:
export default class Config {
// 阿里云盘配置
static ALIYUN_APP_ID = 'your_aliyun_app_id'
static ALIYUN_APP_SECRET = 'your_aliyun_app_secret'
// 百度网盘配置
static BAIDU_APP_ID = 'your_baidu_app_id'
static BAIDU_APP_SECRET = 'your_baidu_app_secret'
static BAIDU_PCS_APP_ID = 'your_baidu_pcs_app_id'
// 123网盘配置
static PAN123_APP_ID = 'your_123pan_app_id'
static PAN123_APP_SECRET = 'your_123pan_app_secret'
// 115网盘配置
static PAN115_APP_ID = 'your_115pan_app_id'
static PAN115_APP_SECRET = 'your_115pan_app_secret'
// macOS 代码签名配置(如需签名打包)
static APPLE_ID = '[email protected]'
static APPLE_PASSWORD = 'your-app-specific-password'
static APPLE_TEAM_ID = 'your-team-id'
// TMDB 配置(可选)
static TMDB_API_KEY = 'your_tmdb_api_key'
}3.2 获取网盘 API 密钥
阿里云盘:
- 访问 阿里云盘开放平台
- 登录并创建应用
- 获取 APP_ID 和 APP_SECRET
百度网盘:
- 访问 百度网盘开放平台
- 登录并创建应用
- 获取 API Key (APP_ID) 和 Secret Key (APP_SECRET)
123云盘:
- 访问 123云盘开发者平台
- 注册开发者并创建应用
- 获取 ClientID 和 ClientSecret
115网盘:
- 联系 115 官方获取开发者权限
- 获取相应的 APP_ID 和 APP_SECRET
注意:
- 请妥善保管你的 API 密钥,提交前会自动清理敏感信息
- 项目配置了 pre-commit hook,会自动清除
src/config.ts中的敏感配置- 提交后使用
npm run config:restore恢复本地配置
4.开发调试运行
pnpm run dev执行命令后会调起electron窗口,配合vscode正常开发调试即可
5.打包
pnpm run build:electron6.配置管理命令
项目提供了便捷的配置管理命令:
# 手动清理配置中的敏感信息(模拟提交前清理)
npm run config:clean
# 恢复真实配置(提交后使用)
npm run config:restore7.macOS 签名打包(可选)
如需在 macOS 上进行代码签名,需要在 src/config.ts 中配置 Apple 相关信息,然后使用:
npm run build:mac:signed或者构建所有平台(包含签名版本):
npm run build:all8.项目结构说明
├── electron/ # Electron 主进程和预加载脚本
├── src/
│ ├── components/ # Vue 组件
│ ├── config.ts # 配置文件(包含 API 密钥等)
│ ├── store/ # Pinia 状态管理
│ ├── utils/ # 工具函数
│ ├── aliapi/ # 阿里云盘 API
│ ├── cloudbaidu/ # 百度网盘 API
│ ├── cloud123/ # 123云盘 API
│ ├── cloud115/ # 115网盘 API
│ └── views/ # 页面视图
├── scripts/ # 构建和配置脚本
├── .env.example # 环境变量示例文件(已弃用)
├── vite.config.ts # Vite 配置
└── package.json # 项目依赖配置9.常见问题
Q: 启动时提示网盘 API 配置错误?
A: 请检查 src/config.ts 文件是否正确配置了相应网盘的 APP_ID 和 APP_SECRET
Q: 提交代码后本地配置被清空了?
A: 这是正常的安全机制,使用 npm run config:restore 命令恢复本地配置
Q: 如何添加新的网盘支持?
A: 参考现有网盘 API 实现,在对应目录下添加新的 API 模块
Q: 打包后的应用无法正常使用网盘功能?
A: 确保 src/config.ts 中的配置在构建前是完整的,不要使用被清理后的版本进行构建
10.贡献代码
欢迎提交 Issue 和 Pull Request!
- Fork 本仓库
- 创建功能分支 (
git checkout -b feature/amazing-feature) - 提交更改 (
git commit -m 'Add some amazing feature') - 推送到分支 (
git push origin feature/amazing-feature) - 创建 Pull Request
File: electron-builder.json
{
"appId": "com.xbyboxplayer.app",
"productName": "BoxPlayer",
"protocols": [
{
"name": "xbyboxplayer OAuth",
"schemes": ["xbyboxplayer-oauth", "boxplayer-onedriveoauth", "boxplayer-traktoauth"]
}
],
"copyright": "copyright ©2026 GaoZhangMin",
"asar": true,
"compression": "maximum",
"npmRebuild": true,
"buildDependenciesFromSource": true,
"directories": { "output": "release" },
"files": [ "dist" ],
"extraResources": [
{ "from": "./src/assets/fonts", "to": "./fonts"},
{ "from": "./static/engine/aria2.conf", "to": "./engine/aria2.conf"},
{ "from": "./static/crx", "to": "./crx"},
{ "from": "./scripts/clouddrive-cli.mjs", "to": "./cli/clouddrive-cli.mjs"},
{ "from": "./scripts/clouddrive-mcp.mjs", "to": "./cli/clouddrive-mcp.mjs"},
{ "from": "./clouddrive-cli", "to": "./clouddrive-cli"}
],
"mac": {
"icon": "./static/images/icon.icns",
"type": "distribution",
"artifactName": "boxplayer-${version}-mac-${arch}.${ext}",
"darkModeSupport": true,
"hardenedRuntime": true,
"gatekeeperAssess": false,
"category": "public.app-category.utilities",
"entitlements": "./build/entitlements.mac.plist",
"entitlementsInherit": "./build/entitlements.mac.plist",
"extraResources": [
{ "from": "./static/images/icon.icns", "to": "./images/icon.icns"},
{ "from": "./static/images/icon_30x30.png", "to": "./images/icon_30x30.png"},
{ "from": "./static/engine/darwin/${arch}", "to": "./engine/darwin/${arch}"}
],
"target": [
{ "target": "dmg", "arch": [ "x64", "arm64" ] },
{ "target": "zip", "arch": [ "x64", "arm64" ] }
],
"notarize": true
},
"linux": {
"executableName": "boxplayer",
"icon": "./static/images/icon_256x256.png",
"category": "Network",
"artifactName": "boxplayer-${version}-linux-${arch}.${ext}",
"extraResources": [
{ "from": "./static/images/icon_30x30.png", "to": "./images/icon_30x30.png"},
{ "from": "./static/images/icon_64x64.png", "to": "./images/icon_64x64.png"},
{ "from": "./static/images/icon_256x256.png", "to": "./images/icon_256x256.png"},
{ "from": "./static/engine/linux/${arch}", "to": "./engine/linux/${arch}"}
],
"target": [
{ "target": "AppImage", "arch": [ "x64", "arm64"] },
{ "target": "deb", "arch": [ "x64", "arm64"] },
{ "target": "pacman", "arch": [ "x64", "arm64"] }
]
},
"deb": {
"fpm": ["--deb-no-default-config-files"]
},
"pacman": {
"depends": ["c-ares", "ffmpeg", "gtk3", "libevent", "libvpx", "libxslt", "libxss", "minizip", "nss", "re2", "snappy", "libnotify", "libappindicator-gtk3"]
},
"win": {
"icon": "./static/images/icon_256x256.ico",
"artifactName": "boxplayer-${version}-win-${arch}.${ext}",
"requestedExecutionLevel": "asInvoker",
"extraResources": [
{ "from": "./static/images/icon_64x64.png", "to": "./images/icon_64x64.png"},
{ "from": "./static/images/icon_256x256.ico", "to": "./images/icon_256x256.ico"},
{ "from": "./static/engine/win32/${arch}", "to": "./engine/win32/${arch}", "filter": ["/*", "!mpv{,/}"]}
],
"target": [
{ "target": "nsis", "arch": [ "x64" ] }
]
},
"dmg": {
"title": "BoxPlayer",
"window": { "width": 560, "height": 320 },
"iconSize": 96,
"contents": [
{ "x": 400, "y": 160, "type": "link", "path": "/Applications" },
{ "x": 160, "y": 160, "type": "file" }
]
},
"nsis": {
"oneClick": false,
"perMachine": true,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": false,
"include": "build/installer.nsh"
},
"publish": [
{
"owner": "gaozhangmin",
"repo": "boxplayer",
"provider": "github",
"releaseType": "draft"
}
]
}
File: package.json
{
"name": "boxplayer",
"description": "BoxPlayer",
"version": "5.0.36",
"main": "dist/electron/main/index.js",
"packageManager": "[email protected]",
"author": {
"name": "gaozhangmin",
"email": "[email protected]"
},
"homepage": "https://github.com/gaozhangmin/boxplayer",
"license": "GPL-3.0",
"bin": {
"clouddrive-cli": "scripts/clouddrive-cli.mjs",
"clouddrive-mcp": "scripts/clouddrive-mcp.mjs"
},
"scripts": {
"secrets:generate": "node scripts/generate-secrets.mjs --mode=local",
"predev": "node scripts/generate-secrets.mjs --mode=local",
"dev": "vite",
"prebuild": "node scripts/generate-secrets.mjs --mode=local",
"build": "node version.mjs && vue-tsc --noEmit && vite build",
"build:version": "node version.mjs",
"build:electron": "pnpm run build && electron-builder",
"build:test": "pnpm run build && electron-builder --dir",
"build:mac": "pnpm run build && PYTHON=/usr/bin/python3 electron-builder --mac",
"build:mac:signed": "pnpm run build && PYTHON=/usr/bin/python3 CSC_IDENTITY_AUTO_DISCOVERY=true electron-builder --mac",
"build:linux": "pnpm run build && node build-linux.mjs",
"build:windows": "pnpm run build && electron-builder --win",
"build:all": "node build-all.mjs",
"rebuild:electron": "PYTHON=/usr/bin/python3 electron-rebuild -f -w better-sqlite3",
"build:clouddrive-cli": "node scripts/build-clouddrive-cli-package.mjs",
"pretest": "node scripts/generate-secrets.mjs --mode=local",
"test": "vitest run electron/main/aria/tests src/down/motrix-integration src/utils/tests/aria2EnginePolicy.test.ts src/utils/tests/aria2Rpc.test.ts",
"pretest:e2e": "node scripts/generate-secrets.mjs --mode=local && vite build",
"test:e2e": "playwright test --workers=1",
"pretest:e2e:real": "pnpm run pretest:e2e",
"test:e2e:real": "playwright test e2e/realCloud.spec.ts --workers=1",
"pretest:e2e:isolated": "pnpm run pretest:e2e",
"test:e2e:isolated": "playwright test e2e/coreNavigation.spec.ts e2e/mainWindow.spec.ts e2e/settingsPersistence.spec.ts --workers=1",
"test:mpv-integration": "BOXPLAYER_MPV_INTEGRATION=1 vitest run src/utils/tests/mpvRuntime.integration.test.ts",
"check:mpv-bundles": "node scripts/check-embedded-mpv-bundles.mjs --all",
"test:clouddrive-cli": "vitest run clouddrive-cli/tests"
},
"engines": {
"node": ">=22.12.0"
},
"devDependencies": {
"@ai-sdk/openai": "^3.0.68",
"@ai-sdk/openai-compatible": "^2.0.49",
"@arco-design/web-vue": "2.55.1",
"@arco-themes/vue-gi-demo": "^0.0.48",
"@earendil-works/pi-agent-core": "0.80.7",
"@earendil-works/pi-ai": "0.80.7",
"@electron/notarize": "^3.1.1",
"@electron/rebuild": "^4.2.0",
"@motrix/nat-api": "0.3.4",
"@opendataloader/pdf": "^2.4.7",
"@playwright/test": "^1.62.1",
"@supabase/supabase-js": "^2.108.2",
"@types/better-sqlite3": "^7.6.13",
"@types/crypto-js": "^4.2.2",
"@types/fast-levenshtein": "^0.0.4",
"@types/howler": "^2.2.11",
"@types/lodash": "^4.17.0",
"@types/markdown-it": "^14.0.0",
"@types/mime-types": "^2.1.4",
"@types/node": "^20.12.5",
"@types/node-ssdp": "^4.0.4",
"@types/secp256k1": "^4.0.6",
"@types/three": "^0.185.0",
"@types/thunky": "^1.1.2",
"@types/uuid": "^9.0.8",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vue/runtime-core": "3.4.21",
"@vue/runtime-dom": "3.4.21",
"TagCloud": "2.5.0",
"ai": "^6.0.197",
"ant-design-vue": "4.1.2",
"aria2-lib": "1.0.1",
"artplayer": "^5.4.0",
"artplayer-plugin-ambilight": "^1.1.0",
"artplayer-plugin-chapter": "^1.1.0",
"artplayer-plugin-danmuku": "^5.3.0",
"artplayer-plugin-dash-control": "^1.1.0",
"artplayer-plugin-document-pip": "^1.1.0",
"artplayer-plugin-hls-control": "^1.1.0",
"artplayer-plugin-jassub": "^1.1.0",
"artplayer-plugin-multiple-subtitles": "^1.2.0",
"axios": "^1.6.8",
"bittorrent-peerid": "^1.3.6",
"builder-util-runtime": "^9.5.1",
"chardet": "^2.0.0",
"chinese-simple2traditional": "^2.1.0",
"consola": "^3.2.3",
"cookie": "^0.6.0",
"crypto-js": "^4.2.0",
"dashjs": "^5.1.1",
"dayjs": "^1.11.10",
"dexie": "^4.0.1",
"docx-preview": "^0.3.7",
"dom-to-image": "^2.6.0",
"dompurify": "3.4.0",
"electron": "40.10.6",
"electron-builder": "^26.15.3",
"electron-is": "^3.0.0",
"electron-store": "8.2.0",
"electron-updater": "^6.8.3",
"epubjs": "^0.3.93",
"fast-levenshtein": "^3.0.0",
"fast-xml-parser": "^4.3.6",
"fflate": "^0.8.2",
"fix-path": "^4.0.0",
"fs-extra": "^10.1.0",
"fuzzysort": "^2.0.4",
"hls.js": "^1.5.7",
"howler": "^2.2.4",
"isomorphic-fetch": "^3.0.0",
"jassub": "^1.7.15",
"js-untar": "^2.0.0",
"js-yaml": "^4.1.1",
"jschardet": "^3.1.2",
"jszip": "^3.10.1",
"lazy-val": "^1.0.5",
"less": "^4.2.0",
"lodash": "^4.17.21",
"lodash.escaperegexp": "^4.1.2",
"lodash.isequal": "^4.5.0",
"lucide-vue-next": "^1.0.0",
"mammoth": "^1.8.0",
"markdown-it": "^14.1.0",
"marked": "^15.0.11",
"mhtml2html": "^3.0.0",
"mime-types": "^2.1.35",
"node-ssdp": "^4.0.1",
"pako": "^2.1.0",
"path-to-regexp": "^6.2.2",
"pdfjs-dist": "^3.11.174",
"perf_hooks": "^0.0.1",
"pinia": "^2.1.7",
"rangy": "1.3.0",
"secp256k1": "^5.0.0",
"semver": "^7.6.0",
"socks-proxy-agent": "^8.0.3",
"terser": "^5.30.3",
"three": "^0.185.0",
"thunky": "^1.1.0",
"tiny-typed-emitter": "^2.1.0",
"tree-kill": "^1.2.2",
"typescript": "^5.4.4",
"underscore": "^1.13.7",
"upnp-client-ts": "^1.1.1",
"uuid": "^9.0.1",
"uuid-by-string": "^4.0.0",
"viewerjs": "^1.11.6",
"vite": "5.2.8",
"vite-plugin-electron": "0.15.6",
"vite-plugin-electron-renderer": "0.14.5",
"vitest": "^2.1.9",
"vue": "3.4.21",
"vue-tsc": "^2.0.10",
"webdav": "5.9.0",
"webdav-server": "^2.6.2",
"whacko": "^0.19.1",
"xlsx": "^0.18.5",
"zod": "^4.4.3"
},
"debug": {
"env": {
"VITE_DEV_SERVER_HOSTNAME": "127.0.0.1",
"VITE_DEV_SERVER_PORT": 5173,
"VITE_DEV_SERVER_URL": "http://127.0.0.1:5173"
}
},
"keywords": [
"aliyunpan",
"electron",
"rollup",
"vite",
"vue3",
"vue"
],
"dependencies": {
"better-sqlite3": "^12.11.1",
"posthog-js": "^1.413.3",
"qrcode-terminal": "^0.12.0"
},
"pnpm": {
"overrides": {
"@electron/get": "3.1.0"
}
}
}