Documentation
¶
Overview ¶
Package templates holds the starting structures a new project can be created from: a directory skeleton plus the AGENTS.md that explains it.
The files are go:embed'ed rather than fetched, because `cmd/bdrive` is one binary serving the CLI, the daemon and the hub — so the hub that seeds a project at creation and the client that seeds one with `bdrive init --template` read the identical set, with no gallery and no drift.
The AGENTS.md is the deliverable. Directories are the easy half and the half that decays; what makes a structure stick is the instruction file telling an agent where a new note goes, when something is archived, and what a good filename looks like.
One hard rule for the content: BearDrive syncs paths, not directories (internal/syncer/walk.go only journals regular files), so an empty directory never reaches a teammate. Every directory in a template holds at least one real file — asserted in the tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
File is one file of a template: a slash-separated path relative to the project root, and its literal content.
type Template ¶
type Template struct {
Name string `json:"name"` // the flag/API value, e.g. "docs"
Title string `json:"title"` // what a menu shows, e.g. "Docs + decision records"
Blurb string `json:"blurb"` // the one-line shape, e.g. "docs/, decisions/"
Files []File `json:"-"`
}
Template is one starting structure.