Documentation
¶
Index ¶
- func LoadJSON(path string) (*types.Graph, error)
- func LoadManifest(path string) (*types.Manifest, error)
- func PushNeo4j(g *types.Graph, boltURL, username, password string) error
- func WriteHTML(g *types.Graph, outDir string) error
- func WriteJSON(g *types.Graph, outDir string) error
- func WriteJSONAtomic(g *types.Graph, outDir string) error
- func WriteManifestAtomic(m *types.Manifest, outDir string) error
- func WriteObsidian(g *types.Graph, outDir string) error
- func WriteObsidianConfig(g *types.Graph, outDir string) error
- func WriteSQLiteGraphAtomic(g *types.Graph, outDir string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadJSON ¶ added in v1.4.0
LoadJSON reads a graph.json file written by WriteJSON/WriteJSONAtomic.
func LoadManifest ¶ added in v1.7.1
LoadManifest reads a manifest.json file written by WriteManifestAtomic.
func PushNeo4j ¶
PushNeo4j connects to the Neo4j instance at boltURL and writes all nodes and edges from g. Existing data is NOT cleared — nodes and edges are merged using MERGE to make the operation idempotent.
Returns a clear error if Neo4j is unreachable (not a panic).
func WriteHTML ¶
WriteHTML generates an interactive vis.js Network graph as a self-contained HTML file at outDir/graph.html. Nodes are coloured by community ID; god nodes (high degree) are rendered larger.
func WriteJSONAtomic ¶ added in v1.3.0
WriteJSONAtomic serialises g to <outDir>/graph.json atomically using a temp file + rename so a crash mid-write leaves the previous file intact.
func WriteManifestAtomic ¶ added in v1.7.1
WriteManifestAtomic writes <outDir>/manifest.json atomically.
func WriteObsidian ¶
WriteObsidian creates Obsidian vault exports under outDir/obsidian/.
Repos with organization metadata are split into org-scoped vaults under obsidian/Organizations/<org>/ so each org can be opened as its own vault, with repos written directly under that org vault root. Repos without organization metadata keep the legacy combined layout under obsidian/Projects/.
Each org vault duplicates memory notes so cross-source wikilinks remain self-contained inside that vault instead of pointing outside it.
func WriteObsidianConfig ¶
WriteObsidianConfig writes .obsidian/graph.json for the default vault at outDir/obsidian using colorGroups derived from the graph's node types and workspace/project structure.
Group priority (Obsidian first-match wins):
- Memories/_root — amber memory source root
- Memories/_index — gold workspace/visibility index notes
- Memories/*/work — teal (work-scoped observations)
- Memories/*/personal — rose (personal observations)
- Memories/*/ — workspace catch-all
- Projects/<name>/_index — project root (per-project color)
- Projects/<name>/ — code symbols catch-all
Physics settings are preserved from existing graph.json if present.
func WriteSQLiteGraphAtomic ¶ added in v1.7.3
WriteSQLiteGraphAtomic writes <outDir>/graph.db as the v0.4 runtime graph store. The first schema slice intentionally persists only the graph facts needed by the build/runtime artifact contract; later query scenarios can add traversal-specific tables without making graph.json runtime truth again.
Types ¶
This section is empty.