Skip to main content

Document Workflow

This workflow demonstrates how to work with documents using the Nestbox AI CLI. It covers listing collections, creating a new one with metadata, uploading content and files, and running search.

Step 1: List Collections

Check what collections already exist for your project:

nestbox document collection list

Step 2: Create Collection

Create a new document collection with metadata:

nestbox document collection create "Marketing Documents" --metadata '{"department": "Marketing", "type": "documents"}'

Step 3: Add Documents

Add a document directly with content:

nestbox document doc add <collection-id> "This document outlines the marketing strategy for Q1." --metadata '{"title": "Q1 Marketing Strategy"}'

Upload a file to the same collection:

nestbox document doc upload-file <collection-id> ./marketing_report.pdf --type pdf

Search the collection using a query:

nestbox document doc search <collection-id> "Marketing Strategy"