Skip to main content

Module init

Module init 

Source
Expand description

Global initialization module for Codanna

Manages:

  • Global models directory for FastEmbed
  • Project registry
  • Symlink creation for model cache

Structs§

ProjectId
Type-safe project identifier
ProjectInfo
Information about a registered project
ProjectRegistry
Registry schema for all indexed projects

Functions§

create_fastembed_symlink
Create symlink from local FastEmbed cache to global models Note: With fastembed 5.0+, we use with_cache_dir() API instead of relying on symlinks This function is kept for backward compatibility and cleanup of old setups
fastembed_cache_name
Get the FastEmbed cache directory name Returns the name used for the cache symlink NOTE: FastEmbed library is hardcoded to use “.fastembed_cache” so we must use this exact name for the symlink to work
global_dir
Get the global Codanna directory Returns ~/.codanna-dev (or test variant) on Unix-like systems
init_global_dirs
Initialize global directory structure
init_profile_infrastructure
Initialize profile system infrastructure Creates ~/.codanna/providers.json if it doesn’t exist
local_dir_name
Get the local project directory name Returns the name used for local project config
models_dir
Get the models cache directory Returns ~/.codanna-dev/models/
projects_file
Get the projects registry file Returns ~/.codanna-dev/projects.json
resolve_index_path
Resolve the index path from settings, accounting for –config flag usage