Skip to main content

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 setup prompts for templates directory
  • dotconfig-hub init shows available environment sets with descriptions
  • dotconfig-hub sync asks 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

  1. Add configuration to ~/dotconfig-templates/config.yaml
  2. Create corresponding files in template directory
  3. Use dotconfig-hub init in 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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. 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

dotconfig_hub-0.1.0.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotconfig_hub-0.1.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file dotconfig_hub-0.1.0.tar.gz.

File metadata

  • Download URL: dotconfig_hub-0.1.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for dotconfig_hub-0.1.0.tar.gz
Algorithm Hash digest
SHA256 28ecd1ddaa7ea3b5b17fb473a8a80275b78bab3ae9fd84deecd2d4179447e0c0
MD5 a0d1ce170c449dd869a114687bf4f957
BLAKE2b-256 2f93ed1add9cbdfb63172dd392f31cc9619b4f07a5ecb58950332277312b539d

See more details on using hashes here.

File details

Details for the file dotconfig_hub-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dotconfig_hub-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for dotconfig_hub-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb80ec9bbedfb4e636cf8573d15634bb96f4c5250603aa3b6528e1b443d11671
MD5 9298c27a52ecb6df0bef2784fac01f32
BLAKE2b-256 e835ab0e2609ce47f214f6031809f4fd1faf4f234ddb9bc095600d8e73d70d32

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page