Central management and distribution tool for favorite dotfiles and configuration templates
Project description
๐ ๏ธ dotconfig-hub
Your favorite dotfiles and configuration templates, centrally managed and easily distributed across projects.
๐ค What is dotconfig-hub?
dotconfig-hub is a tool that helps you manage and sync your favorite development configurations across multiple projects. Whether it's VS Code settings, GitHub workflows, linting configs, or AI assistant instructions (Claude, Copilot, Cursor), keep them all in one place and distribute them effortlessly.
โจ Key Features
- ๐ Central Hub: One repository for all your configuration templates
- ๐ฆ Separated Architecture: Templates live outside site-packages
- ๐ฏ Environment Sets: Group related configs (Python env, TypeScript env, AI assistants)
- ๐ Two-way Sync: Update templates from projects or projects from templates
- ๐ฌ Interactive Mode: Friendly prompts when arguments are omitted
- ๐ Smart Diff Display: Content-based change detection with multiple viewing options (full, unified, context-only)
- ๐ Safe Operations: Automatic backups and dry-run mode
๐ Quick Start
Set up templates repository (once per machine)
# Clone templates to a shared location
git clone https://github.com/hasegama/dotconfig-hub.git ~/dotconfig-templates
Use in any project
# Install dotconfig-hub
cd /path/to/your-project
uv add dotconfig-hub
# Configure (interactive prompts)
dotconfig-hub setup
dotconfig-hub init
# Sync your configurations
dotconfig-hub sync
That's it! Your project now has your favorite configurations.
๐ฆ Installation
From PyPI (recommended)
pip install dotconfig-hub
# or
uv add dotconfig-hub
From source
git clone https://github.com/hasegama/dotconfig-hub.git
cd dotconfig-hub
pip install -e .
# or
uv add -e .
๐๏ธ How It Works
Architecture
~/dotconfig-templates/ # Your central configuration hub
โโโ config.yaml # Defines environment sets and tools
โโโ my_project_init_template/ # Example environment set
โ โโโ .claude/ # Claude configurations
โ โโโ .github/ # GitHub workflows and templates
โ โโโ .vscode/ # VS Code settings
โโโ ...
your-project/ # Any project directory
โโโ dotconfig-hub.yaml # Project-specific settings
โโโ .claude/ # โ Synced from templates
โโโ .github/ # โ Synced from templates
โโโ .vscode/ # โ Synced from templates
โโโ ...
Configuration Files
Templates Repository (~/dotconfig-templates/config.yaml):
environment_sets:
my_project_init_template:
description: "Complete project initialization template"
tools:
claude_config:
project_dir: my_project_init_template
files:
- .claude/CLAUDE.md
- .claude/commands/*.md
vscode:
project_dir: my_project_init_template
files:
- .vscode/settings.json
- .vscode/extensions.json
github:
project_dir: my_project_init_template
files:
- .github/workflows/*.yml
- .github/ISSUE_TEMPLATE/*.md
- .github/dependabot.yml
Project Configuration (./dotconfig-hub.yaml):
templates_source: ~/dotconfig-templates
active_environment_sets:
- my_project_init_template
sync_preferences:
auto_sync: false
create_backups: true
dry_run_default: false
๐ป Commands
Setup Commands
# Configure templates source (interactive)
dotconfig-hub setup
# Configure with specific directory
dotconfig-hub setup --templates-dir ~/dotconfig-templates
# Initialize project (interactive)
dotconfig-hub init
# Initialize with specific environment set
dotconfig-hub init --env-set my_project_init_template --force
Sync Commands
# Sync all active environment sets
dotconfig-hub sync
# Preview changes without applying
dotconfig-hub sync --dry-run
# Sync specific tool only
dotconfig-hub sync --tool claude_config
# Auto-sync from templates to project
dotconfig-hub sync --auto-sync local
# Auto-sync from project to templates
dotconfig-hub sync --auto-sync remote
Information Commands
# Show configuration status
dotconfig-hub list
๐ฌ Interactive Mode
All commands support interactive mode when arguments are omitted:
dotconfig-hub setupprompts for templates directorydotconfig-hub initshows available environment sets with descriptionsdotconfig-hub syncasks for sync direction on each changed file
Example sync interaction:
Choose action:
Update [P]roject (Hub โ Project)
Update [H]ub (Project โ Hub)
[S]kip this file
[D]isplay full diff
[C]hanges only (context diff)
Select [p/h/s/d/c] (s):
๐ง Common Workflows
Daily Development
cd your-project
dotconfig-hub sync --dry-run # Check what would change
dotconfig-hub sync # Apply changes
Setting Up New Project
cd new-project
uv add dotconfig-hub
dotconfig-hub setup # Point to your templates
dotconfig-hub init # Choose environment set
dotconfig-hub sync # Get all configurations
Updating Templates
cd project-with-improved-configs
dotconfig-hub sync --auto-sync remote # Push improvements to templates
Creating New Environment Set
- Add configuration to
~/dotconfig-templates/config.yaml - Create corresponding files in template directory
- Use
dotconfig-hub initin projects to activate
๐ฏ Use Cases
Perfect for managing:
- ๐ค AI Assistant Instructions: Claude, GitHub Copilot, Cursor configurations
- โ๏ธ IDE Settings: VS Code settings, extensions, tasks, launch configs
- ๐ CI/CD Workflows: GitHub Actions, pre-commit hooks, dependabot
- ๐ Code Quality: ESLint, Prettier, flake8, Black configurations
- ๐ Project Templates: Issue templates, PR templates, contributing guides
๐ Examples
Python Development Environment
environment_sets:
python_dev:
description: "Python development with linting and testing"
tools:
vscode:
project_dir: python_dev
files:
- .vscode/settings.json # Python-specific settings
- .vscode/extensions.json # Recommended extensions
linting:
project_dir: python_dev
files:
- .flake8
- pyproject.toml # Black, isort config
- .pre-commit-config.yaml
github:
project_dir: python_dev
files:
- .github/workflows/test.yml
- .github/dependabot.yml
AI Assistant Configurations
environment_sets:
ai_assistants:
description: "AI coding assistant instructions"
tools:
claude:
project_dir: ai_assistants
files:
- .claude/CLAUDE.md
- .claude/commands/*.md
cursor:
project_dir: ai_assistants
files:
- .cursorrules
๐ฉโ๐ป Development
This project was developed using Claude Code, Anthropic's official CLI for Claude.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Requirements
- Python 3.8+
- Dependencies: click, pyyaml, rich, gitpython
๐ License
MIT License - see LICENSE file for details
Happy configuring! ๐ Keep your development environment consistent across all your projects.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dotconfig_hub-0.1.2.tar.gz.
File metadata
- Download URL: dotconfig_hub-0.1.2.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a07d5560791f4b00dfd7fa5b7b0a9d73de0b1d9c984453324c6a74e07aed1ded
|
|
| MD5 |
b481dc26f330b0632cde625c5c22303e
|
|
| BLAKE2b-256 |
7e671f9efcc7f5e8001fc6624efaa1300e12f0aa33360254dc1703fba5ed7e43
|
File details
Details for the file dotconfig_hub-0.1.2-py3-none-any.whl.
File metadata
- Download URL: dotconfig_hub-0.1.2-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a74b3143f9dac65bc0414bf8befdbbdbc889efc10f9e16aafee091453a2f557c
|
|
| MD5 |
1fad786be4b4a823634c0a5ed734a045
|
|
| BLAKE2b-256 |
d61eea8d8c47b80da3abeab399371e2df284f2cfbf60f3311aaab875a7bf6673
|