yadm-introspect
Inspect a repository for yadm compatibility
TLDR
Output commands
Output configs
Output switches for the main yadm command
Output repo
SYNOPSIS
yadm introspect [detail] [option...]
Examples:
yadm introspect --all
yadm introspect --format json --repo-path
yadm introspect version
PARAMETERS
--format <format>
Specifies the output format, such as `text` or `json`. When `json` is used, the output is structured for programmatic parsing.
--all
Displays all available introspection details about the yadm repository.
--config
Shows the effective yadm configuration, including both global and repository-specific settings.
--path
Lists the paths of all files currently managed by yadm.
--template
Lists the paths of files configured as yadm templates.
--alt
Lists the paths of yadm alternative files, which are managed but not directly linked.
--ignore
Shows patterns that yadm is configured to ignore when managing files.
--bootstrap
Displays the configured bootstrap commands, if any, that yadm runs on initialization.
--repo-path
Outputs the absolute path to the yadm Git repository.
--repo-name
Outputs the name of the yadm repository, typically the last component of the repository path.
--home-path
Outputs the absolute path to the home directory where yadm manages dotfiles.
--version
Displays the installed yadm version information.
--shell-config
Shows shell-specific configuration details relevant to yadm's operation.
--state <state>
Provides specific details about a particular yadm state, for example, `encrypted` to check encryption status.
DESCRIPTION
The `yadm-introspect` command, typically invoked as `yadm introspect`, serves as a powerful diagnostic tool for examining the internal state and configuration of a yadm repository. It allows users to retrieve various pieces of information, such as the repository's absolute path, the user's home directory where dotfiles are managed, the current encryption status, details of the Git configuration used by yadm, and paths to managed files, templates, or alternative files. This command is exceptionally useful for debugging yadm setups, understanding precisely how yadm is configured on a system, or programmatically retrieving information for scripting purposes. It provides insight into yadm's operational parameters without directly modifying them, helping to confirm crucial paths, settings, and other details that influence how yadm manages your dotfiles.
CAVEATS
The accuracy and completeness of the output depend on the current state of the yadm repository and the options used.
When querying encrypted state, full details might only be available if the repository is currently decrypted.
This command requires an initialized yadm repository to provide meaningful introspection results.
PROGRAMMATIC USE
By utilizing the `--format json` option, `yadm introspect` transforms into a powerful tool for scripting and automation. This allows external applications or scripts to reliably query yadm's operational parameters and repository state without needing to parse human-readable output, making it ideal for integration into larger system configuration workflows.
DEBUGGING AND VERIFICATION
This command is an indispensable debugging aid. It allows users to quickly verify paths, confirm configuration settings, and check the status of features like encryption or template application. It helps ensure that yadm is operating as expected and can pinpoint misconfigurations or unexpected states within the dotfiles repository.
HISTORY
`yadm-introspect` emerged as a dedicated subcommand within the yadm (Yet Another Dotfiles Manager) project to centralize and standardize the retrieval of repository information. As yadm's feature set expanded to include encryption, templates, and alternative files, the need for a robust way to query its internal state became apparent. Its development is intertwined with the overall evolution of yadm, aiming to enhance debuggability and facilitate programmatic interaction with yadm's managed dotfiles.