Documents
This page describes all commands in the Nestbox AI CLI for managing documents and collections. Documents are organized into collections and can be individually uploaded, updated, retrieved, or deleted. These commands also support full-text and semantic search.
List Collections
List all document collections available in the current project:
nestbox document collection list
Create a Collection
Create a new document collection:
nestbox document collection create --name "<collection-name>"
You can include metadata like description, configuration settings, or indexes when applicable.
Update a Collection
Update metadata for an existing collection:
nestbox document collection update --id <collection-id> --name "<new-name>"
Delete a Collection
Permanently delete a document collection:
nestbox document collection delete --id <collection-id>
Add a Document
Create a new document by passing a JSON object directly:
nestbox document doc add --collection <collection-id> --data '{ "title": "Doc Title", "body": "Content" }'
Upload a File
Upload a file and register it as a document in a collection:
nestbox document doc upload-file --collection <collection-id> --file ./example.pdf
Get a Document
Fetch a document by its ID:
nestbox document doc get --id <document-id>
Update a Document
Update the contents of a document:
nestbox document doc update --id <document-id> --data '{ "title": "Updated Title" }'
Delete a Document
Remove a document by ID:
nestbox document doc delete --id <document-id>
Search Documents
Perform a semantic or keyword-based search:
nestbox document search --collection <collection-id> --query "search terms"