LlmCore.Paths (llm_core v0.3.0)

Copy Markdown View Source

Cross-project path helpers for llm_core.

The module centralizes how we resolve global and project-specific directories so consuming applications can override locations through environment variables without patching the library.

Summary

Functions

Ensures the given directory exists.

Returns the directory that stores global configuration files.

Returns the root directory for shared llm_core state.

Returns the directory for global memory assets (cache, buffers, etc.).

Returns the project configuration directory.

Returns the root of the current project workspace.

Functions

ensure_dir!(path)

@spec ensure_dir!(String.t()) :: :ok

Ensures the given directory exists.

global_config_dir()

@spec global_config_dir() :: String.t()

Returns the directory that stores global configuration files.

global_home()

@spec global_home() :: String.t()

Returns the root directory for shared llm_core state.

Precedence:

  • LLM_CORE_HOME
  • DEVMAN_HOME (legacy compatibility)
  • ~/.llm_core

global_memory_dir()

@spec global_memory_dir() :: String.t()

Returns the directory for global memory assets (cache, buffers, etc.).

project_config_dir()

@spec project_config_dir() :: String.t()

Returns the project configuration directory.

Precedence:

  • LLM_CORE_PROJECT_CONFIG
  • DEVMAN_CONFIG (legacy compatibility)
  • <project_root>/.llm_core

project_root()

@spec project_root() :: String.t()

Returns the root of the current project workspace.

Precedence: