Files

3.4 KiB

Box Manifest CLI

The CLI is a JSON-first client for the Box Manifest HTTP API. It is intended for interactive use, shell automation, and AI agents. It performs no direct database access.

Build it from the repository root:

cd server
go build -o box-manifest ./cmd/box-manifest

The default server is http://box-manifest.hosts.uuard.com:8080. A different server can be selected with BOX_MANIFEST_SERVER_URL or a global flag placed before the command:

box-manifest --server http://localhost:8080 server show

Successful results are JSON on standard output. Failures are JSON on standard error and return a nonzero exit status. Add --compact before the command for single-line output.

box-manifest server show
box-manifest tree
box-manifest search "blue bin"
box-manifest node get --id NODE_ID
box-manifest node get --code LOOKUP_CODE

Search matches names, descriptions, and exact lookup codes. Results contain a node ID and its complete path.

Nodes

box-manifest node create --parent PARENT_ID --name NAME \
  [--description TEXT] [--quantity N]

box-manifest node update --id NODE_ID [--name NAME] \
  [--description TEXT | --clear-description] \
  [--quantity N | --clear-quantity]

box-manifest node move --id NODE_ID --parent PARENT_ID \
  [--children WITH_SUBTREE|PROMOTE_CHILDREN|CHILDREN_TO_UNSORTED]

box-manifest node delete --id NODE_ID
box-manifest node individualize --id NODE_ID --names NAME,NAME,...
box-manifest node combine --ids ID,ID,... --retain ID --name NAME
box-manifest node classify --id NODE_ID [--type TYPE_ID|--clear-type] \
  [--tags TAG_ID,TAG_ID,...]

Classification preserves the current type or tags when the corresponding flag is omitted. Pass an empty --tags= value to remove every tag.

Bulk operations

box-manifest node bulk-create --parent ID --names NAME,NAME,... \
  [--description TEXT]
box-manifest node bulk-move --ids ID,ID,... --parent ID [--children MODE]
box-manifest node bulk-delete --ids ID,ID,...
box-manifest node bulk-classify --ids ID,ID,... \
  [--set-type --type TYPE_ID] [--add-tags ID,ID] [--remove-tags ID,ID]

Use --set-type without --type to clear the type from every selected node.

Types and tags

box-manifest type list
box-manifest type create --name NAME [--description TEXT] [--icon KEY] [--color HEX]
box-manifest type update --id ID --name NAME [--description TEXT] [--icon KEY] [--color HEX]
box-manifest type delete --id ID

box-manifest tag list
box-manifest tag create --name NAME [--color HEX]
box-manifest tag update --id ID --name NAME [--color HEX]
box-manifest tag delete --id ID

Import and export

Import remains a deliberate two-step operation:

box-manifest import preview --parent PARENT_ID --file manifest.json
box-manifest import commit --plan PLAN_ID

Use --file - or omit --file to read a manifest from standard input. Export produces the same portable, UUID-free representation as the web client:

box-manifest export
box-manifest export --output inventory.json

Raw API access

The raw command ensures new API operations remain available before a friendly CLI wrapper is added:

box-manifest api GET /api/tree
box-manifest api PATCH /api/nodes/NODE_ID \
  --data '{"description":"Updated by automation"}'
box-manifest api POST /api/nodes/bulk/move --data @request.json

Consult api/openapi.yaml for endpoint request and response schemas.