Claude Code config

claude-code-dotfiles

Syncs your ~/.claude directory across machines with Git.

19 stars 4 forksConfig & memory Source

Install

From source
git clone https://github.com/elizabethfuentes12/claude-code-dotfiles.git

From the README

How to Sync Claude Code Settings Across Multiple Machines

Claude Code dotfiles let you version-control your ~/.claude directory — including CLAUDE.md, custom slash commands, settings, hooks, and agents — so your AI coding environment stays in sync across every machine you use. No extra tools required: just Git and a shell function.
This approach works with any terminal-based AI coding assistant that stores config in a dotfiles directory. The examples below focus on Claude Code, Anthropic's CLI for software engineering.

What Is Inside This Repo

Why Sync Claude Code Config With Git

If you use Claude Code as your AI coding assistant, you likely have:

- A carefully crafted CLAUDE.md with instructions, preferences, and context
- Custom slash commands in commands/ you built over time
- A settings.json tuned to your workflow
- Hooks, agents, or rules that shape how Claude behaves

All of that lives in ~/.claude and stays on one machine. Switch to your work laptop and you start from zero. Get a new computer and you lose everything.

This dotfiles repo fixes that: treat ~/.claude as a Git repository, push it to GitHub, and add a shell wrapper that pulls on open and pushes on close — automatically.

What Files Are Excluded From Sync

These files are machine-specific or sensitive and are excluded via .gitignore:

Prerequisites

- Claude Code installed: npm install -g @anthropic-ai/claude-code
- Git installed
- GitHub CLI (gh) — optional but recommended
- A GitHub account

How to Set Up Claude Code Dotfiles (First Machine)

Do this once, on your primary machine.

Step 1 — Create the GitHub repo
Public or private? Public repos let the community learn from your config. Private keeps it just for you. Either works — never put secrets in CLAUDE.md.

Step 2 — Initialize Git in…
Read the full README on GitHub

Details

Last updated
21 March 2026
Topics
anthropicclaude-codeconfigurationdotfilesgitshellsync

FAQ

What is claude-code-dotfiles?

Syncs your ~/.claude directory across machines with Git. It is a config for Claude Code, from elizabethfuentes12/claude-code-dotfiles on GitHub.

How do I install claude-code-dotfiles?

Clone elizabethfuentes12/claude-code-dotfiles from GitHub and follow the setup steps in its README.

Is claude-code-dotfiles popular?

elizabethfuentes12/claude-code-dotfiles has 19 GitHub stars and 4 forks. It was last updated on 21 March 2026.

More config & memory

Browse the most popular Claude Code mods, all config & memory, or the skills and MCP server directories.