# twpayne/chezmoi

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/twpayne-chezmoi).**

18,075 stars · 610 forks · Go · mit

## Links

- GitHub: https://github.com/twpayne/chezmoi
- Homepage: https://www.chezmoi.io/
- awesome-repositories: https://awesome-repositories.com/repository/twpayne-chezmoi.md

## Topics

`configuration` `dotfile` `dotfile-management` `dotfile-manager` `dotfile-managers` `dotfiles` `linux` `macos` `security` `windows`

## Description

chezmoi is a command-line utility designed to manage and synchronize system configuration files across multiple machines. It uses a local Git repository as the single source of truth, allowing users to track, version, and distribute dotfiles while maintaining a consistent state across diverse operating systems and hardware architectures.

The project distinguishes itself through a declarative reconciliation model that computes the difference between the current filesystem and the desired state defined in the repository. It features a robust templating engine that processes configuration files as dynamic templates, enabling the injection of machine-specific data, environment variables, and system metadata. To maintain security, it includes a transparent encryption layer and integrates directly with third-party password managers and key vaults, allowing sensitive credentials to be retrieved at runtime rather than stored in plain text.

Beyond core synchronization, the tool provides extensive automation capabilities for environment provisioning and lifecycle management. It supports custom hook-based scripts that execute before or after configuration operations, facilitating automated dependency installation and system-level setup. The platform also handles complex file management tasks, including symbolic link creation, external dependency fetching, and the ability to manage configurations within ephemeral container environments.

The project is distributed as a standalone binary, providing a comprehensive command-line interface for auditing configuration drift, previewing changes, and bootstrapping new environments.

## Tags

### Development Tools & Productivity

- [Dotfile Managers](https://awesome-repositories.com/f/development-tools-productivity/dotfile-managers.md) — Provides a command-line utility for secure, version-controlled dotfile management using Git, templates, and encryption. ([source](https://www.chezmoi.io/comparison-table/))
- [Configuration File Tracking](https://awesome-repositories.com/f/development-tools-productivity/automatic-file-tracking/configuration-file-tracking.md) — Tracks configuration file changes in a version-controlled working tree for synchronization across machines. ([source](https://www.chezmoi.io/reference/concepts/))
- [Configuration File Generators](https://awesome-repositories.com/f/development-tools-productivity/configuration-generators/configuration-file-generators.md) — Generates and maintains configuration files in target locations using templates, encryption, and custom permissions. ([source](https://www.chezmoi.io/reference/commands/))
- [Environment Initialization](https://awesome-repositories.com/f/development-tools-productivity/environment-initialization.md) — Initializes local configuration directories by cloning repositories or creating new tracking environments for system settings. ([source](https://www.chezmoi.io/reference/commands/init/))
- [State Synchronization](https://awesome-repositories.com/f/development-tools-productivity/state-synchronization.md) — Synchronizes local system files to match the target state defined in the source repository. ([source](https://www.chezmoi.io/reference/commands/init/))
- [Configuration Templating](https://awesome-repositories.com/f/development-tools-productivity/configuration-templating.md) — Injects machine-specific data into configuration files using templates to adapt settings to the deployment environment. ([source](https://www.chezmoi.io/reference/concepts/))
- [Environment Bootstrapping](https://awesome-repositories.com/f/development-tools-productivity/environment-bootstrapping.md) — Bootstraps new environments by cloning configuration repositories and applying the defined state in a single operation. ([source](https://www.chezmoi.io/quick-start/))
- [Deterministic State Reconciliation](https://awesome-repositories.com/f/development-tools-productivity/state-synchronization/deterministic-state-reconciliation.md) — Computes differences between the current filesystem and the desired state to maintain consistent configuration. ([source](https://www.chezmoi.io/reference/application-order/))
- [Configuration Generators](https://awesome-repositories.com/f/development-tools-productivity/configuration-generators.md) — Injects system-specific data and conditional logic into configuration files using a templating engine. ([source](https://www.chezmoi.io/user-guide/templating/))
- [Data Injection](https://awesome-repositories.com/f/development-tools-productivity/data-injection.md) — Provides mechanisms for dynamically populating configuration templates with external variables and environment-specific data. ([source](https://www.chezmoi.io/reference/configuration-file/variables/))
- [Update Preview Utilities](https://awesome-repositories.com/f/development-tools-productivity/development-workflow/update-preview-utilities.md) — Compares current local file states against repository definitions to preview pending updates before application. ([source](https://www.chezmoi.io/comparison-table/))
- [Repository Synchronization](https://awesome-repositories.com/f/development-tools-productivity/repository-synchronization.md) — Clones and pulls configuration repositories to maintain consistent settings across multiple computers. ([source](https://www.chezmoi.io/user-guide/command-overview/))
- [Version Control Automation](https://awesome-repositories.com/f/development-tools-productivity/version-control-repository-tools/version-control-managers/version-control-automation.md) — Automates staging, committing, and pushing of configuration changes to ensure state consistency across machines. ([source](https://www.chezmoi.io/reference/configuration-file/variables/))
- [Configuration State Validation](https://awesome-repositories.com/f/development-tools-productivity/code-import-utilities/configuration-validation/configuration-state-validation.md) — Verifies that local configuration files match their intended state and detects configuration drift. ([source](https://www.chezmoi.io/reference/commands/verify/))
- [Configuration Automation Scripts](https://awesome-repositories.com/f/development-tools-productivity/configuration-automation-scripts.md) — Executes custom scripts before or after configuration application to enable automated maintenance and setup. ([source](https://www.chezmoi.io/reference/source-state-attributes/))
- [Configuration Inspection](https://awesome-repositories.com/f/development-tools-productivity/configuration-inspection.md) — Displays the intended state of configuration files to allow verification of templates before applying changes. ([source](https://www.chezmoi.io/reference/commands/dump/))
- [Configuration Updates](https://awesome-repositories.com/f/development-tools-productivity/configuration-updates.md) — Automatically triggers synchronization commands when changes occur in the source directory to maintain consistency. ([source](https://www.chezmoi.io/reference/))
- [File Ignore Patterns](https://awesome-repositories.com/f/development-tools-productivity/file-ignore-patterns.md) — Defines patterns to selectively ignore files or directories during synchronization and version control tracking. ([source](https://www.chezmoi.io/reference/special-files/))
- [Initialization Hooks](https://awesome-repositories.com/f/development-tools-productivity/initialization-hooks.md) — Executes setup scripts automatically upon startup to initialize dependencies and environment settings. ([source](https://www.chezmoi.io/user-guide/advanced/install-your-password-manager-on-init/))
- [Script Execution Engines](https://awesome-repositories.com/f/development-tools-productivity/script-execution-engines.md) — Runs arbitrary shell scripts during configuration application with support for conditional execution. ([source](https://www.chezmoi.io/user-guide/frequently-asked-questions/design/))
- [Automated Merge Conflict Resolvers](https://awesome-repositories.com/f/development-tools-productivity/version-control-repository-tools/version-control-managers/repository-utilities/automated-merge-conflict-resolvers.md) — Performs three-way merges to reconcile configuration differences between local and source states. ([source](https://www.chezmoi.io/quick-start/))
- [Workspace Initialization Templates](https://awesome-repositories.com/f/development-tools-productivity/workspace-initialization-templates.md) — Generates machine-specific configuration files by executing templates and prompting for environment-specific data during initialization. ([source](https://www.chezmoi.io/user-guide/setup/))
- [Command Execution](https://awesome-repositories.com/f/development-tools-productivity/command-execution.md) — Runs system commands during template processing and returns status for conditional logic. ([source](https://www.chezmoi.io/reference/templates/functions/exec/))
- [Configuration Dictionaries](https://awesome-repositories.com/f/development-tools-productivity/configuration-dictionaries.md) — Updates configuration dictionaries by setting values at specific paths to support dynamic data manipulation. ([source](https://www.chezmoi.io/reference/templates/functions/setValueAtPath/))
- [Configuration Injection Utilities](https://awesome-repositories.com/f/development-tools-productivity/configuration-injection-utilities.md) — Injects environment-specific data and secrets into configuration files using template logic before deployment. ([source](https://www.chezmoi.io/reference/templates/functions/))
- [Ephemeral](https://awesome-repositories.com/f/development-tools-productivity/environment-provisioning/ephemeral.md) — Provides automated configuration setup and cleanup for ephemeral containerized environments. ([source](https://www.chezmoi.io/reference/commands/init/))
- [External Configuration Integration](https://awesome-repositories.com/f/development-tools-productivity/external-configuration-integration.md) — Downloads and integrates remote files or archives into the local configuration state automatically. ([source](https://www.chezmoi.io/reference/special-files/))
- [Configuration Change Alerts](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/project-scaffolding-configuration/project-configuration/configuration-change-alerts.md) — Displays differences between current and target file states to allow users to preview modifications before application. ([source](https://www.chezmoi.io/user-guide/tools/diff/))

### DevOps & Infrastructure

- [Dotfile Managers](https://awesome-repositories.com/f/devops-infrastructure/git-integration-management/dotfile-managers.md) — Provides a declarative system for tracking, versioning, and synchronizing dotfiles across multiple machines using Git.
- [Configuration Management](https://awesome-repositories.com/f/devops-infrastructure/configuration-management.md) — Synchronizes personal configuration files across multiple machines using a central repository. ([source](https://www.chezmoi.io/))
- [System Configuration Templates](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/template-and-generation-engines/configuration-driven-templating-engines/system-configuration-templates.md) — Generates machine-specific configuration files from shared templates using dynamic variables and conditional logic. ([source](https://www.chezmoi.io/))
- [Source State](https://awesome-repositories.com/f/devops-infrastructure/version-control-management/version-control/source-state.md) — Uses a local Git repository as the single source of truth for tracking and synchronizing configuration files. ([source](https://www.chezmoi.io/user-guide/frequently-asked-questions/usage/))
- [Configuration-Driven Templating Engines](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/template-and-generation-engines/configuration-driven-templating-engines.md) — Processes configuration files as dynamic templates to inject machine-specific data and environment variables.
- [File Synchronization](https://awesome-repositories.com/f/devops-infrastructure/file-synchronization.md) — Maintains desired state for local configuration files by computing differences and applying updates. ([source](https://www.chezmoi.io/quick-start/))
- [Git Integration Management](https://awesome-repositories.com/f/devops-infrastructure/git-integration-management.md) — Executes version control commands directly within the source directory to track and synchronize configuration changes. ([source](https://www.chezmoi.io/reference/commands/git/))
- [Automation Hooks](https://awesome-repositories.com/f/devops-infrastructure/automation-hooks.md) — Triggers custom scripts before or after core operations to automate auxiliary tasks during configuration management. ([source](https://www.chezmoi.io/reference/configuration-file/hooks/))
- [File-Based Configuration](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/file-based-configuration.md) — Modifies managed configuration files and optionally applies changes to the local system. ([source](https://www.chezmoi.io/user-guide/daily-operations/))
- [Lifecycle Hooks](https://awesome-repositories.com/f/devops-infrastructure/lifecycle-hooks.md) — Runs custom scripts or commands before and after specific operations to automate environment setup or cleanup. ([source](https://www.chezmoi.io/reference/configuration-file/variables/))
- [System Environment Setup](https://awesome-repositories.com/f/devops-infrastructure/system-environment-setup.md) — Executes automated scripts to install dependencies and configure system settings on new machines. ([source](https://www.chezmoi.io/links/articles/))
- [Automated System Provisioning](https://awesome-repositories.com/f/devops-infrastructure/automated-system-provisioning.md) — Automates dependency installation and system configuration during environment setup.
- [Managed Configuration Updates](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/file-based-configuration/managed-configuration-updates.md) — Refreshes the local source state with changes while maintaining encryption and template logic. ([source](https://www.chezmoi.io/reference/commands/re-add/))
- [Container Configuration](https://awesome-repositories.com/f/devops-infrastructure/container-configuration.md) — Automates configuration setup and application within ephemeral containerized environments. ([source](https://www.chezmoi.io/user-guide/machines/containers-and-vms/))
- [Container Runtime Managers](https://awesome-repositories.com/f/devops-infrastructure/container-runtime-managers.md) — Manages containerized environments by aliasing commands to runtimes for consistent configuration application. ([source](https://www.chezmoi.io/reference/commands/podman/))
- [Remote Server Provisioning](https://awesome-repositories.com/f/devops-infrastructure/infrastructure/infrastructure-as-code/provisioning-and-deployment/remote-server-provisioning.md) — Provisions remote environments by installing the configuration manager and applying the desired state via SSH. ([source](https://www.chezmoi.io/reference/commands/ssh/))
- [Reusable Configuration Blocks](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/configuration-distribution-and-sharing/reusable-configuration-blocks.md) — Stores shared code snippets in a dedicated directory for injection into multiple configuration files. ([source](https://www.chezmoi.io/reference/special-directories/chezmoitemplates/))
- [Dynamic Configuration Modifiers](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/configuration-resolution-engines/project-configuration-managers/dynamic-configuration-modifiers.md) — Removes keys or values from data structures during template processing to dynamically filter configuration settings. ([source](https://www.chezmoi.io/reference/templates/functions/deleteValueAtPath/))
- [File Attribute Modifiers](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/file-based-configuration/file-attribute-modifiers.md) — Updates metadata and processing behavior of managed files by toggling flags like encryption or permissions. ([source](https://www.chezmoi.io/reference/commands/chattr/))
- [External Dependency Managers](https://awesome-repositories.com/f/devops-infrastructure/dependency-management/external-dependency-managers.md) — Downloads and tracks external dependencies as part of the configuration setup process. ([source](https://www.chezmoi.io/comparison-table/))
- [Automated Package Synchronization](https://awesome-repositories.com/f/devops-infrastructure/distribution-packaging/system-package-manager-installations/automated-package-synchronization.md) — Automates software package installation and updates based on configuration changes. ([source](https://www.chezmoi.io/user-guide/advanced/install-packages-declaratively/))
- [Release Asset Managers](https://awesome-repositories.com/f/devops-infrastructure/release-asset-managers.md) — Retrieves specific file URLs from remote releases by matching version tags and file patterns. ([source](https://www.chezmoi.io/reference/templates/github-functions/gitHubLatestReleaseAssetURL/))
- [Template Variables](https://awesome-repositories.com/f/devops-infrastructure/template-variables.md) — Creates reusable template variables based on system properties to simplify conditional configuration logic. ([source](https://www.chezmoi.io/user-guide/machines/linux/))

### Security & Cryptography

- [Cross-Machine Configuration Synchronization](https://awesome-repositories.com/f/security-cryptography/configuration-syncing/cross-machine-configuration-synchronization.md) — Maintains a unified set of configuration files across multiple machines and operating systems. ([source](https://www.chezmoi.io/links/articles/))
- [Secret Management Integrations](https://awesome-repositories.com/f/security-cryptography/secret-management-integrations.md) — Retrieves sensitive credentials from external password managers and vaults to inject them securely into configuration files at runtime.
- [Configuration Encryption](https://awesome-repositories.com/f/security-cryptography/configuration-encryption.md) — Decrypts sensitive information from structured files during template processing to inject secrets securely. ([source](https://www.chezmoi.io/user-guide/password-managers/ejson/))
- [Secret Vault Integrations](https://awesome-repositories.com/f/security-cryptography/security/cryptography-and-secrets/secrets-credential-management/secret-vault-integrations.md) — Retrieves sensitive credentials from third-party password managers and key vaults at runtime. ([source](https://www.chezmoi.io/user-guide/password-managers/vault/))
- [Secret Management](https://awesome-repositories.com/f/security-cryptography/secret-management.md) — Retrieves sensitive data from external password managers during file generation to keep secrets out of version control. ([source](https://www.chezmoi.io/user-guide/password-managers/))
- [Password Manager Integrations](https://awesome-repositories.com/f/security-cryptography/password-manager-integrations.md) — Retrieves secrets directly from external password management services during the configuration application process. ([source](https://www.chezmoi.io/comparison-table/))
- [Secrets Management](https://awesome-repositories.com/f/security-cryptography/identity-access-management/secrets-management.md) — Injects secrets from external password managers and encrypted sources into configuration files at runtime. ([source](https://www.chezmoi.io/links/articles/))
- [Secrets Management](https://awesome-repositories.com/f/security-cryptography/secrets-management.md) — Integrates with external password managers and encryption tools to keep sensitive data out of version-controlled repositories. ([source](https://www.chezmoi.io/user-guide/setup/))
- [Password Managers](https://awesome-repositories.com/f/security-cryptography/security/cryptography-and-secrets/secrets-credential-management/password-managers.md) — Retrieves sensitive data from external password managers during template rendering to inject credentials securely. ([source](https://www.chezmoi.io/user-guide/password-managers/gopass/))

### Operating Systems & Systems Programming

- [File Template Generators](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/file-system-management/file-systems/file-template-generators.md) — Processes configuration files as templates to inject machine-specific data and automate file management. ([source](https://www.chezmoi.io/reference/templates/))
- [System Identifiers](https://awesome-repositories.com/f/operating-systems-systems-programming/system-identifiers.md) — Retrieves stable machine identifiers to ensure configuration logic remains consistent across different environments. ([source](https://www.chezmoi.io/user-guide/machines/macos/))

### Software Engineering & Architecture

- [Configuration Lifecycle Management](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-lifecycle-management.md) — Orchestrates configuration application by processing files in a specific order to manage state and dependencies. ([source](https://www.chezmoi.io/reference/special-files/))
- [Configuration State Managers](https://awesome-repositories.com/f/software-engineering-architecture/configuration-state-managers.md) — Audits current file states against the intended target to identify configuration drift and pending changes. ([source](https://www.chezmoi.io/reference/commands/status/))
- [Secret Injection Tools](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/secret-management-utilities/secret-injection-tools.md) — Retrieves sensitive configuration data from remote secret managers to inject into templates securely. ([source](https://www.chezmoi.io/user-guide/password-managers/doppler/))
- [Configuration Templates](https://awesome-repositories.com/f/software-engineering-architecture/configuration-templates.md) — Executes template files with dynamic data to generate configuration content for multiple machines. ([source](https://www.chezmoi.io/reference/templates/functions/includeTemplate/))
- [Environment Setup Scripts](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/development-process-methodologies/development-workflows/environment-setup-scripts.md) — Runs custom scripts automatically during the configuration process to handle complex setup tasks. ([source](https://www.chezmoi.io/))
- [Environment Variable Injection](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/environment-variable-management/environment-variable-injection.md) — Exposes system metadata and environment variables to configuration templates for dynamic file generation. ([source](https://www.chezmoi.io/reference/templates/variables/))

### Web Development

- [Dynamic Template Rendering](https://awesome-repositories.com/f/web-development/dynamic-template-rendering.md) — Processes configuration files as dynamic templates to inject machine-specific data and environment variables. ([source](https://www.chezmoi.io/user-guide/frequently-asked-questions/usage/))

### System Administration & Monitoring

- [Lifecycle Hook Scripts](https://awesome-repositories.com/f/system-administration-monitoring/task-automation-scripts/lifecycle-hook-scripts.md) — Executes custom scripts before or after configuration operations to automate system-level setup.
- [Environment Detection Tools](https://awesome-repositories.com/f/system-administration-monitoring/environment-detection-tools.md) — Identifies host operating system and kernel details to conditionally apply configuration logic. ([source](https://www.chezmoi.io/user-guide/machines/windows/))
- [Symbolic Link Utilities](https://awesome-repositories.com/f/system-administration-monitoring/symbolic-link-utilities.md) — Creates and manages symbolic links for configuration files with appropriate administrative privileges. ([source](https://www.chezmoi.io/user-guide/machines/windows/))

### Data & Databases

- [Remote Data Fetching](https://awesome-repositories.com/f/data-databases/remote-data-fetching.md) — Downloads files and repositories from remote sources to integrate them into the local configuration state. ([source](https://www.chezmoi.io/reference/special-files/chezmoiexternal-format/))

### Networking & Communication

- [Template Snippet Sharing](https://awesome-repositories.com/f/networking-communication/network-file-sharing/template-snippet-sharing.md) — Reuses shared template snippets across multiple configuration files to maintain consistency. ([source](https://www.chezmoi.io/user-guide/manage-machine-to-machine-differences/))
