box-cli
Box CLI
Use the installed Box CLI to complete and verify Box operations.
Operating workflow
-
Identify the requested outcome, target, and actor. If the request leaves a risky target, recipient, role, impersonated user, or batch scope ambiguous, ask one focused question before running a command.
-
Confirm the intended CLI environment and acting user before the operation. If the user names an environment, inspect
box configure:environments:select --helpand select that environment before checking identity:box users:get me --json --fields id,name,loginInclude the intended
--as-user <USER_ID>in the identity check when impersonation is authorized.users:get meconfirms the acting user, not the environment name. Reuse the same environment and actor controls throughout the operation and its verification; repeat the check after any authorized environment or actor change. Never switch to a more privileged identity merely to bypass an error. -
Resolve human-readable names to stable Box IDs before mutation. If multiple items match, present the candidates and ask the user to choose.
-
Prefer a dedicated CLI command. Add
--jsonfor machine-readable output and narrow--fieldsto the data needed for the task. -
Verify mutations with a read using the same actor. For deletes, check the parent collection or trash as appropriate; a
404alone can also mean the actor lacks access. For asynchronous operations, report pending status until completion is confirmed. -
Report the actor, action, relevant object IDs, verification evidence, and any unresolved failure. Include commands when they help the user reproduce the result.