chezmoi-chef

Manage dotfiles and secrets with chezmoi. Use for initializing chezmoi, adding/editing configuration files, creating templates for multi-machine setups, encrypting sensitive files, integrating password managers (1Password, Bitwarden, pass, etc.), running scripts during apply, and syncing dotfiles across machines. Triggers on dotfile management, chezmoi commands, configuration templating, or secrets in config files.

16 stars

Best use case

chezmoi-chef is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Manage dotfiles and secrets with chezmoi. Use for initializing chezmoi, adding/editing configuration files, creating templates for multi-machine setups, encrypting sensitive files, integrating password managers (1Password, Bitwarden, pass, etc.), running scripts during apply, and syncing dotfiles across machines. Triggers on dotfile management, chezmoi commands, configuration templating, or secrets in config files.

Teams using chezmoi-chef should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/chezmoi-chef/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/cli-automation/chezmoi-chef/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/chezmoi-chef/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How chezmoi-chef Compares

Feature / Agentchezmoi-chefStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Manage dotfiles and secrets with chezmoi. Use for initializing chezmoi, adding/editing configuration files, creating templates for multi-machine setups, encrypting sensitive files, integrating password managers (1Password, Bitwarden, pass, etc.), running scripts during apply, and syncing dotfiles across machines. Triggers on dotfile management, chezmoi commands, configuration templating, or secrets in config files.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Chezmoi Dotfile Management

Chezmoi manages dotfiles across machines with templating, encryption, and password manager integration.

## Quick Reference

```bash
chezmoi init                    # Initialize
chezmoi add ~/.bashrc           # Add file
chezmoi add --template ~/.zshrc # Add as template
chezmoi add --encrypt ~/.secret # Add encrypted
chezmoi edit ~/.bashrc          # Edit and apply
chezmoi apply                   # Apply all changes
chezmoi diff                    # Preview changes
chezmoi update                  # Pull and apply
chezmoi cd                      # Shell in source dir
```

## Core Workflows

### Initialize on New Machine

From GitHub:
```bash
chezmoi init --apply github-username
```

One-liner install + init:
```bash
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply github-username
```

### Add Files to Management

```bash
chezmoi add ~/.bashrc ~/.zshrc ~/.gitconfig    # Multiple files
chezmoi add -r ~/.config/nvim                  # Directory
chezmoi add --template ~/.bashrc               # As template
chezmoi add --encrypt ~/.ssh/id_rsa            # Encrypted
```

### Edit Managed Files

```bash
chezmoi edit ~/.bashrc          # Opens source file
chezmoi edit --apply ~/.bashrc  # Auto-apply after save
```

### Sync Changes

```bash
chezmoi cd                      # Enter source directory
git add . && git commit -m "update dotfiles" && git push
exit
chezmoi apply                   # Apply locally
```

Or use chezmoi's git wrapper:
```bash
chezmoi git add .
chezmoi git commit -m "update"
chezmoi git push
```

## Templating

Create machine-specific configs. See [templates.md](references/templates.md) for full guide.

Convert to template:
```bash
chezmoi add --template ~/.bashrc
# or
chezmoi chattr +template ~/.bashrc
```

Common patterns:

```bash
# OS-specific
{{ if eq .chezmoi.os "darwin" -}}
export PATH="/opt/homebrew/bin:$PATH"
{{- else if eq .chezmoi.os "linux" -}}
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
{{- end }}

# Hostname-specific
{{ if eq .chezmoi.hostname "work-laptop" -}}
export HTTP_PROXY="http://proxy.company.com:8080"
{{- end }}

# Distro-specific (Linux)
{{ if eq .chezmoi.osRelease.id "fedora" -}}
alias update="sudo dnf upgrade"
{{- else if eq .chezmoi.osRelease.id "ubuntu" -}}
alias update="sudo apt update && sudo apt upgrade"
{{- end }}
```

Custom variables in `~/.config/chezmoi/chezmoi.toml`:
```toml
[data]
  email = "user@example.com"
  editor = "nvim"
```

Test templates:
```bash
chezmoi execute-template '{{ .chezmoi.os }}'
chezmoi data  # Show all variables
chezmoi cat ~/.bashrc  # Show rendered output
```

## Secrets Management

Integrate password managers to avoid committing secrets. See [password-managers.md](references/password-managers.md) for all integrations.

### 1Password Example

Config (`~/.config/chezmoi/chezmoi.toml`):
```toml
[onepassword]
  command = "op"
  prompt = true
```

Template:
```bash
export GITHUB_TOKEN='{{ onepasswordRead "op://Personal/github/token" }}'
export AWS_ACCESS_KEY='{{ onepasswordRead "op://Work/aws/access-key" }}'
```

### Bitwarden Example

```bash
export API_KEY='{{ (bitwarden "item" "api-credentials").login.password }}'
```

### pass Example

```bash
export SECRET='{{ pass "path/to/secret" }}'
```

## Encryption

Encrypt sensitive files stored in source directory.

### Setup with age

```bash
chezmoi age keygen -o ~/.config/chezmoi/key.txt
```

Config:
```toml
encryption = "age"
[age]
  identity = "~/.config/chezmoi/key.txt"
  recipient = "age1..." # Public key from keygen output
```

### Add Encrypted Files

```bash
chezmoi add --encrypt ~/.ssh/id_rsa
chezmoi add --encrypt ~/.aws/credentials
```

Files stored with `encrypted_` prefix, decrypted on apply.

## Run Scripts

Execute scripts during apply for setup tasks.

Create in source directory:
```bash
chezmoi cd
```

Script naming:
- `run_once_install.sh` - Run once ever
- `run_onchange_setup.sh` - Run when script changes
- `run_always.sh` - Run every apply

Example `run_once_install-packages.sh`:
```bash
#!/bin/bash
{{ if eq .chezmoi.os "darwin" -}}
brew install ripgrep fd bat
{{- else if eq .chezmoi.osRelease.id "fedora" -}}
sudo dnf install -y ripgrep fd-find bat
{{- end }}
```

## Command Reference

See [commands.md](references/commands.md) for complete command list.

## Troubleshooting

```bash
chezmoi doctor    # Check configuration
chezmoi verify    # Verify targets match source
chezmoi diff      # See pending changes
chezmoi status    # File status overview
chezmoi --debug apply  # Verbose output
```

Reset run_once scripts:
```bash
chezmoi state delete-bucket --bucket=scriptState
```

Related Skills

asian-fusion-chef

16
from diegosouzapw/awesome-omni-skill

Expert in pan-Asian cuisines and modern fusion techniques across Chinese, Japanese, Thai, Vietnamese, and Korean cooking

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

Empirical Validation

16
from diegosouzapw/awesome-omni-skill

Requires proof before marking work complete — no "trust me, it works"

dubstep

16
from diegosouzapw/awesome-omni-skill

Dubstep composition specialist - genre knowledge, sound design, and production patterns for LMMS

dotnet-ui-testing-core

16
from diegosouzapw/awesome-omni-skill

Tests UI across frameworks. Page objects, test selectors, async waits, accessibility.

dev-server-sandbox

16
from diegosouzapw/awesome-omni-skill

Run multiple isolated mux dev-server instances (temp MUX_ROOT + free ports)

detect-design

16
from diegosouzapw/awesome-omni-skill

Design system detection with drift findings and evidence blocks. Use when auditing design system consistency.

design_responsive

16
from diegosouzapw/awesome-omni-skill

Breakpoints, fluid typography, container queries ve modern CSS features.

design

16
from diegosouzapw/awesome-omni-skill

Design consistency and visual styling for the Svelte client UI. Use when creating or modifying visual elements, colors, typography, buttons, inputs, or cards.

Design Undo/Redo Systems

16
from diegosouzapw/awesome-omni-skill

CREATE comprehensive undo/redo systems with Command Pattern. Design state management for complex applications with canvas interactions, multiple stores, and user actions. Use when building new undo/redo functionality from scratch.

design-system

16
from diegosouzapw/awesome-omni-skill

design system with Tailwind v4.0, accessibility patterns, and project-specific UI/UX rules. Use for all KKOOKK frontend development.

design-system-starter

16
from diegosouzapw/awesome-omni-skill

Create and evolve design systems with design tokens, component architecture, accessibility guidelines, and documentation templates. Ensures consistent, scalable, and accessible UI across products.