Expand description
tutorial — data and introspection for the interactive tutorial.
The interactive driver lives in dodot-cli; this module provides
the building blocks it composes: pack classification, shell-
integration detection (read-only inspection plus an explicit
append helper), JSON state persistence for resume, and the
serializable TutorialCtx that the CLI passes to step
templates. Reads are pure; writes (append_shell_integration,
save_state, clear_state) only run on explicit user consent
from the driver.
Structs§
- Shell
Integration - What we found out about the
eval "$(dodot init-sh)"line. - Tutorial
Ctx - Serializable context passed to step templates. The CLI driver mutates this between steps; templates read fields by name.
- Tutorial
Pack - Summary line for one pack as shown in the tutorial.
- Tutorial
State - Persisted between tutorial invocations so users can resume.
Enums§
- Pack
Kind - Coarse categorisation of a pack used by the tutorial to pick a good starter. Names match human prose: “config-only” / “shell” / “install”.
Functions§
- append_
shell_ integration - Append the eval line to the user’s rc file with a header comment. Idempotent: returns Ok without writing if the line is already there.
- classify_
pack - Classify a pack by inspecting its top-level files.
- clear_
state - detect_
shell_ integration - Detect the shell init situation for the user.
- discover_
and_ classify - Discover packs in the active context and classify each one.
- load_
state - save_
state - state_
path - Path where tutorial state is stored.