initsvc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package initsvc creates and converges the per-user home, ported from facade.init: it (re)creates the directory scaffolding, seeds the starter files (manifest, inventory, .env) when missing, and re-asserts secret perms. --force overwrites the seed files (optionally backing the old ones up first).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	ConfigDir string
	Created   []string
	Existed   []string
	Backup    string
}

Result summarizes an init run.

func (Result) Format

func (r Result) Format() string

Format renders the human-readable init summary (mirrors InitResult.format).

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service scaffolds the home.

func New

func New(p paths.Paths, emitUseKeychain bool) *Service

New builds an init service. emitUseKeychain matches the platform (macOS only).

func (*Service) Run

func (s *Service) Run(force, backup bool, stamp string) (Result, error)

Run creates/converges the home. stamp is the timestamp for a --force --backup dir (pass "" when not backing up). force overwrites seed files; backup copies the old ones into <home>/.state/init-backup-<stamp>/ first.

Jump to

Keyboard shortcuts

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