dotsync-cli 1.0.2__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.
- dotsync_cli-1.0.2/.gitignore +64 -0
- dotsync_cli-1.0.2/LICENSE +36 -0
- dotsync_cli-1.0.2/PKG-INFO +267 -0
- dotsync_cli-1.0.2/README.md +241 -0
- dotsync_cli-1.0.2/dotsync/__init__.py +0 -0
- dotsync_cli-1.0.2/dotsync/__main__.py +1080 -0
- dotsync_cli-1.0.2/dotsync/args.py +149 -0
- dotsync_cli-1.0.2/dotsync/calc_ops.py +298 -0
- dotsync_cli-1.0.2/dotsync/checks.py +41 -0
- dotsync_cli-1.0.2/dotsync/enums.py +16 -0
- dotsync_cli-1.0.2/dotsync/file_ops.py +122 -0
- dotsync_cli-1.0.2/dotsync/flists.py +90 -0
- dotsync_cli-1.0.2/dotsync/git.py +161 -0
- dotsync_cli-1.0.2/dotsync/info.py +11 -0
- dotsync_cli-1.0.2/dotsync/plugin.py +48 -0
- dotsync_cli-1.0.2/dotsync/plugins/__init__.py +0 -0
- dotsync_cli-1.0.2/dotsync/plugins/encrypt.py +230 -0
- dotsync_cli-1.0.2/dotsync/plugins/plain.py +48 -0
- dotsync_cli-1.0.2/pkg/completion/bash.sh +80 -0
- dotsync_cli-1.0.2/pkg/completion/fish.fish +19 -0
- dotsync_cli-1.0.2/pyproject.toml +78 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
MANIFEST
|
|
23
|
+
|
|
24
|
+
# Testing
|
|
25
|
+
.pytest_cache/
|
|
26
|
+
.coverage
|
|
27
|
+
htmlcov/
|
|
28
|
+
.tox/
|
|
29
|
+
.hypothesis/
|
|
30
|
+
|
|
31
|
+
# Virtual environments
|
|
32
|
+
venv/
|
|
33
|
+
ENV/
|
|
34
|
+
env/
|
|
35
|
+
.venv
|
|
36
|
+
|
|
37
|
+
# IDE
|
|
38
|
+
.vscode/
|
|
39
|
+
.idea/
|
|
40
|
+
*.swp
|
|
41
|
+
*.swo
|
|
42
|
+
*~
|
|
43
|
+
.DS_Store
|
|
44
|
+
|
|
45
|
+
# Documentation
|
|
46
|
+
docs/_build/
|
|
47
|
+
docs/_static/
|
|
48
|
+
|
|
49
|
+
# dotsync specific
|
|
50
|
+
*.pyc
|
|
51
|
+
*.pyo
|
|
52
|
+
|
|
53
|
+
# uv
|
|
54
|
+
.venv/
|
|
55
|
+
uv.lock
|
|
56
|
+
|
|
57
|
+
# Coverage
|
|
58
|
+
htmlcov/
|
|
59
|
+
.coverage
|
|
60
|
+
|
|
61
|
+
# Internal documentation (not for distribution)
|
|
62
|
+
GITHUB_ACTIONS_SETUP.md
|
|
63
|
+
HOMEBREW_TAP.md
|
|
64
|
+
RELEASE_CHECKLIST.md
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
MIT License (Non-Commercial Use Only)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Harvey
|
|
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 for **non-commercial purposes only**, including without
|
|
8
|
+
limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
9
|
+
sublicense, and/or sell copies of the Software for personal, educational, or
|
|
10
|
+
non-profit use, and to permit persons to whom the Software is furnished to do so,
|
|
11
|
+
subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
**Commercial Use Restriction**:
|
|
14
|
+
|
|
15
|
+
This license does NOT grant the right to use this software for commercial
|
|
16
|
+
purposes. Commercial use includes, but is not limited to:
|
|
17
|
+
- Incorporating the Software into any commercial product or service
|
|
18
|
+
- Using the Software to generate revenue or commercial advantage
|
|
19
|
+
- Distributing the Software as part of a paid service or product
|
|
20
|
+
- Using the Software in a commercial development environment for commercial purposes
|
|
21
|
+
|
|
22
|
+
For commercial licensing inquiries, please contact:
|
|
23
|
+
Harvey <harvey.wanghy@gmail.com>
|
|
24
|
+
|
|
25
|
+
**Attribution Requirement**:
|
|
26
|
+
|
|
27
|
+
The above copyright notice, this permission notice, and the commercial use
|
|
28
|
+
restriction shall be included in all copies or substantial portions of the Software.
|
|
29
|
+
|
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
36
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dotsync-cli
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: A comprehensive solution to managing your dotfiles
|
|
5
|
+
Project-URL: Homepage, https://github.com/HarveyGG/dotsync
|
|
6
|
+
Project-URL: Documentation, https://dotsync.readthedocs.io
|
|
7
|
+
Project-URL: Repository, https://github.com/HarveyGG/dotsync
|
|
8
|
+
Project-URL: Issues, https://github.com/HarveyGG/dotsync/issues
|
|
9
|
+
Author-email: Harvey <harvey.wanghy@gmail.com>
|
|
10
|
+
License: MIT License (Non-Commercial Use Only)
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: License :: Other/Proprietary License
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: POSIX
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Utilities
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# dotsync
|
|
28
|
+
|
|
29
|
+
<div align="center">
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+

|
|
33
|
+

|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
**A powerful and versatile dotfiles manager that makes managing your configuration files across multiple machines effortless.**
|
|
37
|
+
|
|
38
|
+
[Features](#-features) • [Installation](#-installation) • [Quick Start](#-quick-start) • [Documentation](#-documentation) • [Contributing](#-contributing)
|
|
39
|
+
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## ✨ Features
|
|
45
|
+
|
|
46
|
+
- **🎯 Easy Organization** - Categorize and organize your dotfiles with an intuitive filelist system
|
|
47
|
+
- **🔄 Multi-Machine Support** - Share files between machines or keep separate versions in the same repo
|
|
48
|
+
- **🔒 Encryption Support** - Encrypt sensitive dotfiles using GnuPG
|
|
49
|
+
- **🔗 Flexible Linking** - Use symlinks or copy files (hard mode) based on your needs
|
|
50
|
+
- **📦 Zero Dependencies**
|
|
51
|
+
- **🚀 Simple Commands** - Intuitive CLI with commands like `add`, `update`, `restore`, `encrypt`
|
|
52
|
+
- **🧪 Well Tested** - Comprehensive test suite ensuring reliability
|
|
53
|
+
- **📚 Great Documentation** - Full documentation available at [ReadTheDocs](https://dotsync.readthedocs.io)
|
|
54
|
+
|
|
55
|
+
## 🚀 Installation
|
|
56
|
+
|
|
57
|
+
### Quick Install (Recommended)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
curl -fsSL https://raw.githubusercontent.com/HarveyGG/dotsync/main/install.sh | bash
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Features:**
|
|
64
|
+
- ✅ No Python installation required
|
|
65
|
+
- ✅ Zero dependencies
|
|
66
|
+
- ✅ Cross-platform (macOS, Linux)
|
|
67
|
+
- ⚡ First run ~30s, then instant
|
|
68
|
+
|
|
69
|
+
### Homebrew (macOS/Linux)
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
brew tap HarveyGG/tap
|
|
73
|
+
brew install dotsync
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### pip (Alternative)
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pip install dotsync-cli
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## 📖 Quick Start
|
|
84
|
+
|
|
85
|
+
### 1. Initialize a dotfiles repository
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Automatically creates ~/.dotfiles if it doesn't exist
|
|
89
|
+
dotsync init
|
|
90
|
+
|
|
91
|
+
# Or specify a custom directory
|
|
92
|
+
dotsync init ~/my-dotfiles
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 2. Add a configuration file
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Add a file (automatically infers category from path)
|
|
99
|
+
dotsync add ~/.zshrc
|
|
100
|
+
|
|
101
|
+
# Add with specific category
|
|
102
|
+
dotsync add ~/.vimrc vim
|
|
103
|
+
|
|
104
|
+
# Add with encryption
|
|
105
|
+
dotsync add --encrypt ~/.ssh/id_rsa ssh
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 3. Sync files to repository
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
dotsync update
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This will:
|
|
115
|
+
- Copy your files to the repository
|
|
116
|
+
- Create symlinks in your home directory pointing to the repository
|
|
117
|
+
|
|
118
|
+
### 4. Restore on a new machine
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles
|
|
122
|
+
cd ~/.dotfiles
|
|
123
|
+
dotsync restore
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## 📋 Common Commands
|
|
127
|
+
|
|
128
|
+
| Command | Description |
|
|
129
|
+
|---------|-------------|
|
|
130
|
+
| `dotsync init [directory]` | Initialize a new dotfiles repository (default: ~/.dotfiles) |
|
|
131
|
+
| `dotsync add <file> [category]` | Add a new file to management |
|
|
132
|
+
| `dotsync add --encrypt <file> [category]` | Add a file with encryption |
|
|
133
|
+
| `dotsync update` | Sync files from home to repository |
|
|
134
|
+
| `dotsync restore` | Restore files from repository to home |
|
|
135
|
+
| `dotsync encrypt <file>` | Convert existing file to encrypted |
|
|
136
|
+
| `dotsync unmanage <file>` | Stop managing a file |
|
|
137
|
+
| `dotsync list` | List all managed files |
|
|
138
|
+
| `dotsync diff` | Show differences between home and repo |
|
|
139
|
+
| `dotsync commit` | Commit changes to git |
|
|
140
|
+
| `dotsync clean` | Remove files from home that are in repo |
|
|
141
|
+
| `dotsync passwd` | Change encryption password |
|
|
142
|
+
|
|
143
|
+
For detailed usage, see the [documentation](https://dotsync.readthedocs.io).
|
|
144
|
+
|
|
145
|
+
## 📁 Repository Structure
|
|
146
|
+
|
|
147
|
+
After initialization, your repository will look like:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
~/.dotfiles/
|
|
151
|
+
├── .git/
|
|
152
|
+
├── filelist # List of managed files
|
|
153
|
+
├── dotfiles/
|
|
154
|
+
│ ├── plain/ # Unencrypted files
|
|
155
|
+
│ │ ├── common/
|
|
156
|
+
│ │ ├── zsh/
|
|
157
|
+
│ │ └── vim/
|
|
158
|
+
│ └── encrypt/ # Encrypted files
|
|
159
|
+
│ └── ssh/
|
|
160
|
+
└── .plugins/ # Plugin data (passwords, etc.)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## 🔐 Encryption Example
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Add a file with encryption
|
|
167
|
+
dotsync add --encrypt ~/.cursor/mcp.json cursor
|
|
168
|
+
|
|
169
|
+
# The file will be encrypted in the repository
|
|
170
|
+
# When you sync, it's automatically decrypted to your home directory
|
|
171
|
+
|
|
172
|
+
# Convert an existing plain file to encrypted
|
|
173
|
+
dotsync encrypt ~/.ssh/config
|
|
174
|
+
|
|
175
|
+
# Change encryption password
|
|
176
|
+
dotsync passwd
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## 🎯 Use Cases
|
|
180
|
+
|
|
181
|
+
### Share Configurations Across Machines
|
|
182
|
+
|
|
183
|
+
Keep your workstation and server dotfiles in the same repository, organized by categories:
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
filelist:
|
|
187
|
+
.zshrc:zsh,workstation
|
|
188
|
+
.vimrc:vim,common
|
|
189
|
+
.ssh/config:ssh|encrypt
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Quick Machine Setup
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# On a new machine
|
|
196
|
+
git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles
|
|
197
|
+
cd ~/.dotfiles
|
|
198
|
+
dotsync restore
|
|
199
|
+
|
|
200
|
+
# Or if the repository doesn't exist yet
|
|
201
|
+
dotsync init # Creates ~/.dotfiles automatically
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Encrypt Sensitive Files
|
|
205
|
+
|
|
206
|
+
Keep API keys, tokens, and other sensitive data encrypted in your repository while still managing them with dotsync.
|
|
207
|
+
|
|
208
|
+
## 📚 Documentation
|
|
209
|
+
|
|
210
|
+
For complete documentation, including:
|
|
211
|
+
- Detailed command reference
|
|
212
|
+
- Advanced usage patterns
|
|
213
|
+
- Encryption guide
|
|
214
|
+
- Migration from v1.x
|
|
215
|
+
|
|
216
|
+
Visit: **[https://dotsync.readthedocs.io](https://dotsync.readthedocs.io)**
|
|
217
|
+
|
|
218
|
+
## 🤝 Contributing
|
|
219
|
+
|
|
220
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
221
|
+
|
|
222
|
+
1. Fork the repository
|
|
223
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
224
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
225
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
226
|
+
5. Open a Pull Request
|
|
227
|
+
|
|
228
|
+
### Development Setup
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
git clone https://github.com/HarveyGG/dotsync.git
|
|
232
|
+
cd dotsync
|
|
233
|
+
uv sync
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Running Tests
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
uv run pytest tests/
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## 📝 License
|
|
243
|
+
|
|
244
|
+
This project is licensed under a Non-Commercial License. See the [LICENSE](LICENSE) file for details.
|
|
245
|
+
|
|
246
|
+
**Summary:**
|
|
247
|
+
- ✅ Free for personal, educational, and non-profit use
|
|
248
|
+
- ✅ View, modify, and distribute the source code
|
|
249
|
+
- ❌ Commercial use is not permitted without explicit permission
|
|
250
|
+
|
|
251
|
+
For commercial licensing inquiries, please contact: harvey.wanghy@gmail.com
|
|
252
|
+
|
|
253
|
+
## 🔗 Links
|
|
254
|
+
|
|
255
|
+
- [Documentation](https://dotsync.readthedocs.io)
|
|
256
|
+
- [Issue Tracker](https://github.com/HarveyGG/dotsync/issues)
|
|
257
|
+
- [PyPI Package](https://pypi.org/project/dotsync-cli/)
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
<div align="center">
|
|
262
|
+
|
|
263
|
+
Made with ❤️ by the dotsync community
|
|
264
|
+
|
|
265
|
+
[⭐ Star this repo](https://github.com/HarveyGG/dotsync) if you find it useful!
|
|
266
|
+
|
|
267
|
+
</div>
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# dotsync
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
**A powerful and versatile dotfiles manager that makes managing your configuration files across multiple machines effortless.**
|
|
11
|
+
|
|
12
|
+
[Features](#-features) • [Installation](#-installation) • [Quick Start](#-quick-start) • [Documentation](#-documentation) • [Contributing](#-contributing)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## ✨ Features
|
|
19
|
+
|
|
20
|
+
- **🎯 Easy Organization** - Categorize and organize your dotfiles with an intuitive filelist system
|
|
21
|
+
- **🔄 Multi-Machine Support** - Share files between machines or keep separate versions in the same repo
|
|
22
|
+
- **🔒 Encryption Support** - Encrypt sensitive dotfiles using GnuPG
|
|
23
|
+
- **🔗 Flexible Linking** - Use symlinks or copy files (hard mode) based on your needs
|
|
24
|
+
- **📦 Zero Dependencies**
|
|
25
|
+
- **🚀 Simple Commands** - Intuitive CLI with commands like `add`, `update`, `restore`, `encrypt`
|
|
26
|
+
- **🧪 Well Tested** - Comprehensive test suite ensuring reliability
|
|
27
|
+
- **📚 Great Documentation** - Full documentation available at [ReadTheDocs](https://dotsync.readthedocs.io)
|
|
28
|
+
|
|
29
|
+
## 🚀 Installation
|
|
30
|
+
|
|
31
|
+
### Quick Install (Recommended)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
curl -fsSL https://raw.githubusercontent.com/HarveyGG/dotsync/main/install.sh | bash
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Features:**
|
|
38
|
+
- ✅ No Python installation required
|
|
39
|
+
- ✅ Zero dependencies
|
|
40
|
+
- ✅ Cross-platform (macOS, Linux)
|
|
41
|
+
- ⚡ First run ~30s, then instant
|
|
42
|
+
|
|
43
|
+
### Homebrew (macOS/Linux)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
brew tap HarveyGG/tap
|
|
47
|
+
brew install dotsync
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### pip (Alternative)
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install dotsync-cli
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## 📖 Quick Start
|
|
58
|
+
|
|
59
|
+
### 1. Initialize a dotfiles repository
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Automatically creates ~/.dotfiles if it doesn't exist
|
|
63
|
+
dotsync init
|
|
64
|
+
|
|
65
|
+
# Or specify a custom directory
|
|
66
|
+
dotsync init ~/my-dotfiles
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 2. Add a configuration file
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Add a file (automatically infers category from path)
|
|
73
|
+
dotsync add ~/.zshrc
|
|
74
|
+
|
|
75
|
+
# Add with specific category
|
|
76
|
+
dotsync add ~/.vimrc vim
|
|
77
|
+
|
|
78
|
+
# Add with encryption
|
|
79
|
+
dotsync add --encrypt ~/.ssh/id_rsa ssh
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 3. Sync files to repository
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
dotsync update
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This will:
|
|
89
|
+
- Copy your files to the repository
|
|
90
|
+
- Create symlinks in your home directory pointing to the repository
|
|
91
|
+
|
|
92
|
+
### 4. Restore on a new machine
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles
|
|
96
|
+
cd ~/.dotfiles
|
|
97
|
+
dotsync restore
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## 📋 Common Commands
|
|
101
|
+
|
|
102
|
+
| Command | Description |
|
|
103
|
+
|---------|-------------|
|
|
104
|
+
| `dotsync init [directory]` | Initialize a new dotfiles repository (default: ~/.dotfiles) |
|
|
105
|
+
| `dotsync add <file> [category]` | Add a new file to management |
|
|
106
|
+
| `dotsync add --encrypt <file> [category]` | Add a file with encryption |
|
|
107
|
+
| `dotsync update` | Sync files from home to repository |
|
|
108
|
+
| `dotsync restore` | Restore files from repository to home |
|
|
109
|
+
| `dotsync encrypt <file>` | Convert existing file to encrypted |
|
|
110
|
+
| `dotsync unmanage <file>` | Stop managing a file |
|
|
111
|
+
| `dotsync list` | List all managed files |
|
|
112
|
+
| `dotsync diff` | Show differences between home and repo |
|
|
113
|
+
| `dotsync commit` | Commit changes to git |
|
|
114
|
+
| `dotsync clean` | Remove files from home that are in repo |
|
|
115
|
+
| `dotsync passwd` | Change encryption password |
|
|
116
|
+
|
|
117
|
+
For detailed usage, see the [documentation](https://dotsync.readthedocs.io).
|
|
118
|
+
|
|
119
|
+
## 📁 Repository Structure
|
|
120
|
+
|
|
121
|
+
After initialization, your repository will look like:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
~/.dotfiles/
|
|
125
|
+
├── .git/
|
|
126
|
+
├── filelist # List of managed files
|
|
127
|
+
├── dotfiles/
|
|
128
|
+
│ ├── plain/ # Unencrypted files
|
|
129
|
+
│ │ ├── common/
|
|
130
|
+
│ │ ├── zsh/
|
|
131
|
+
│ │ └── vim/
|
|
132
|
+
│ └── encrypt/ # Encrypted files
|
|
133
|
+
│ └── ssh/
|
|
134
|
+
└── .plugins/ # Plugin data (passwords, etc.)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## 🔐 Encryption Example
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Add a file with encryption
|
|
141
|
+
dotsync add --encrypt ~/.cursor/mcp.json cursor
|
|
142
|
+
|
|
143
|
+
# The file will be encrypted in the repository
|
|
144
|
+
# When you sync, it's automatically decrypted to your home directory
|
|
145
|
+
|
|
146
|
+
# Convert an existing plain file to encrypted
|
|
147
|
+
dotsync encrypt ~/.ssh/config
|
|
148
|
+
|
|
149
|
+
# Change encryption password
|
|
150
|
+
dotsync passwd
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## 🎯 Use Cases
|
|
154
|
+
|
|
155
|
+
### Share Configurations Across Machines
|
|
156
|
+
|
|
157
|
+
Keep your workstation and server dotfiles in the same repository, organized by categories:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
filelist:
|
|
161
|
+
.zshrc:zsh,workstation
|
|
162
|
+
.vimrc:vim,common
|
|
163
|
+
.ssh/config:ssh|encrypt
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Quick Machine Setup
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# On a new machine
|
|
170
|
+
git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles
|
|
171
|
+
cd ~/.dotfiles
|
|
172
|
+
dotsync restore
|
|
173
|
+
|
|
174
|
+
# Or if the repository doesn't exist yet
|
|
175
|
+
dotsync init # Creates ~/.dotfiles automatically
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Encrypt Sensitive Files
|
|
179
|
+
|
|
180
|
+
Keep API keys, tokens, and other sensitive data encrypted in your repository while still managing them with dotsync.
|
|
181
|
+
|
|
182
|
+
## 📚 Documentation
|
|
183
|
+
|
|
184
|
+
For complete documentation, including:
|
|
185
|
+
- Detailed command reference
|
|
186
|
+
- Advanced usage patterns
|
|
187
|
+
- Encryption guide
|
|
188
|
+
- Migration from v1.x
|
|
189
|
+
|
|
190
|
+
Visit: **[https://dotsync.readthedocs.io](https://dotsync.readthedocs.io)**
|
|
191
|
+
|
|
192
|
+
## 🤝 Contributing
|
|
193
|
+
|
|
194
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
195
|
+
|
|
196
|
+
1. Fork the repository
|
|
197
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
198
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
199
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
200
|
+
5. Open a Pull Request
|
|
201
|
+
|
|
202
|
+
### Development Setup
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
git clone https://github.com/HarveyGG/dotsync.git
|
|
206
|
+
cd dotsync
|
|
207
|
+
uv sync
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Running Tests
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
uv run pytest tests/
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## 📝 License
|
|
217
|
+
|
|
218
|
+
This project is licensed under a Non-Commercial License. See the [LICENSE](LICENSE) file for details.
|
|
219
|
+
|
|
220
|
+
**Summary:**
|
|
221
|
+
- ✅ Free for personal, educational, and non-profit use
|
|
222
|
+
- ✅ View, modify, and distribute the source code
|
|
223
|
+
- ❌ Commercial use is not permitted without explicit permission
|
|
224
|
+
|
|
225
|
+
For commercial licensing inquiries, please contact: harvey.wanghy@gmail.com
|
|
226
|
+
|
|
227
|
+
## 🔗 Links
|
|
228
|
+
|
|
229
|
+
- [Documentation](https://dotsync.readthedocs.io)
|
|
230
|
+
- [Issue Tracker](https://github.com/HarveyGG/dotsync/issues)
|
|
231
|
+
- [PyPI Package](https://pypi.org/project/dotsync-cli/)
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
<div align="center">
|
|
236
|
+
|
|
237
|
+
Made with ❤️ by the dotsync community
|
|
238
|
+
|
|
239
|
+
[⭐ Star this repo](https://github.com/HarveyGG/dotsync) if you find it useful!
|
|
240
|
+
|
|
241
|
+
</div>
|
|
File without changes
|