Documentation
¶
Index ¶
- Variables
- type Package
- type Rule
- func Parse(content string) ([]Rule, error)
- func ParseAsdfRule(line string) (*Rule, error)
- func ParseAuthorizedKeysRule(line string) (*Rule, error)
- func ParseCloneRule(line string) (*Rule, error)
- func ParseDecryptRule(line string) (*Rule, error)
- func ParseDotfilesRule(line string) (*Rule, error)
- func ParseDownloadRule(line string) (*Rule, error)
- func ParseFile(filePath string) ([]Rule, error)
- func ParseGPGKeyRule(line string) (*Rule, error)
- func ParseHomebrewRule(line string) (*Rule, error)
- func ParseInstallRule(line string) (*Rule, error)
- func ParseKnownHostsRule(line string) (*Rule, error)
- func ParseMiseRule(line string) (*Rule, error)
- func ParseMkdirRule(line string) (*Rule, error)
- func ParseOllamaRule(line string) (*Rule, error)
- func ParseRenderRule(line string) (*Rule, error)
- func ParseRunRule(line string) (*Rule, error)
- func ParseRunShRule(line string) (*Rule, error)
- func ParseScheduleRule(line string) (*Rule, error)
- func ParseShellRule(line string) (*Rule, error)
- func ParseSudoersRule(line string) (*Rule, error)
- func ParseVarRule(line string) (*Rule, error)
Constants ¶
This section is empty.
Variables ¶
var Git platform.GitProvider = platform.NewContainer().GitProvider()
Git is the git seam used by the parser for git includes. Package var (not injected) — the parser is function-organized; reassign in tests.
This is the seam replacement for the engine call that previously hid behind the `git` import alias (git.CloneOrUpdateRepository): parser has zero git ENGINE dependencies. URL semantics (IsGitURL, ExpandShorthand, ParseGitURL) come from internal/giturl, not internal/git.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule struct {
ID string // Unique identifier for this rule
Action string // "install", "uninstall", "clone", "mkdir", "decrypt", "asdf", "mise", "homebrew", "ollama", "known_hosts", "gpg_key", "sudoers", "schedule", "shell", or "authorized_keys"
Packages []Package
OSList []string
After []string // List of IDs or package names this rule depends on
Group string
// Clone-specific fields
CloneURL string // Git repository URL
ClonePath string // Destination path for cloned repository
Branch string // Branch to clone (optional, defaults to repo default)
CloneWorkdir bool // If true, clone with .git intact (for active development repos)
CloneBare bool // If true, clone bare into <path>/.git with branches as worktrees (git worktree / worktrunk layout)
// ASDF-specific fields
AsdfPackages []string // List of "plugin@version" for asdf (e.g., "nodejs@21.4.0")
// Mise-specific fields
MisePackages []string // List of "tool@version" for mise (e.g., "node@20", "python@3.11")
MisePath string // Optional project directory for local (non-global) install
// Sudoers-specific fields
SudoersUser string // User to grant passwordless sudo (resolved at runtime if empty)
// Schedule-specific fields
SchedulePreset string // "daily", "weekly", "hourly", or ""
ScheduleCron string // raw cron expression (overrides preset)
ScheduleSource string // file path, directory, or repo passed to blueprint apply
// Decrypt-specific fields
DecryptFile string // Source encrypted file
DecryptPath string // Destination path for decrypted file
DecryptPasswordID string // Password ID to use for decryption
// KnownHosts-specific fields
KnownHosts string // SSH host to add to known_hosts (hostname or IP)
KnownHostsKey string // Key type for ssh-keyscan (ed25519, ecdsa, rsa, etc.) - optional
// Mkdir-specific fields
Mkdir string // Directory path to create
MkdirPerms string // Octal permissions (e.g., "755", "700") - optional
// GPG Key-specific fields
GPGKeyURL string // URL to the GPG key file
GPGKeyring string // Name of the keyring (without path or .gpg extension)
GPGDebURL string // Debian repository URL
// Homebrew-specific fields
HomebrewPackages []string // List of "formula[@version]" for homebrew (e.g., "node@20", "git")
HomebrewCasks []string // List of cask names for brew install --cask (e.g., "visual-studio-code")
// Dotfiles-specific fields
DotfilesURL string // Git repository URL for dotfiles
DotfilesBranch string // Optional branch to checkout
DotfilesPath string // Local clone path (auto-derived: ~/.blueprint/dotfiles/<repo-name>)
DotfilesSkip []string // Top-level entries to skip (in addition to built-ins)
// Ollama-specific fields
OllamaModels []string // List of model names for ollama (e.g., "llama3", "codellama")
// Download-specific fields
DownloadURL string // Source URL
DownloadPath string // Destination path
DownloadOverwrite bool // If true, always re-download
DownloadPerms string // Optional octal permissions (e.g. "0755")
// Run-specific fields
RunCommand string // Shell command to execute
RunUnless string // Skip if this command exits 0 (idempotency check)
RunUndo string // Execute when rule is removed from blueprint
RunSudo bool // If true, prepend sudo to the command
// Run-sh-specific fields
RunShURL string // URL to the script to download and execute
// Shell-specific fields
ShellName string // Shell name or path to set as default login shell
// AuthorizedKeys-specific fields
AuthorizedKeysFile string // Plain file path containing public key(s)
AuthorizedKeysEncrypted string // Encrypted file containing public key(s)
AuthorizedKeysPasswordID string // Password ID for decryption
// Var-specific fields
VarName string // Variable name
VarDefault string // Default value (empty string means required)
VarRequired bool // True when no default was provided
// Render-specific fields
RenderTemplate string // Template file or directory (local path or @github: shorthand)
RenderOutput string // Output destination (defaults to ".")
RenderVars []string // KEY=VALUE variable overrides
}
func ParseAsdfRule ¶
func ParseAuthorizedKeysRule ¶
func ParseCloneRule ¶
func ParseDecryptRule ¶
func ParseDotfilesRule ¶
func ParseDownloadRule ¶
func ParseGPGKeyRule ¶
func ParseHomebrewRule ¶
func ParseInstallRule ¶
func ParseKnownHostsRule ¶
func ParseMiseRule ¶
func ParseMkdirRule ¶
func ParseOllamaRule ¶
func ParseRenderRule ¶
ParseVarRule parses "var NAME [default]" lines. If no default is provided the variable is required at render time. ParseRenderRule parses a render action line. Syntax: render <template> [output: <path>] [var: KEY=VALUE ...] template may be a local path or @github: shorthand. output defaults to "." (current directory).