Documentation
¶
Overview ¶
Package yedit provides reusable building blocks for TUI editors over structured YAML files.
The library is composed of independent sub-packages:
- schema: reflection over the client's Go structs (yaml tags only)
- metadata: tree-based MetadataSource with strict schema validation
- document: YAML state with block-level mutations, history, and parsing
- editor: two-panel bubbletea TUI that ties the pieces together
- presets: Source interface + struct-backed helpers (ForField, Combine) for per-field YAML snippets
- viewer: read-only TUI to browse a preset Source
- docgenerator: markdown docs generated from a schema + MetadataSource, with a TUI browser
- theme: palette and layout primitives (header, panels, two-column layout)
- alert: modal alert/confirm component shared by the TUIs
- yamlnode: query and navigation helpers over yaml.v3 node trees
- render: small shared rendering helpers (glamour YAML fence)
yedit is intentionally headless of any specific YAML schema. Clients pass a pointer to their own annotated struct and (optionally) a preset Source; the editor introspects the struct via the schema package and renders an add/edit/remove UI keyed by the canonical top-level order.
See editor.Run and editor.Config for the main entry point.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package alert provides a modal alert/confirm component for bubbletea TUIs.
|
Package alert provides a modal alert/confirm component for bubbletea TUIs. |
|
Package docgenerator generates markdown documentation files from a struct-based schema (via schema.Discover) and a MetadataSource.
|
Package docgenerator generates markdown documentation files from a struct-based schema (via schema.Discover) and a MetadataSource. |
|
Package document provides primitives for editing YAML files structured as a flat mapping of top-level keys ("blocks").
|
Package document provides primitives for editing YAML files structured as a flat mapping of top-level keys ("blocks"). |
|
Package editor provides the bubbletea TUI for editing a YAML file driven by a struct-based schema and a preset source.
|
Package editor provides the bubbletea TUI for editing a YAML file driven by a struct-based schema and a preset source. |
|
Package metadata provides a tree-based implementation of spec.MetadataSource.
|
Package metadata provides a tree-based implementation of spec.MetadataSource. |
|
Package presets provides helpers for building a YAML preset source from Go structs.
|
Package presets provides helpers for building a YAML preset source from Go structs. |
|
Package render holds rendering helpers shared by the editor and viewer TUIs.
|
Package render holds rendering helpers shared by the editor and viewer TUIs. |
|
Package schema discovers the editable shape of a Go struct via reflection over yaml tags.
|
Package schema discovers the editable shape of a Go struct via reflection over yaml tags. |
|
Package spec holds the vocabulary shared by everything that describes a configuration field: the editor, the validation rules, the metadata tree, and the documentation generator.
|
Package spec holds the vocabulary shared by everything that describes a configuration field: the editor, the validation rules, the metadata tree, and the documentation generator. |
|
Package theme provides the palette, base lipgloss styles, and shared layout primitives used across yedit-built TUIs.
|
Package theme provides the palette, base lipgloss styles, and shared layout primitives used across yedit-built TUIs. |
|
Package themebrowser provides a small, inline (not full-screen) terminal table listing yedit's built-in theme names next to their category.
|
Package themebrowser provides a small, inline (not full-screen) terminal table listing yedit's built-in theme names next to their category. |
|
Package viewer is a read-only TUI that browses the presets exposed by a presets.Source.
|
Package viewer is a read-only TUI that browses the presets exposed by a presets.Source. |
|
Package yamlnode provides read-mostly query and navigation helpers over gopkg.in/yaml.v3 node trees, shared by the editor's editing flow and its validators.
|
Package yamlnode provides read-mostly query and navigation helpers over gopkg.in/yaml.v3 node trees, shared by the editor's editing flow and its validators. |
Click to show internal directories.
Click to hide internal directories.
