Expand description
Core library for treeboot.
This crate contains the reusable worktree bootstrap logic. The treeboot
binary crate provides the command-line interface on top of this API.
Structs§
- Action
Plan - A validated set of file operations and commands ready for execution.
- Action
Plan Options - Options that affect declarative run planning.
- Check
Options - Options for checking treeboot bootstrap behavior.
- Check
Report - Result summary for a
treeboot checkinvocation. - Command
Operation - A normalized command operation.
- Config
- Parsed and normalized treeboot config.
- Config
Options - Options for inspecting a treeboot config.
- Config
Runtime Options - Runtime options declared by a config file.
- Diagnostic
- One doctor diagnostic.
- Doctor
Options - Options for diagnosing treeboot discovery and validation.
- Doctor
Report - Result summary for a
treeboot doctorinvocation. - EnvOptions
- Options for inspecting the treeboot child environment.
- EnvReport
- Result summary for a
treeboot envinvocation. - Environment
Input - Explicit environment variable input used while resolving treeboot behavior.
- Execute
Options - Options that control action plan execution.
- Execution
Report - Result summary for action plan execution.
- Executor
- Executes validated action plans.
- File
Operation - A normalized file operation.
- File
Operation Completion Options - Options for root-relative source completion.
- File
Operation Options - Options for running one manual file operation command.
- File
Operation Report - Result summary for a manual file operation invocation.
- File
Operation Summary - Counts produced by one top-level file operation.
- Ignored
Init Script - Existing init script path that treeboot skipped during discovery.
- Init
Options - Options for
treeboot init. - Init
Report - Result summary for
treeboot init. - Init
Script Discovery - Discovered treeboot init scripts for a worktree.
- Loaded
Config - Loaded treeboot config selected for a worktree.
- Manual
File Operation Options - Options for building manual file operation specs.
- Planned
Command - A validated command operation ready for execution.
- Planned
File Operation - A validated file operation ready for execution.
- Resolved
Runtime Policy - Runtime policy after config defaults, environment, and CLI are merged.
- RunOptions
- Options for running worktree bootstrap.
- RunReport
- Result summary for a
treeboot runinvocation. - Runtime
Option Overrides - Environment overrides for config runtime options.
- Runtime
Policy - Runtime policy resolved from environment and CLI input.
- Source
Span - Byte and line location for a declaration in a config file.
- Status
Options - Options for inspecting treeboot discovery status.
- Status
Report - Result summary for a
treeboot statusinvocation. - Status
Snapshot Report - Serializable result summary for a
treeboot statusinvocation. - Version
Info - treeboot version metadata.
- Worktree
- Resolved Git worktree metadata used by treeboot operations.
- Worktree
Options - Options for discovering a Git worktree.
- Worktree
Snapshot - Serializable worktree context snapshot for reports.
Enums§
- Check
Action - Completed action for a
treeboot checkinvocation. - Command
Kind - Command invocation kind.
- Diagnostic
Status - Diagnostic status.
- Error
- Error type for
treeboot-coreoperations. - File
Operation Action - Completed action for a manual file operation invocation.
- File
Operation Kind - File operation kind.
- Init
Kind - Init file type to create.
- Init
Script Status - Init script discovery status for a worktree.
- Metadata
Field - Metadata field ignored by copy and sync operations.
- Output
Event - A structured message produced during a treeboot operation.
- Plan
Origin - Source of a validated action plan.
- Plan
Warning - Non-fatal warning produced while building an action plan.
- Planned
File Status - Execution status for a planned file operation.
- RunAction
- Completed action for a
treeboot runinvocation. - Symlink
Mode - Copy or sync symlink handling.
- Sync
Compare - Sync comparison mode.
Constants§
- SPEC_
VERSION - treeboot spec version implemented by this crate.
- TREEBOOT_
PACKAGE - treeboot package name used for product-level version reporting.
- TREEBOOT_
VERSION - treeboot package version.
Traits§
- Reporter
- Receives structured output events from core operations.
Functions§
- check
- Checks treeboot bootstrap behavior without side effects.
- config_
schema_ json - Returns the bundled treeboot config JSON Schema.
- diagnose
- Diagnoses treeboot discovery and validation without side effects.
- file_
operation_ source_ candidates - Returns source completion candidates relative to the resolved root checkout.
- init
- Creates a starter treeboot config or init script.
- inspect_
config - Parses, normalizes, and returns the selected config file.
- inspect_
env - Inspects the treeboot child environment.
- inspect_
status - Inspects worktree, root, init script, and config discovery status.
- inspect_
status_ snapshot - Inspects worktree, root, init script, and config discovery status as a serializable snapshot.
- run
- Runs worktree bootstrap according to the provided options.
- run_
file_ operation - Runs a manual copy, symlink, or sync file operation.
- treeboot_
version_ info - Returns product-level treeboot version metadata.
- treeboot_
version_ summary - Returns the treeboot version summary used by CLI version flags.
- version_
info - Returns version metadata for a package implementing treeboot.
Type Aliases§
- Command
Spec - Raw command intent used to build an action plan.
- Config
Report - Result summary for a
treeboot configinvocation. - Environment
- Environment variable map built for scripts and configured commands.
- File
Operation Spec - Raw file operation intent used to build an action plan.
- Manifest
- Parsed treeboot manifest.
- Manifest
Options - Options for inspecting a treeboot manifest.
- Manifest
Report - Result summary for manifest inspection.
- Result
- Convenient result type used by
treeboot-core.