Skip to main content
Document metadata stores essential information about a KDDB document including its UUID, version, source information, labels, and custom properties.

Commands

Get Metadata

Retrieve all document metadata or a specific key:
Example - All metadata:
Example - Specific key:

Set Metadata

Set or update a metadata key:
The value must be valid JSON. Strings must be quoted, objects use curly braces, etc.
Examples:
Output:

Standard Metadata Fields

KDDB documents typically include these standard metadata fields:

Output Formats

Use the global -o flag for different output formats:
JSON output example:

Use Cases

Document Identification

Get the unique identifier for a document:

Update Custom Properties

Add custom metadata for tracking:

Batch Metadata Updates

Update metadata across multiple documents:

Scripting Integration

Use metadata in automated workflows:

Export Metadata

Export metadata for documentation or reporting:

Notes

Metadata is stored in a compressed format (MessagePack) in older KDDB files and as JSON in newer versions. The CLI handles both formats transparently.
Modifying metadata changes the KDDB file. Make backups before making changes to important documents.
The uuid and version fields are typically read-only and managed by the document creation process. Avoid modifying these unless you understand the implications.

SDK: Metadata

Work with metadata programmatically

Document Overview

Back to document commands overview