other
Box CLI for Headless Automation
Use the Box CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
10 functions 6 read 4 write Manual OAuth token auth
Box CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Box CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Box CLI for Headless Automation
kosmokrator integrations:configure box --set access_token="$BOX_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call box.box_list_files '{"folder_id":"example_folder_id","limit":1,"offset":1}' --json Discovery Before Execution
Agents and scripts can inspect Box docs and schemas before choosing a function.
kosmo integrations:docs box --json
kosmo integrations:docs box.box_list_files --json
kosmo integrations:schema box.box_list_files --json
kosmo integrations:search "Box" --json
kosmo integrations:list --json Useful Box CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
box.box_list_files | Read | folder_id, limit, offset | List files and folders in a Box folder. Returns item names, IDs, types (file or folder), sizes, and modification dates. Use folder ID "0" for the root folder. |
box.box_get_file | Read | file_id | Get metadata for a Box file by ID. Returns the file name, size, type, created/modified dates, parent folder, and shared link info. |
box.box_upload_file | Write | file_name, content, parent_folder_id | Upload a file to Box. Provide the file name, content, and optionally a parent folder ID (defaults to root). Returns the uploaded file metadata. |
box.box_download_file | Read | file_id | Download a file from Box by its ID. Returns the raw file contents. Use this to retrieve file data for processing. |
box.box_delete_file | Write | file_id | Delete a file from Box by its ID. This action moves the file to the trash. Use with caution — deleted files can be restored from the trash within the retention period. |
box.box_create_folder | Write | name, parent_folder_id | Create a new folder in Box. Provide a folder name and optionally a parent folder ID (defaults to root). Returns the new folder metadata. |
box.box_get_folder | Read | folder_id | Get metadata for a Box folder by ID. Returns the folder name, size, created/modified dates, parent folder, and item counts. Use "0" for root. |
box.box_share_file | Write | file_id, access, password, expires_at | Create a shared link for a Box file. By default creates an open link. Optionally configure access level, password protection, and expiration. |
box.box_search | Read | query, limit, offset | Search for files and folders in Box. Returns matching items with names, IDs, types, and paths. Useful for finding files by name or content. |
box.box_get_current_user | Read | none | Get information about the currently authenticated Box user. Returns user name, email, login, and account details. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.