Install
openclaw skills install box-cliBox CLI skill for working with files, folders, metadata, search, and Box AI in headless environments.
openclaw skills install box-cliUse the official box CLI to interact with the Box API from OpenClaw.
This skill is designed for headless deployments (e.g. Railway, CI, servers). It does not use OAuth login flows or short-lived developer tokens.
Instead, it expects Bring Your Own Credentials using:
This skill does not manage authentication automatically.
You must provide credentials before using Box commands.
⚠️ Never commit credential files (CCG JSON or JWT JSON) to git.
Add the following to your .gitignore:
box-ccg.json
box-jwt.json
.secrets/
Users must supply their own Box CCG configuration file.
The skill does not generate credentials or manage secrets.
Your file should look like:
{
"boxAppSettings": {
"clientID": "client_id_here",
"clientSecret": "client_secret_here"
},
"enterpriseID": "enterprise_id_here"
}
This file can be named box-ccg.json and placed in your deployment
environment before registering it with Box CLI.
Create a Box Custom App using:
Server Authentication (Client Credentials Grant)
You will need:
Create your config file in a secure location outside the workspace, e.g.:
/data/.secrets/box-ccg.json
⚠️ Avoid storing credentials inside the workspace directory — it may be tracked by git or accessible to other tools.
With:
{ "boxAppSettings": { "clientID": "YOUR_CLIENT_ID", "clientSecret": "YOUR_CLIENT_SECRET" }, "enterpriseID": "YOUR_ENTERPRISE_ID" }
Secure it:
chmod 600 /data/.secrets/box-ccg.json
Register it:
box configure:environments:add /data/.secrets/box-ccg.json --ccg-auth --name ccg --set-as-current box configure:environments:set-current ccg
Optional: Run as a managed user instead of the service account:
box configure:environments:add /data/.secrets/box-ccg.json --ccg-auth --ccg-user "USER_ID" --name ccg-user --set-as-current
Set:
BOX_CLIENT_ID BOX_CLIENT_SECRET BOX_ENTERPRISE_ID
Generate config:
mkdir -p /data/.secrets
cat <<EOF > /data/.secrets/box-ccg.json { "boxAppSettings": { "clientID": "$BOX_CLIENT_ID", "clientSecret": "$BOX_CLIENT_SECRET" }, "enterpriseID": "$BOX_ENTERPRISE_ID" } EOF
chmod 600 /data/.secrets/box-ccg.json
Then register:
box configure:environments:add /data/.secrets/box-ccg.json --ccg-auth --name ccg --set-as-current
If using JWT:
box configure:environments:add /data/.secrets/box-jwt.json --name jwt --set-as-current
box configure:environments:get --current box users:get me
Note: With CCG, you are authenticated as either: - The service account, or - A managed user (if --ccg-user is used)
Access depends on that identity's permissions.
box folders:get 0 box folders:list-items 0 --json
box files:upload ./report.pdf --parent-id 0
box files:download 123456789 --destination ./downloads --create-path
box search "quarterly plan" --type file
box files:metadata:get-all 123456789 box files:metadata:add 123456789 --template-key employeeRecord --data "department=Sales"
This skill supports using Box AI directly via the Box platform.
AI operations run within Box, respecting: - File permissions - Enterprise security - Data governance - Audit controls
No file download + local LLM inference required.
box ai:ask --item-id 123456789 --item-type file --prompt "Summarize this document and identify risks."
box ai:extract-structured --item-id 123456789 --item-type file --schema '{"fields":[{"name":"invoice_number","type":"string"},{"name":"total","type":"number"}]}'
box ai:extract --item-id 123456789 --item-type file
Use JSON output when parsing results:
box folders:list-items 0 --json
Prefer CCG for headless deployments because:
This skill exposes the full surface area of the Box CLI.
Explore commands:
box --help box folders --help box files --help box ai --help