Expand description
Utility functions for the Memvid CLI
Constants§
- FREE_
TIER_ MAX_ FILE_ SIZE - Free tier file size limit: 50 MB Files larger than this require a paid plan with API key authentication With –no-raw default, 50 MB fits ~700 small documents or ~4 large PDFs
- MIN_
FILE_ SIZE - Minimum file size: 10 MB Ensures memory files have reasonable capacity for basic usage
Functions§
- apply_
lock_ cli - Apply lock CLI settings to a memory instance
- autodetect_
memory_ file - Auto-detect a memory file in the current directory
- ensure_
api_ key_ for_ large_ file - Check if a file exceeds the free tier limit and require API key if so
- ensure_
capacity_ with_ api_ key - Check total memory size against plan capacity limit Called before operations that would increase memory size
- ensure_
cli_ mutation_ allowed - Ensure that CLI mutations are allowed for the given memory
- ensure_
feature_ access - Check if the current plan allows a feature
- format_
bytes - Format bytes in a human-readable format (B, KB, MB, GB, TB)
- format_
percent - Format a percentage value for display
- format_
timestamp - Format a Unix timestamp to ISO 8601 string
- format_
timestamp_ ms - Format milliseconds as HH:MM:SS.mmm
- frame_
status_ str - Convert frame status to string representation
- get_
effective_ capacity - Get the effective capacity limit for the current user
- looks_
like_ memory - Check if a string looks like a memory file path
- looks_
like_ memory_ path - Check if a path looks like a memory file
- open_
read_ only_ mem - Open a memory file in read-only mode
- owner_
hint_ to_ json - Convert lock owner hint to JSON format
- parse_
date_ boundary - Parse a date boundary string (YYYY-MM-DD)
- parse_
size - Parse a size string (e.g., “6MB”, “1.5 GB”) into bytes
- parse_
timecode - Parse a timecode string (HH:MM:SS or MM:SS or SS) into milliseconds
- parse_
vector - Parse a comma-separated vector string into f32 values
- read_
embedding - Read an embedding vector from a file.
- read_
payload - Read payload bytes from a file or stdin
- require_
active_ plan - Check if the user’s plan allows write/query operations
- round_
percent - Round a percentage value to one decimal place
- select_
frame - Select a frame by ID or URI
- yes_no
- Convert boolean to “yes” or “no” string