dotconfig-hub 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dotconfig_hub-0.1.0/LICENSE +21 -0
- dotconfig_hub-0.1.0/PKG-INFO +331 -0
- dotconfig_hub-0.1.0/README.md +301 -0
- dotconfig_hub-0.1.0/pyproject.toml +44 -0
- dotconfig_hub-0.1.0/setup.cfg +4 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub/__init__.py +3 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub/cli.py +391 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub/config.py +217 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub/diff.py +254 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub/project_config.py +193 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub/sync.py +337 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub.egg-info/PKG-INFO +331 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub.egg-info/SOURCES.txt +16 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub.egg-info/dependency_links.txt +1 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub.egg-info/entry_points.txt +2 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub.egg-info/requires.txt +4 -0
- dotconfig_hub-0.1.0/src/dotconfig_hub.egg-info/top_level.txt +1 -0
- dotconfig_hub-0.1.0/tests/test_cli_setup.py +302 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 hasegama
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dotconfig-hub
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Central management and distribution tool for favorite dotfiles and configuration templates
|
|
5
|
+
Author-email: hasegama <40445443+hasegama@users.noreply.github.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/hasegama/dotconfig-hub
|
|
8
|
+
Keywords: dotfiles,configuration,sync,templates,development-tools
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Classifier: Topic :: System :: Installation/Setup
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: click>=8.0
|
|
26
|
+
Requires-Dist: pyyaml>=6.0
|
|
27
|
+
Requires-Dist: rich>=13.0
|
|
28
|
+
Requires-Dist: gitpython>=3.1
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# 🛠️ dotconfig-hub
|
|
32
|
+
|
|
33
|
+
Your favorite dotfiles and configuration templates, centrally managed and easily distributed across projects.
|
|
34
|
+
|
|
35
|
+
## 🤔 What is dotconfig-hub?
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
## ✨ Key Features
|
|
40
|
+
|
|
41
|
+
- **🏠 Central Hub**: One repository for all your configuration templates
|
|
42
|
+
- **📦 Separated Architecture**: Templates live outside site-packages
|
|
43
|
+
- **🎯 Environment Sets**: Group related configs (Python env, TypeScript env, AI assistants)
|
|
44
|
+
- **🔄 Two-way Sync**: Update templates from projects or projects from templates
|
|
45
|
+
- **💬 Interactive Mode**: Friendly prompts when arguments are omitted
|
|
46
|
+
- **📋 Smart Diff Display**: Content-based change detection with multiple viewing options (full, unified, context-only)
|
|
47
|
+
- **🔒 Safe Operations**: Automatic backups and dry-run mode
|
|
48
|
+
|
|
49
|
+
## 🚀 Quick Start
|
|
50
|
+
|
|
51
|
+
### Set up templates repository (once per machine)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Clone templates to a shared location
|
|
55
|
+
git clone https://github.com/hasegama/dotconfig-hub.git ~/dotconfig-templates
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Use in any project
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Install dotconfig-hub
|
|
62
|
+
cd /path/to/your-project
|
|
63
|
+
uv add dotconfig-hub
|
|
64
|
+
|
|
65
|
+
# Configure (interactive prompts)
|
|
66
|
+
dotconfig-hub setup
|
|
67
|
+
dotconfig-hub init
|
|
68
|
+
|
|
69
|
+
# Sync your configurations
|
|
70
|
+
dotconfig-hub sync
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
That's it! Your project now has your favorite configurations.
|
|
74
|
+
|
|
75
|
+
## 📦 Installation
|
|
76
|
+
|
|
77
|
+
### From PyPI (recommended)
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install dotconfig-hub
|
|
81
|
+
# or
|
|
82
|
+
uv add dotconfig-hub
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### From source
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
git clone https://github.com/hasegama/dotconfig-hub.git
|
|
89
|
+
cd dotconfig-hub
|
|
90
|
+
pip install -e .
|
|
91
|
+
# or
|
|
92
|
+
uv add -e .
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 🏗️ How It Works
|
|
96
|
+
|
|
97
|
+
### Architecture
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
~/dotconfig-templates/ # Your central configuration hub
|
|
101
|
+
├── config.yaml # Defines environment sets and tools
|
|
102
|
+
├── my_project_init_template/ # Example environment set
|
|
103
|
+
│ ├── .claude/ # Claude configurations
|
|
104
|
+
│ ├── .github/ # GitHub workflows and templates
|
|
105
|
+
│ └── .vscode/ # VS Code settings
|
|
106
|
+
└── ...
|
|
107
|
+
|
|
108
|
+
your-project/ # Any project directory
|
|
109
|
+
├── dotconfig-hub.yaml # Project-specific settings
|
|
110
|
+
├── .claude/ # ← Synced from templates
|
|
111
|
+
├── .github/ # ← Synced from templates
|
|
112
|
+
├── .vscode/ # ← Synced from templates
|
|
113
|
+
└── ...
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Configuration Files
|
|
117
|
+
|
|
118
|
+
**Templates Repository** (`~/dotconfig-templates/config.yaml`):
|
|
119
|
+
```yaml
|
|
120
|
+
environment_sets:
|
|
121
|
+
my_project_init_template:
|
|
122
|
+
description: "Complete project initialization template"
|
|
123
|
+
tools:
|
|
124
|
+
claude_config:
|
|
125
|
+
project_dir: my_project_init_template
|
|
126
|
+
files:
|
|
127
|
+
- .claude/CLAUDE.md
|
|
128
|
+
- .claude/commands/*.md
|
|
129
|
+
|
|
130
|
+
vscode:
|
|
131
|
+
project_dir: my_project_init_template
|
|
132
|
+
files:
|
|
133
|
+
- .vscode/settings.json
|
|
134
|
+
- .vscode/extensions.json
|
|
135
|
+
|
|
136
|
+
github:
|
|
137
|
+
project_dir: my_project_init_template
|
|
138
|
+
files:
|
|
139
|
+
- .github/workflows/*.yml
|
|
140
|
+
- .github/ISSUE_TEMPLATE/*.md
|
|
141
|
+
- .github/dependabot.yml
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Project Configuration** (`./dotconfig-hub.yaml`):
|
|
145
|
+
```yaml
|
|
146
|
+
templates_source: ~/dotconfig-templates
|
|
147
|
+
active_environment_sets:
|
|
148
|
+
- my_project_init_template
|
|
149
|
+
sync_preferences:
|
|
150
|
+
auto_sync: false
|
|
151
|
+
create_backups: true
|
|
152
|
+
dry_run_default: false
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## 💻 Commands
|
|
156
|
+
|
|
157
|
+
### Setup Commands
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Configure templates source (interactive)
|
|
161
|
+
dotconfig-hub setup
|
|
162
|
+
|
|
163
|
+
# Configure with specific directory
|
|
164
|
+
dotconfig-hub setup --templates-dir ~/dotconfig-templates
|
|
165
|
+
|
|
166
|
+
# Initialize project (interactive)
|
|
167
|
+
dotconfig-hub init
|
|
168
|
+
|
|
169
|
+
# Initialize with specific environment set
|
|
170
|
+
dotconfig-hub init --env-set my_project_init_template --force
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Sync Commands
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Sync all active environment sets
|
|
177
|
+
dotconfig-hub sync
|
|
178
|
+
|
|
179
|
+
# Preview changes without applying
|
|
180
|
+
dotconfig-hub sync --dry-run
|
|
181
|
+
|
|
182
|
+
# Sync specific tool only
|
|
183
|
+
dotconfig-hub sync --tool claude_config
|
|
184
|
+
|
|
185
|
+
# Auto-sync from templates to project
|
|
186
|
+
dotconfig-hub sync --auto-sync local
|
|
187
|
+
|
|
188
|
+
# Auto-sync from project to templates
|
|
189
|
+
dotconfig-hub sync --auto-sync remote
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Information Commands
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# Show configuration status
|
|
196
|
+
dotconfig-hub list
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## 💬 Interactive Mode
|
|
200
|
+
|
|
201
|
+
All commands support interactive mode when arguments are omitted:
|
|
202
|
+
|
|
203
|
+
- **`dotconfig-hub setup`** prompts for templates directory
|
|
204
|
+
- **`dotconfig-hub init`** shows available environment sets with descriptions
|
|
205
|
+
- **`dotconfig-hub sync`** asks for sync direction on each changed file
|
|
206
|
+
|
|
207
|
+
Example sync interaction:
|
|
208
|
+
```
|
|
209
|
+
Choose action:
|
|
210
|
+
Update [P]roject (Hub → Project)
|
|
211
|
+
Update [H]ub (Project → Hub)
|
|
212
|
+
[S]kip this file
|
|
213
|
+
[D]isplay full diff
|
|
214
|
+
[C]hanges only (context diff)
|
|
215
|
+
Select [p/h/s/d/c] (s):
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## 🔧 Common Workflows
|
|
219
|
+
|
|
220
|
+
### Daily Development
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
cd your-project
|
|
224
|
+
dotconfig-hub sync --dry-run # Check what would change
|
|
225
|
+
dotconfig-hub sync # Apply changes
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Setting Up New Project
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
cd new-project
|
|
232
|
+
uv add dotconfig-hub
|
|
233
|
+
dotconfig-hub setup # Point to your templates
|
|
234
|
+
dotconfig-hub init # Choose environment set
|
|
235
|
+
dotconfig-hub sync # Get all configurations
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Updating Templates
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
cd project-with-improved-configs
|
|
242
|
+
dotconfig-hub sync --auto-sync remote # Push improvements to templates
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Creating New Environment Set
|
|
246
|
+
|
|
247
|
+
1. Add configuration to `~/dotconfig-templates/config.yaml`
|
|
248
|
+
2. Create corresponding files in template directory
|
|
249
|
+
3. Use `dotconfig-hub init` in projects to activate
|
|
250
|
+
|
|
251
|
+
## 🎯 Use Cases
|
|
252
|
+
|
|
253
|
+
Perfect for managing:
|
|
254
|
+
|
|
255
|
+
- **🤖 AI Assistant Instructions**: Claude, GitHub Copilot, Cursor configurations
|
|
256
|
+
- **⚙️ IDE Settings**: VS Code settings, extensions, tasks, launch configs
|
|
257
|
+
- **🔄 CI/CD Workflows**: GitHub Actions, pre-commit hooks, dependabot
|
|
258
|
+
- **📏 Code Quality**: ESLint, Prettier, flake8, Black configurations
|
|
259
|
+
- **📝 Project Templates**: Issue templates, PR templates, contributing guides
|
|
260
|
+
|
|
261
|
+
## 📝 Examples
|
|
262
|
+
|
|
263
|
+
### Python Development Environment
|
|
264
|
+
|
|
265
|
+
```yaml
|
|
266
|
+
environment_sets:
|
|
267
|
+
python_dev:
|
|
268
|
+
description: "Python development with linting and testing"
|
|
269
|
+
tools:
|
|
270
|
+
vscode:
|
|
271
|
+
project_dir: python_dev
|
|
272
|
+
files:
|
|
273
|
+
- .vscode/settings.json # Python-specific settings
|
|
274
|
+
- .vscode/extensions.json # Recommended extensions
|
|
275
|
+
|
|
276
|
+
linting:
|
|
277
|
+
project_dir: python_dev
|
|
278
|
+
files:
|
|
279
|
+
- .flake8
|
|
280
|
+
- pyproject.toml # Black, isort config
|
|
281
|
+
- .pre-commit-config.yaml
|
|
282
|
+
|
|
283
|
+
github:
|
|
284
|
+
project_dir: python_dev
|
|
285
|
+
files:
|
|
286
|
+
- .github/workflows/test.yml
|
|
287
|
+
- .github/dependabot.yml
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### AI Assistant Configurations
|
|
291
|
+
|
|
292
|
+
```yaml
|
|
293
|
+
environment_sets:
|
|
294
|
+
ai_assistants:
|
|
295
|
+
description: "AI coding assistant instructions"
|
|
296
|
+
tools:
|
|
297
|
+
claude:
|
|
298
|
+
project_dir: ai_assistants
|
|
299
|
+
files:
|
|
300
|
+
- .claude/CLAUDE.md
|
|
301
|
+
- .claude/commands/*.md
|
|
302
|
+
|
|
303
|
+
cursor:
|
|
304
|
+
project_dir: ai_assistants
|
|
305
|
+
files:
|
|
306
|
+
- .cursorrules
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
## 👩💻 Development
|
|
310
|
+
|
|
311
|
+
This project was developed using [Claude Code](https://claude.ai/code), Anthropic's official CLI for Claude.
|
|
312
|
+
|
|
313
|
+
### Contributing
|
|
314
|
+
|
|
315
|
+
1. Fork the repository
|
|
316
|
+
2. Create a feature branch
|
|
317
|
+
3. Make your changes
|
|
318
|
+
4. Submit a pull request
|
|
319
|
+
|
|
320
|
+
### Requirements
|
|
321
|
+
|
|
322
|
+
- Python 3.8+
|
|
323
|
+
- Dependencies: click, pyyaml, rich, gitpython
|
|
324
|
+
|
|
325
|
+
## 📄 License
|
|
326
|
+
|
|
327
|
+
MIT License - see LICENSE file for details
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
**Happy configuring!** 🚀 Keep your development environment consistent across all your projects.
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# 🛠️ dotconfig-hub
|
|
2
|
+
|
|
3
|
+
Your favorite dotfiles and configuration templates, centrally managed and easily distributed across projects.
|
|
4
|
+
|
|
5
|
+
## 🤔 What is dotconfig-hub?
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
## ✨ Key Features
|
|
10
|
+
|
|
11
|
+
- **🏠 Central Hub**: One repository for all your configuration templates
|
|
12
|
+
- **📦 Separated Architecture**: Templates live outside site-packages
|
|
13
|
+
- **🎯 Environment Sets**: Group related configs (Python env, TypeScript env, AI assistants)
|
|
14
|
+
- **🔄 Two-way Sync**: Update templates from projects or projects from templates
|
|
15
|
+
- **💬 Interactive Mode**: Friendly prompts when arguments are omitted
|
|
16
|
+
- **📋 Smart Diff Display**: Content-based change detection with multiple viewing options (full, unified, context-only)
|
|
17
|
+
- **🔒 Safe Operations**: Automatic backups and dry-run mode
|
|
18
|
+
|
|
19
|
+
## 🚀 Quick Start
|
|
20
|
+
|
|
21
|
+
### Set up templates repository (once per machine)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Clone templates to a shared location
|
|
25
|
+
git clone https://github.com/hasegama/dotconfig-hub.git ~/dotconfig-templates
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Use in any project
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Install dotconfig-hub
|
|
32
|
+
cd /path/to/your-project
|
|
33
|
+
uv add dotconfig-hub
|
|
34
|
+
|
|
35
|
+
# Configure (interactive prompts)
|
|
36
|
+
dotconfig-hub setup
|
|
37
|
+
dotconfig-hub init
|
|
38
|
+
|
|
39
|
+
# Sync your configurations
|
|
40
|
+
dotconfig-hub sync
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
That's it! Your project now has your favorite configurations.
|
|
44
|
+
|
|
45
|
+
## 📦 Installation
|
|
46
|
+
|
|
47
|
+
### From PyPI (recommended)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install dotconfig-hub
|
|
51
|
+
# or
|
|
52
|
+
uv add dotconfig-hub
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### From source
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git clone https://github.com/hasegama/dotconfig-hub.git
|
|
59
|
+
cd dotconfig-hub
|
|
60
|
+
pip install -e .
|
|
61
|
+
# or
|
|
62
|
+
uv add -e .
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 🏗️ How It Works
|
|
66
|
+
|
|
67
|
+
### Architecture
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
~/dotconfig-templates/ # Your central configuration hub
|
|
71
|
+
├── config.yaml # Defines environment sets and tools
|
|
72
|
+
├── my_project_init_template/ # Example environment set
|
|
73
|
+
│ ├── .claude/ # Claude configurations
|
|
74
|
+
│ ├── .github/ # GitHub workflows and templates
|
|
75
|
+
│ └── .vscode/ # VS Code settings
|
|
76
|
+
└── ...
|
|
77
|
+
|
|
78
|
+
your-project/ # Any project directory
|
|
79
|
+
├── dotconfig-hub.yaml # Project-specific settings
|
|
80
|
+
├── .claude/ # ← Synced from templates
|
|
81
|
+
├── .github/ # ← Synced from templates
|
|
82
|
+
├── .vscode/ # ← Synced from templates
|
|
83
|
+
└── ...
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Configuration Files
|
|
87
|
+
|
|
88
|
+
**Templates Repository** (`~/dotconfig-templates/config.yaml`):
|
|
89
|
+
```yaml
|
|
90
|
+
environment_sets:
|
|
91
|
+
my_project_init_template:
|
|
92
|
+
description: "Complete project initialization template"
|
|
93
|
+
tools:
|
|
94
|
+
claude_config:
|
|
95
|
+
project_dir: my_project_init_template
|
|
96
|
+
files:
|
|
97
|
+
- .claude/CLAUDE.md
|
|
98
|
+
- .claude/commands/*.md
|
|
99
|
+
|
|
100
|
+
vscode:
|
|
101
|
+
project_dir: my_project_init_template
|
|
102
|
+
files:
|
|
103
|
+
- .vscode/settings.json
|
|
104
|
+
- .vscode/extensions.json
|
|
105
|
+
|
|
106
|
+
github:
|
|
107
|
+
project_dir: my_project_init_template
|
|
108
|
+
files:
|
|
109
|
+
- .github/workflows/*.yml
|
|
110
|
+
- .github/ISSUE_TEMPLATE/*.md
|
|
111
|
+
- .github/dependabot.yml
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Project Configuration** (`./dotconfig-hub.yaml`):
|
|
115
|
+
```yaml
|
|
116
|
+
templates_source: ~/dotconfig-templates
|
|
117
|
+
active_environment_sets:
|
|
118
|
+
- my_project_init_template
|
|
119
|
+
sync_preferences:
|
|
120
|
+
auto_sync: false
|
|
121
|
+
create_backups: true
|
|
122
|
+
dry_run_default: false
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 💻 Commands
|
|
126
|
+
|
|
127
|
+
### Setup Commands
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Configure templates source (interactive)
|
|
131
|
+
dotconfig-hub setup
|
|
132
|
+
|
|
133
|
+
# Configure with specific directory
|
|
134
|
+
dotconfig-hub setup --templates-dir ~/dotconfig-templates
|
|
135
|
+
|
|
136
|
+
# Initialize project (interactive)
|
|
137
|
+
dotconfig-hub init
|
|
138
|
+
|
|
139
|
+
# Initialize with specific environment set
|
|
140
|
+
dotconfig-hub init --env-set my_project_init_template --force
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Sync Commands
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Sync all active environment sets
|
|
147
|
+
dotconfig-hub sync
|
|
148
|
+
|
|
149
|
+
# Preview changes without applying
|
|
150
|
+
dotconfig-hub sync --dry-run
|
|
151
|
+
|
|
152
|
+
# Sync specific tool only
|
|
153
|
+
dotconfig-hub sync --tool claude_config
|
|
154
|
+
|
|
155
|
+
# Auto-sync from templates to project
|
|
156
|
+
dotconfig-hub sync --auto-sync local
|
|
157
|
+
|
|
158
|
+
# Auto-sync from project to templates
|
|
159
|
+
dotconfig-hub sync --auto-sync remote
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Information Commands
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Show configuration status
|
|
166
|
+
dotconfig-hub list
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## 💬 Interactive Mode
|
|
170
|
+
|
|
171
|
+
All commands support interactive mode when arguments are omitted:
|
|
172
|
+
|
|
173
|
+
- **`dotconfig-hub setup`** prompts for templates directory
|
|
174
|
+
- **`dotconfig-hub init`** shows available environment sets with descriptions
|
|
175
|
+
- **`dotconfig-hub sync`** asks for sync direction on each changed file
|
|
176
|
+
|
|
177
|
+
Example sync interaction:
|
|
178
|
+
```
|
|
179
|
+
Choose action:
|
|
180
|
+
Update [P]roject (Hub → Project)
|
|
181
|
+
Update [H]ub (Project → Hub)
|
|
182
|
+
[S]kip this file
|
|
183
|
+
[D]isplay full diff
|
|
184
|
+
[C]hanges only (context diff)
|
|
185
|
+
Select [p/h/s/d/c] (s):
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## 🔧 Common Workflows
|
|
189
|
+
|
|
190
|
+
### Daily Development
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
cd your-project
|
|
194
|
+
dotconfig-hub sync --dry-run # Check what would change
|
|
195
|
+
dotconfig-hub sync # Apply changes
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Setting Up New Project
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
cd new-project
|
|
202
|
+
uv add dotconfig-hub
|
|
203
|
+
dotconfig-hub setup # Point to your templates
|
|
204
|
+
dotconfig-hub init # Choose environment set
|
|
205
|
+
dotconfig-hub sync # Get all configurations
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Updating Templates
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
cd project-with-improved-configs
|
|
212
|
+
dotconfig-hub sync --auto-sync remote # Push improvements to templates
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Creating New Environment Set
|
|
216
|
+
|
|
217
|
+
1. Add configuration to `~/dotconfig-templates/config.yaml`
|
|
218
|
+
2. Create corresponding files in template directory
|
|
219
|
+
3. Use `dotconfig-hub init` in projects to activate
|
|
220
|
+
|
|
221
|
+
## 🎯 Use Cases
|
|
222
|
+
|
|
223
|
+
Perfect for managing:
|
|
224
|
+
|
|
225
|
+
- **🤖 AI Assistant Instructions**: Claude, GitHub Copilot, Cursor configurations
|
|
226
|
+
- **⚙️ IDE Settings**: VS Code settings, extensions, tasks, launch configs
|
|
227
|
+
- **🔄 CI/CD Workflows**: GitHub Actions, pre-commit hooks, dependabot
|
|
228
|
+
- **📏 Code Quality**: ESLint, Prettier, flake8, Black configurations
|
|
229
|
+
- **📝 Project Templates**: Issue templates, PR templates, contributing guides
|
|
230
|
+
|
|
231
|
+
## 📝 Examples
|
|
232
|
+
|
|
233
|
+
### Python Development Environment
|
|
234
|
+
|
|
235
|
+
```yaml
|
|
236
|
+
environment_sets:
|
|
237
|
+
python_dev:
|
|
238
|
+
description: "Python development with linting and testing"
|
|
239
|
+
tools:
|
|
240
|
+
vscode:
|
|
241
|
+
project_dir: python_dev
|
|
242
|
+
files:
|
|
243
|
+
- .vscode/settings.json # Python-specific settings
|
|
244
|
+
- .vscode/extensions.json # Recommended extensions
|
|
245
|
+
|
|
246
|
+
linting:
|
|
247
|
+
project_dir: python_dev
|
|
248
|
+
files:
|
|
249
|
+
- .flake8
|
|
250
|
+
- pyproject.toml # Black, isort config
|
|
251
|
+
- .pre-commit-config.yaml
|
|
252
|
+
|
|
253
|
+
github:
|
|
254
|
+
project_dir: python_dev
|
|
255
|
+
files:
|
|
256
|
+
- .github/workflows/test.yml
|
|
257
|
+
- .github/dependabot.yml
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### AI Assistant Configurations
|
|
261
|
+
|
|
262
|
+
```yaml
|
|
263
|
+
environment_sets:
|
|
264
|
+
ai_assistants:
|
|
265
|
+
description: "AI coding assistant instructions"
|
|
266
|
+
tools:
|
|
267
|
+
claude:
|
|
268
|
+
project_dir: ai_assistants
|
|
269
|
+
files:
|
|
270
|
+
- .claude/CLAUDE.md
|
|
271
|
+
- .claude/commands/*.md
|
|
272
|
+
|
|
273
|
+
cursor:
|
|
274
|
+
project_dir: ai_assistants
|
|
275
|
+
files:
|
|
276
|
+
- .cursorrules
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## 👩💻 Development
|
|
280
|
+
|
|
281
|
+
This project was developed using [Claude Code](https://claude.ai/code), Anthropic's official CLI for Claude.
|
|
282
|
+
|
|
283
|
+
### Contributing
|
|
284
|
+
|
|
285
|
+
1. Fork the repository
|
|
286
|
+
2. Create a feature branch
|
|
287
|
+
3. Make your changes
|
|
288
|
+
4. Submit a pull request
|
|
289
|
+
|
|
290
|
+
### Requirements
|
|
291
|
+
|
|
292
|
+
- Python 3.8+
|
|
293
|
+
- Dependencies: click, pyyaml, rich, gitpython
|
|
294
|
+
|
|
295
|
+
## 📄 License
|
|
296
|
+
|
|
297
|
+
MIT License - see LICENSE file for details
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
**Happy configuring!** 🚀 Keep your development environment consistent across all your projects.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dotconfig-hub"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Central management and distribution tool for favorite dotfiles and configuration templates"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
keywords = ["dotfiles", "configuration", "sync", "templates", "development-tools"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 3 - Alpha",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.8",
|
|
20
|
+
"Programming Language :: Python :: 3.9",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Topic :: Software Development :: Build Tools",
|
|
25
|
+
"Topic :: System :: Installation/Setup",
|
|
26
|
+
"Topic :: Utilities",
|
|
27
|
+
]
|
|
28
|
+
authors = [
|
|
29
|
+
{ name = "hasegama", email = "40445443+hasegama@users.noreply.github.com" }
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"click>=8.0",
|
|
33
|
+
"pyyaml>=6.0",
|
|
34
|
+
"rich>=13.0",
|
|
35
|
+
"gitpython>=3.1",
|
|
36
|
+
]
|
|
37
|
+
[project.urls]
|
|
38
|
+
Homepage = "https://github.com/hasegama/dotconfig-hub"
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
dotconfig-hub = "dotconfig_hub.cli:main"
|
|
42
|
+
|
|
43
|
+
[tool.setuptools.packages.find]
|
|
44
|
+
where = ["src"]
|