Utilities
Frontmatter
LLMWiki.parse_frontmatter — Function
parse_frontmatter(content::String) -> (meta::PageMeta, body::String)Parse YAML frontmatter delimited by --- from a markdown file. Returns the parsed PageMeta and the remaining body text. If no frontmatter is found, returns a default PageMeta with title="" and the full content as body.
LLMWiki.write_frontmatter — Function
write_frontmatter(meta::PageMeta) -> StringGenerate YAML frontmatter string with --- delimiters.
write_frontmatter(meta::PageMeta, body::AbstractString) -> StringSerialize frontmatter + body into a complete Markdown document.
Markdown Utilities
LLMWiki.slugify — Function
slugify(title::String) -> StringConvert a concept title to a URL-safe slug.
Examples
slugify("Knowledge Compilation") == "knowledge-compilation"
slugify("C++ Templates") == "c-templates"
slugify(" Foo Bar ") == "foo-bar"State Management
LLMWiki.load_state — Function
load_state(config::WikiConfig) -> WikiStateRead the wiki state from config.state_file. Returns an empty WikiState if the file does not exist or cannot be parsed.
LLMWiki.save_state — Function
save_state(config::WikiConfig, state::WikiState)Persist state to config.state_file atomically (write to a temporary file then rename).
LLMWiki.detect_changes — Function
detect_changes(config::WikiConfig, state::WikiState) -> Vector{SourceChange}Walk config.sources_dir, compare each file's SHA-256 hash against the recorded state, and classify every file as NEW, CHANGED, UNCHANGED, or DELETED.
Files whose path previously appeared in state.sources but no longer exist on disk are reported as DELETED.
Configuration
LLMWiki.load_config — Function
load_config(root::String=".") -> WikiConfigLoad wiki configuration from .llmwiki/config.yaml. If the file does not exist, return default_config(root).
LLMWiki.save_config — Function
save_config(config::WikiConfig)Persist the current configuration to .llmwiki/config.yaml. Only non-default values are written so the file stays minimal.
LLMWiki.default_config — Function
default_config(root::String=".") -> WikiConfigReturn a WikiConfig with all default values rooted at root. Directory paths are made absolute relative to root.
LLMWiki.resolve_paths! — Function
resolve_paths!(config::WikiConfig) -> WikiConfigEnsure all directory/file paths in config are absolute, resolving them relative to config.root. Mutates and returns config.
Operation Log
LLMWiki.log_operation! — Function
log_operation!(config::WikiConfig, operation::Symbol, details::String)Append an entry to the wiki operation log at config.log_file.
Each entry is formatted as:
## [2026-04-06T19:00:00] operation | detailsLLMWiki.read_log — Function
read_log(config::WikiConfig) -> Vector{NamedTuple{(:timestamp,:operation,:details), Tuple{String,String,String}}}Parse the wiki operation log and return a vector of named tuples. Lines that do not match the expected format are silently skipped.
Extension Stubs
LLMWiki.semantic_search — Function
semantic_search(config::WikiConfig, query::String; top_k::Int=10) -> Vector{SearchResult}Semantic vector search over wiki pages. Requires using LLMWiki, Mem0.
LLMWiki.load_state_sqlite — Function
load_state_sqlite(config::WikiConfig) -> WikiStateLoad wiki state from SQLite. Requires using LLMWiki, SQLite.
LLMWiki.save_state_sqlite — Function
save_state_sqlite(config::WikiConfig, state::WikiState)Save wiki state to SQLite. Requires using LLMWiki, SQLite.