File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363- use Typer for CLI applications
6464- use pydantic for data validation
6565- prefer f-strings for formatting
66+
67+ ## Chezmoi Encrypted Files
68+
69+ Dotfiles managed by chezmoi with age encryption. To edit encrypted templates:
70+
71+ ``` bash
72+ # 1. Decrypt to temp file
73+ age -d -i ~ /.config/chezmoi/age_key.txt < source_file> > /tmp/edit.txt
74+
75+ # 2. Edit /tmp/edit.txt
76+
77+ # 3. Re-encrypt in place
78+ age -r " age1pf2v9lee0rtqp8ur4tatk5w0kpp45t9d7st7zakdlsv7ykdk2ewqacwwjp" -o < source_file> /tmp/edit.txt
79+
80+ # 4. Verify: chezmoi diff <target_path>
81+ # 5. Clean up: rm /tmp/edit.txt
82+ ```
83+
84+ - ` chezmoi re-add ` does NOT work for encrypted templates
85+ - ` chezmoi edit ` opens an interactive editor (not usable non-interactively)
86+ - source paths: ` chezmoi source-path <target> ` to find the encrypted file
87+ - always verify with ` chezmoi diff ` after re-encrypting
You can’t perform that action at this time.
0 commit comments