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 semantic and filtered search.
Document Collections
List Collections
List all document collections available in the current project:
nestbox document collection list
Options:
--project <projectId>– Project ID or name (defaults to the current project)
Create a Collection
Create a new document collection:
nestbox document collection create <collection-name>
With metadata:
nestbox document collection create my-docs --metadata '{"category": "research"}'
Parameters:
<collection-name>– Name of the collection to create
Options:
--metadata <json>– Metadata for the document collection in JSON format--project <projectId>– Project ID or name (defaults to the current project)
Get a Collection
Get details of a specific document collection:
nestbox document collection get <collection-id>
Parameters:
<collection-id>– ID of the collection to retrieve
Options:
--project <projectId>– Project ID or name (defaults to the current project)
Update a Collection
Update metadata for an existing collection:
nestbox document collection update <collection-id> --name "<new-name>"
Parameters:
<collection-id>– ID of the collection to update
Options:
--name <name>– New name of the document collection--metadata <json>– New metadata for the document collection in JSON format--project <projectId>– Project ID or name (defaults to the current project)
Delete a Collection
Permanently delete a document collection:
nestbox document collection delete <collection-id>
Parameters:
<collection-id>– ID of the collection to delete
Options:
--project <projectId>– Project ID or name (defaults to the current project)
Documents
Add a Document
Add a document to a collection:
nestbox document doc add <collection-id> <document-content>
With metadata:
nestbox document doc add col123 "This is my document content" --metadata '{"title": "My Doc"}'
Parameters:
<collection-id>– ID of the collection to add the document to<document-content>– Content of the document
Options:
--metadata <json>– Document metadata in JSON format (optional)--project <projectId>– Project ID or name (defaults to the current project)
Get a Document
Fetch a document by its ID:
nestbox document doc get <collection-id> <document-id>
Parameters:
<collection-id>– ID of the collection containing the document<document-id>– ID of the document to retrieve
Options:
--project <projectId>– Project ID or name (defaults to the current project)
Update a Document
Update the contents of a document:
nestbox document doc update <collection-id> <document-id> <new-content>
Parameters:
<collection-id>– ID of the collection containing the document<document-id>– ID of the document to update<new-content>– New content for the document
Options:
--metadata <json>– Updated document metadata in JSON format (optional)--project <projectId>– Project ID or name (defaults to the current project)
Delete a Document
Remove a document by ID:
nestbox document doc delete <collection-id> <document-id>
Parameters:
<collection-id>– ID of the collection containing the document<document-id>– ID of the document to delete
Options:
--project <projectId>– Project ID or name (defaults to the current project)
Upload a File
Upload a file as a document:
nestbox document doc upload-file <collection-id> <file-path>
With file type:
nestbox document doc upload-file col123 ./document.pdf --type pdf
Parameters:
<collection-id>– ID of the collection to upload the file to<file-path>– Path to the file to upload
Options:
--type <fileType>– Type of the file (e.g.,pdf,txt,doc)--options <json>– Additional options for file processing in JSON format--project <projectId>– Project ID or name (defaults to the current project)
Search Documents
Search for documents within collections:
nestbox document doc search <collection-id> <search-query>
Parameters:
<collection-id>– ID of the collection to search in<search-query>– Search query string
Options:
--project <projectId>– Project ID or name (defaults to the current project)--filter <json>– Filter criteria as JSON string