mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-06 01:14:48 -06:00
- Add comprehensive CLAUDE.md with chezmoi best practices and AI assistant guidelines - Restructure TODO.md with prioritized tasks and detailed organization - Add PowerShell profile template for Windows platform support - Split git configs into identity-specific templates (ryan/xevion) - Convert nushell env.nu and gitconfig to templates for cross-platform rendering - Refactor chezmoi hooks to TypeScript (.init_pre.ts, .update_pre.ts) - Update .chezmoiignore with better platform-specific file handling - Remove deprecated shellchecker.sh and tasks.json from VS Code config - Add mise integration to shell configs (bash, zsh, nushell, PowerShell) - Clean up commonrc.sh.tmpl WSL-specific code - Disable Deno in VS Code settings, enable simple dialog mode - Add nushell extension recommendation to VS Code This commit establishes better cross-platform support (Windows/WSL/Linux), improves documentation for future maintenance, and standardizes configuration management patterns across the repository.
4.0 KiB
4.0 KiB
Chezmoi Dotfiles Repository - AI Assistant Guidelines
Repository Context
This is a chezmoi source directory for managing dotfiles across multiple machines. Files here are SOURCE files that get templated and deployed to the home directory.
Key Concepts
Source vs Target Pattern:
- Source:
~/.local/share/chezmoi/home/dot_bashrc.tmpl(what you edit) - Target:
~/.bashrc(what gets deployed afterchezmoi apply) - Edit source files only. DO NOT modify target files directly.
File Naming Conventions:
dot_.(e.g.,dot_bashrcbecomes~/.bashrc).tmplsuffix Go template file (rendered with platform detection)private_prefix 600 permissionsencrypted_*.ageage-encrypted files (safe to commit)run_onchange_*executable scripts that run during apply
Template System:
- Uses Go templates with platform detection
- Variables:
.chezmoi.os,.chezmoi.homeDir,.data.* - Conditional rendering for Windows/Linux/macOS/WSL
Secret Management:
- Age encryption for sensitive files (recipient:
age1s3ctpj9lafl6qwyvd89sn448us7gdzd53d8yyhsc7zny78c0k4sqerrkze) - Doppler integration for API keys/tokens
- Encryption key bootstrapped via hooks from Doppler
Hooks:
.init_pre.tsand.update_pre.ts(TypeScript via Bun)- Bootstrap encryption key from Doppler before apply
- Handle
chezmoi initandchezmoi update --init
Critical Restrictions
NEVER Do These Actions
-
DO NOT apply changes to filesystem
- NO
chezmoi apply - NO direct file writes to
~/.bashrc,~/.gitconfig, etc. - Changes stay in source directory only
- NO
-
DO NOT commit or push automatically
- NO
git commitwithout explicit user request - NO
git pushon your own - Let user review changes first
- NO
-
DO NOT embed secrets in plaintext
- NO API keys, tokens, or passwords in plain text
- Use Doppler variables:
{{ dopplerProjectJson.KEY_NAME }} - Use age encryption for sensitive files
- Reference encryption:
encrypted_private_*.age
-
DO NOT verify changes yourself
- NO running build/test commands unless requested
- Let user test changes with
chezmoi difforchezmoi apply --dry-run - Ask user to verify after making changes
Recommended Actions
-
Edit source files in
home/directory- Modify
.tmplfiles with proper template syntax - Respect platform conditionals (
{{ if eq .chezmoi.os "windows" }}) - Maintain existing template structure
- Modify
-
Explain impact of changes
- Which target files will be affected
- Platform-specific behavior
- What the user should test
-
Suggest verification commands
chezmoi diff- preview changeschezmoi apply --dry-run- simulate applychezmoi status- see what's changed
-
Use templates correctly
- Platform detection:
.chezmoi.os,.data.wsl,.data.chassis - Doppler secrets:
{{ dopplerProjectJson.SECRET_NAME }} - Conditional logic:
{{ if }}...{{ else }}...{{ end }}
- Platform detection:
Common Tasks
Add new dotfile:
# DO NOT run - explain this to user instead
chezmoi add ~/.newconfig
# Edit: home/dot_newconfig or home/dot_newconfig.tmpl
Add sensitive config:
# DO NOT run - explain this to user instead
chezmoi add --encrypt ~/.ssh/config
# Creates: home/private_dot_ssh/encrypted_config.age
Edit existing file:
- Locate source:
home/dot_config/nushell/config.nu.tmpl - Make changes to source file
- User runs:
chezmoi applyorchezmoi apply ~/.config/nushell/config.nu
Platform Coverage
- OS: Windows, Linux (WSL/native), macOS
- Shells: bash, zsh, nushell, PowerShell
- Tools: 30+ development tools configured (pyenv, bun, cargo, etc.)
- Secrets: Doppler + age encryption
When Uncertain
- Ask before modifying templates with complex platform logic
- Clarify secret handling before adding sensitive data
- Let user verify all changes before suggesting next steps
- Prefer explanations over automated actions
Extended Documentation
@README.md @TODO.md @FAQ.md @ONBOARDING.md