Help us shape the future of Go! Take the 2026 Go Developer Survey

initvault

package
v0.10.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package initvault scaffolds a fresh VaultMind vault from embedded templates. The templates are persona-shaped — identity, principles, arcs, references, concepts — because that's what VaultMind is for: long-term memory of an AI agent collaboratively curated by the agent and a human partner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteConfigOnly added in v0.4.2

func WriteConfigOnly(vaultPath string) (bool, error)

WriteConfigOnly writes the type registry into an existing directory, creating .vaultmind/ and its .gitignore if needed, and reports whether it wrote the config. An existing config is left untouched.

This is the path for "index a directory of markdown I already have". Init would also drop a README and four starter notes in, which then index AS notes — fine for a fresh vault, wrong for someone's existing notes folder. Without it, `index --vault <plain-dir>` created a .vaultmind/ holding only index.db: a directory that looked like a vault to the old marker check while carrying no registry, which is the same implicit-create the guessed-path guard exists to end.

Types

type Result

type Result struct {
	VaultPath  string
	FilesAdded int
}

Result is what Init returns to the caller — used by cmd/init.go to render the next-steps message after scaffolding succeeds.

func Init

func Init(vaultPath string) (*Result, error)

Init scaffolds a fresh vault at vaultPath. The directory must not already exist — Init refuses to overwrite, because a vault is stateful (notes, embeddings, git history) and silently rewriting someone's existing vault would be the worst kind of destructive surprise.

Each templated note has its frontmatter dates filled in with today's date so a fresh vault indexes cleanly without manual editing.

func InitKnowledge added in v0.9.14

func InitKnowledge(vaultPath string) (*Result, error)

InitKnowledge scaffolds a project knowledge base at vaultPath: decisions/ and concepts/ with an example each, a README on tying notes to code, and the shared type registry. Like Init, it refuses an existing path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL