Linux command
box 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Authenticate
box login
List items
box folders:items [folder_id]
Upload a file
box files:upload [file.txt] --parent-id [folder_id]
Download a file
box files:download [file_id]
Create a subfolder
box folders:create [parent_id] "[folder_name]"
Search
box search "[query]"
Create a shared link
box shared-links:create [file_id] --type file
Execute bulk operations
box [command] --bulk-file-path [commands.csv]
Act on behalf of another user
box users:get [user_id] --as-user [user_id]
Output as JSON
box files:get [file_id] --json
说明
box (the @box/cli package) is the official Node.js command-line tool for the Box API. It wraps the Box Content API so that technical and non-technical users can perform file, folder, user, and admin operations without writing code. Commands are grouped by topic, e.g. `files:upload`, `folders:items`, `users:list`, `collaborations:add`. Most commands accept Box identifiers (IDs) rather than paths; `box folders:items 0` lists the root folder. The CLI supports CSV-driven bulk execution via `--bulk-file-path`, letting each row invoke one API call.
FAQ
What is the box command used for?
box (the @box/cli package) is the official Node.js command-line tool for the Box API. It wraps the Box Content API so that technical and non-technical users can perform file, folder, user, and admin operations without writing code. Commands are grouped by topic, e.g. `files:upload`, `folders:items`, `users:list`, `collaborations:add`. Most commands accept Box identifiers (IDs) rather than paths; `box folders:items 0` lists the root folder. The CLI supports CSV-driven bulk execution via `--bulk-file-path`, letting each row invoke one API call.
How do I run a basic box example?
Run `box login` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more box examples?
This page includes 10 examples for box, plus related commands for nearby Linux tasks.