Add cheznav info subcommand - #7
Open
djetelina wants to merge 1 commit into
Open
Conversation
djetelina
force-pushed
the
add-info-command
branch
from
June 17, 2026 09:15
fce31db to
2fa759f
Compare
Introduce a non-interactive 'cheznav info' (in a new cheznav/info.py module) that prints the cheznav and chezmoi versions, whether chezmoi is installed, the detected chezmoi config file (if any), and whether a source directory is initialized. Useful for quick diagnostics and as a non-TUI entry point for packaging smoke tests (e.g. Homebrew), which need to exercise real functionality rather than a TUI.
djetelina
force-pushed
the
add-info-command
branch
from
June 17, 2026 09:19
2fa759f to
2288279
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a non-interactive
cheznav infosubcommand that prints diagnostics and exits without launching the TUI:It reports:
chezmoiis installed and its version (or a clear "not found" message)--chezmoi-config)Why
Quick environment diagnostics, and a non-TUI entry point for packaging smoke tests. The Homebrew formula needs a test that exercises real functionality — the cookbook rejects bare
--help/--versionchecks — andcheznavotherwise only launches the TUI.cheznav infogivesbrew testa deterministic, meaningful command to assert against.Implementation
cheznav/info.pyholdsprint_info;main.pyonly wires up theinfosubparser.tests/test_cli_info.pycovers installed/missing chezmoi, config found/absent, and initialized/uninitialized source. Full suite: 92 passed.