dotctl 0.0.1__tar.gz → 1.0.3__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.
Files changed (51) hide show
  1. dotctl-1.0.3/LICENSE +21 -0
  2. dotctl-1.0.3/PKG-INFO +355 -0
  3. dotctl-1.0.3/README.md +329 -0
  4. dotctl-1.0.3/pyproject.toml +29 -0
  5. dotctl-1.0.3/src/dotctl/__init__.py +13 -0
  6. dotctl-1.0.3/src/dotctl/actions/activator.py +83 -0
  7. dotctl-1.0.3/src/dotctl/actions/creator.py +47 -0
  8. dotctl-1.0.3/src/dotctl/actions/exporter.py +123 -0
  9. dotctl-1.0.3/src/dotctl/actions/importer.py +133 -0
  10. dotctl-1.0.3/src/dotctl/actions/initializer.py +65 -0
  11. dotctl-1.0.3/src/dotctl/actions/lister.py +198 -0
  12. dotctl-1.0.3/src/dotctl/actions/remover.py +84 -0
  13. dotctl-1.0.3/src/dotctl/actions/saver.py +97 -0
  14. dotctl-1.0.3/src/dotctl/actions/switcher.py +73 -0
  15. dotctl-1.0.3/src/dotctl/actions/wiper.py +53 -0
  16. dotctl-1.0.3/src/dotctl/arg_manager.py +264 -0
  17. dotctl-1.0.3/src/dotctl/exception.py +42 -0
  18. dotctl-1.0.3/src/dotctl/handlers/__init__.py +0 -0
  19. dotctl-1.0.3/src/dotctl/handlers/config_handler.py +154 -0
  20. dotctl-1.0.3/src/dotctl/handlers/data_handler.py +142 -0
  21. dotctl-1.0.3/src/dotctl/handlers/git_handler.py +257 -0
  22. dotctl-1.0.3/src/dotctl/handlers/hooks_handler.py +110 -0
  23. dotctl-1.0.3/src/dotctl/hooks/post_apply.sh +9 -0
  24. dotctl-1.0.3/src/dotctl/hooks/pre_apply.sh +9 -0
  25. dotctl-1.0.3/src/dotctl/main.py +185 -0
  26. dotctl-1.0.3/src/dotctl/paths.py +19 -0
  27. dotctl-1.0.3/src/dotctl/templates/__init__.py +0 -0
  28. dotctl-1.0.3/src/dotctl/templates/dev.yaml +22 -0
  29. dotctl-1.0.3/src/dotctl/templates/kde.yaml +92 -0
  30. dotctl-1.0.3/src/dotctl/templates/other.yaml +11 -0
  31. dotctl-1.0.3/src/dotctl/utils.py +5 -0
  32. dotctl-1.0.3/src/dotctl/validators.py +45 -0
  33. dotctl-1.0.3/src/dotctl.egg-info/PKG-INFO +355 -0
  34. dotctl-1.0.3/src/dotctl.egg-info/SOURCES.txt +39 -0
  35. dotctl-1.0.3/src/dotctl.egg-info/entry_points.txt +2 -0
  36. dotctl-1.0.3/src/dotctl.egg-info/requires.txt +2 -0
  37. dotctl-1.0.3/src/dotctl.egg-info/top_level.txt +2 -0
  38. dotctl-1.0.3/src/plasmasaver/__init__.py +0 -0
  39. dotctl-0.0.1/LICENSE +0 -674
  40. dotctl-0.0.1/PKG-INFO +0 -800
  41. dotctl-0.0.1/README.md +0 -106
  42. dotctl-0.0.1/pyproject.toml +0 -31
  43. dotctl-0.0.1/src/dotctl/dotctl.py +0 -964
  44. dotctl-0.0.1/src/dotctl.egg-info/PKG-INFO +0 -800
  45. dotctl-0.0.1/src/dotctl.egg-info/SOURCES.txt +0 -11
  46. dotctl-0.0.1/src/dotctl.egg-info/entry_points.txt +0 -2
  47. dotctl-0.0.1/src/dotctl.egg-info/requires.txt +0 -1
  48. dotctl-0.0.1/src/dotctl.egg-info/top_level.txt +0 -1
  49. {dotctl-0.0.1 → dotctl-1.0.3}/setup.cfg +0 -0
  50. {dotctl-0.0.1/src/dotctl → dotctl-1.0.3/src/dotctl/actions}/__init__.py +0 -0
  51. {dotctl-0.0.1 → dotctl-1.0.3}/src/dotctl.egg-info/dependency_links.txt +0 -0
dotctl-1.0.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Pankaj Kumar Patel
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.
dotctl-1.0.3/PKG-INFO ADDED
@@ -0,0 +1,355 @@
1
+ Metadata-Version: 2.4
2
+ Name: dotctl
3
+ Version: 1.0.3
4
+ Summary: A powerful CLI tool to profile your OS by saving, applying, exporting, and importing system configurations as named profiles. Designed to manage dot files and service configurations in a centralized Git repository (local or remote), dotctl enables seamless system replication across machines. Supports pre/post hook scripts, making it ideal for setting up servers or desktops with consistent environments.
5
+ Author-email: Pankaj Jackson <pankajackson@live.co.uk>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/pankajackson/dotctl
8
+ Project-URL: Bug Tracker, https://github.com/pankajackson/dotctl/issues
9
+ Project-URL: Source, https://github.com/pankajackson/dotctl
10
+ Keywords: dotfiles,config,settings,backup,dotfile-manager
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: End Users/Desktop
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Topic :: System :: Archiving :: Backup
19
+ Classifier: Topic :: Utilities
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: PyYAML
24
+ Requires-Dist: gitpython
25
+ Dynamic: license-file
26
+
27
+ # DotCtl
28
+
29
+ **dotctl** is a powerful CLI tool to manage, save, apply, export, and import system configurations as named profiles.
30
+ It helps centralize dotfiles and service configurations in Git repositories for seamless replication across systems.
31
+
32
+ Designed for developers and sysadmins, it supports pre/post hook scripts and is ideal for setting up consistent environments across desktops and servers.
33
+
34
+ ---
35
+
36
+ ## 📚 Table of Contents
37
+
38
+ - [DotCtl](#dotctl)
39
+ - [📚 Table of Contents](#-table-of-contents)
40
+ - [🚀 Features](#-features)
41
+ - [🔧 Installation](#-installation)
42
+ - [📘 Usage](#-usage)
43
+ - [🛠️ Commands](#️-commands)
44
+ - [📁 `init`](#-init)
45
+ - [💾 `save`](#-save)
46
+ - [📋 `list` / `ls`](#-list--ls)
47
+ - [🔀 `switch` / `sw`](#-switch--sw)
48
+ - [🆕 `create` / `new`](#-create--new)
49
+ - [❌ `remove` / `rm` / `delete` / `del`](#-remove--rm--delete--del)
50
+ - [🧪 `apply`](#-apply)
51
+ - [📤 `export`](#-export)
52
+ - [📥 `import`](#-import)
53
+ - [🔥 `wipe`](#-wipe)
54
+ - [🧑‍💻 Development \& Publishing](#-development--publishing)
55
+ - [Setup Development Environment](#setup-development-environment)
56
+ - [Build the Package](#build-the-package)
57
+ - [Publish to TestPyPI](#publish-to-testpypi)
58
+ - [Publish to PyPI](#publish-to-pypi)
59
+ - [🙋 Contact](#-contact)
60
+
61
+ ---
62
+
63
+ ## 🚀 Features
64
+
65
+ - 📦 **Profile Management** — Create, switch, save, remove, and apply system profiles.
66
+ - 🌀 **Pre/Post Hooks** — Run scripts before or after activating a profile (e.g., install packages, restart services).
67
+ - 🔄 **Git Integration** — Sync profiles with local or remote Git repositories.
68
+ - 📁 **Portable Configs** — Export/import profiles using `.dtsv` files for easy backups and sharing.
69
+ - ⚙️ **Custom Configs** — Define tracking rules via `dotctl.yaml`.
70
+
71
+ ---
72
+
73
+ ## 🔧 Installation
74
+
75
+ ```sh
76
+ pip install dotctl
77
+ ```
78
+
79
+ ---
80
+
81
+ ## 📘 Usage
82
+
83
+ ```sh
84
+ dotctl [OPTIONS] <COMMAND> [ARGS]
85
+ ```
86
+
87
+ Run `dotctl -h` for global help or `dotctl <COMMAND> -h` for command-specific help.
88
+
89
+ ---
90
+
91
+ ## 🛠️ Commands
92
+
93
+ ### 📁 `init`
94
+
95
+ Initialize a new profile.
96
+
97
+ ```sh
98
+ dotctl init [-h] [-u <git-url>] [-p <profile>] [-c <config-path>] [-e <env>]
99
+ ```
100
+
101
+ **Examples:**
102
+
103
+ ```sh
104
+ dotctl init -e kde
105
+ dotctl init -u https://github.com/user880/dots.git -p mydesktop
106
+ dotctl init -c ./my_custom_config.yaml
107
+ ```
108
+
109
+ **Options:**
110
+
111
+ - `-e, --env` – Target environment (e.g., kde, gnome, server).
112
+ - `-u, --url` – Git URL to clone profile from.
113
+ - `-p, --profile` – Activate this profile after init.
114
+ - `-c, --config` – Path to custom YAML config.
115
+
116
+ ---
117
+
118
+ ### 💾 `save`
119
+
120
+ Save current system state to the active profile.
121
+
122
+ ```sh
123
+ dotctl save [-h] [-p <password>] [--skip-sudo] [profile]
124
+ ```
125
+
126
+ **Examples:**
127
+
128
+ ```sh
129
+ dotctl save
130
+ dotctl save my_web_server --skip-sudo
131
+ dotctl save my_web_server -p mYsecretp@ssw0rd
132
+ ```
133
+
134
+ **Options:**
135
+
136
+ - `--skip-sudo` – Ignore restricted resources.
137
+ - `-p, --password` – Password for restricted resources.
138
+
139
+ ---
140
+
141
+ ### 📋 `list` / `ls`
142
+
143
+ List all profiles.
144
+
145
+ ```sh
146
+ dotctl list [-h] [--details] [--fetch]
147
+ ```
148
+
149
+ **Examples:**
150
+
151
+ ```sh
152
+ dotctl list
153
+ dotctl list --details
154
+ dotctl list --fetch
155
+ ```
156
+
157
+ **Options:**
158
+
159
+ - `--details` – Show extended info.
160
+ - `--fetch` – Refresh remote data.
161
+
162
+ ---
163
+
164
+ ### 🔀 `switch` / `sw`
165
+
166
+ Switch to another profile.
167
+
168
+ ```sh
169
+ dotctl switch [-h] [--fetch] [profile]
170
+ ```
171
+
172
+ **Examples:**
173
+
174
+ ```sh
175
+ dotctl switch MyProfile
176
+ dotctl sw MyProfile --fetch
177
+ ```
178
+
179
+ **Options:**
180
+
181
+ - `--fetch` – Refresh profile info before switching.
182
+
183
+ ---
184
+
185
+ ### 🆕 `create` / `new`
186
+
187
+ Create a new, empty profile.
188
+
189
+ ```sh
190
+ dotctl create [-h] [--fetch] <profile>
191
+ ```
192
+
193
+ **Examples:**
194
+
195
+ ```sh
196
+ dotctl create myserver
197
+ dotctl new myserver --fetch
198
+ ```
199
+
200
+ **Options:**
201
+
202
+ - `--fetch` – Sync with remote before creating.
203
+
204
+ ---
205
+
206
+ ### ❌ `remove` / `rm` / `delete` / `del`
207
+
208
+ Remove a profile locally and/or remotely.
209
+
210
+ ```sh
211
+ dotctl remove [-h] [-y] [--fetch] <profile>
212
+ ```
213
+
214
+ **Examples:**
215
+
216
+ ```sh
217
+ dotctl rm MyProfile
218
+ dotctl del MyProfile --fetch
219
+ dotctl del MyProfile -y
220
+ ```
221
+
222
+ **Options:**
223
+
224
+ - `--fetch` – Refresh data before removal.
225
+ - `-y, --no-confirm` – Skip confirmation prompt.
226
+
227
+ ---
228
+
229
+ ### 🧪 `apply`
230
+
231
+ Apply a saved profile.
232
+
233
+ ```sh
234
+ dotctl apply [-h] [-p <password>] [--skip-sudo] [--skip-hooks] [--skip-pre-hooks] [--skip-post-hooks] [--ignore-hook-errors] [profile]
235
+ ```
236
+
237
+ **Examples:**
238
+
239
+ ```sh
240
+ dotctl apply
241
+ dotctl apply mydesktop --skip-hooks
242
+ dotctl apply MyProfile --skip-pre-hooks --ignore-hook-errors
243
+ ```
244
+
245
+ **Options:**
246
+
247
+ - `--skip-sudo` – Ignore restricted resources.
248
+ - `--skip-hooks` – Skip all hooks.
249
+ - `--skip-pre-hooks` – Skip only pre-hooks.
250
+ - `--skip-post-hooks` – Skip only post-hooks.
251
+ - `--ignore-hook-errors` – Don’t abort if hooks fail.
252
+ - `-p, --password` – Password for restricted actions.
253
+
254
+ ---
255
+
256
+ ### 📤 `export`
257
+
258
+ Export a profile to `.dtsv`.
259
+
260
+ ```sh
261
+ dotctl export [-h] [-p <password>] [--skip-sudo] [profile]
262
+ ```
263
+
264
+ **Examples:**
265
+
266
+ ```sh
267
+ dotctl export
268
+ dotctl export my_web_server --skip-sudo
269
+ dotctl export my_web_server -p mYsecretp@ssw0rd
270
+ ```
271
+
272
+ **Options:**
273
+
274
+ - `--skip-sudo`, `-p` same as above.
275
+
276
+ ---
277
+
278
+ ### 📥 `import`
279
+
280
+ Import a `.dtsv` profile.
281
+
282
+ ```sh
283
+ dotctl import [-h] [-p <password>] [--skip-sudo] <file.dtsv>
284
+ ```
285
+
286
+ **Examples:**
287
+
288
+ ```sh
289
+ dotctl import my_web_server.dtsv
290
+ dotctl import /data/backup/web.dtsv --skip-sudo
291
+ ```
292
+
293
+ **Options:**
294
+
295
+ - `--skip-sudo`, `-p` same as above.
296
+
297
+ ---
298
+
299
+ ### 🔥 `wipe`
300
+
301
+ Remove all local profiles.
302
+
303
+ ```sh
304
+ dotctl wipe [-h] [-y]
305
+ ```
306
+
307
+ **Examples:**
308
+
309
+ ```sh
310
+ dotctl wipe
311
+ dotctl wipe -y
312
+ ```
313
+
314
+ **Options:**
315
+
316
+ - `-y, --no-confirm` – Do not prompt before wiping.
317
+
318
+ ---
319
+
320
+ ## 🧑‍💻 Development & Publishing
321
+
322
+ ### Setup Development Environment
323
+
324
+ ```sh
325
+ python -m venv venv
326
+ source venv/bin/activate # Linux/macOS
327
+ venv\Scripts\activate # Windows
328
+
329
+ pip install -r requirements.txt
330
+ ```
331
+
332
+ ### Build the Package
333
+
334
+ ```sh
335
+ python -m build
336
+ ```
337
+
338
+ ### Publish to TestPyPI
339
+
340
+ ```sh
341
+ twine upload --repository testpypi dist/*
342
+ ```
343
+
344
+ ### Publish to PyPI
345
+
346
+ ```sh
347
+ twine upload --repository pypi dist/*
348
+ ```
349
+
350
+ ---
351
+
352
+ ## 🙋 Contact
353
+
354
+ - **Maintainer:** [Pankaj Jackson](https://github.com/pankajackson)
355
+ - **Support:** [Open an Issue](https://github.com/pankajackson/dotctl/issues)
dotctl-1.0.3/README.md ADDED
@@ -0,0 +1,329 @@
1
+ # DotCtl
2
+
3
+ **dotctl** is a powerful CLI tool to manage, save, apply, export, and import system configurations as named profiles.
4
+ It helps centralize dotfiles and service configurations in Git repositories for seamless replication across systems.
5
+
6
+ Designed for developers and sysadmins, it supports pre/post hook scripts and is ideal for setting up consistent environments across desktops and servers.
7
+
8
+ ---
9
+
10
+ ## 📚 Table of Contents
11
+
12
+ - [DotCtl](#dotctl)
13
+ - [📚 Table of Contents](#-table-of-contents)
14
+ - [🚀 Features](#-features)
15
+ - [🔧 Installation](#-installation)
16
+ - [📘 Usage](#-usage)
17
+ - [🛠️ Commands](#️-commands)
18
+ - [📁 `init`](#-init)
19
+ - [💾 `save`](#-save)
20
+ - [📋 `list` / `ls`](#-list--ls)
21
+ - [🔀 `switch` / `sw`](#-switch--sw)
22
+ - [🆕 `create` / `new`](#-create--new)
23
+ - [❌ `remove` / `rm` / `delete` / `del`](#-remove--rm--delete--del)
24
+ - [🧪 `apply`](#-apply)
25
+ - [📤 `export`](#-export)
26
+ - [📥 `import`](#-import)
27
+ - [🔥 `wipe`](#-wipe)
28
+ - [🧑‍💻 Development \& Publishing](#-development--publishing)
29
+ - [Setup Development Environment](#setup-development-environment)
30
+ - [Build the Package](#build-the-package)
31
+ - [Publish to TestPyPI](#publish-to-testpypi)
32
+ - [Publish to PyPI](#publish-to-pypi)
33
+ - [🙋 Contact](#-contact)
34
+
35
+ ---
36
+
37
+ ## 🚀 Features
38
+
39
+ - 📦 **Profile Management** — Create, switch, save, remove, and apply system profiles.
40
+ - 🌀 **Pre/Post Hooks** — Run scripts before or after activating a profile (e.g., install packages, restart services).
41
+ - 🔄 **Git Integration** — Sync profiles with local or remote Git repositories.
42
+ - 📁 **Portable Configs** — Export/import profiles using `.dtsv` files for easy backups and sharing.
43
+ - ⚙️ **Custom Configs** — Define tracking rules via `dotctl.yaml`.
44
+
45
+ ---
46
+
47
+ ## 🔧 Installation
48
+
49
+ ```sh
50
+ pip install dotctl
51
+ ```
52
+
53
+ ---
54
+
55
+ ## 📘 Usage
56
+
57
+ ```sh
58
+ dotctl [OPTIONS] <COMMAND> [ARGS]
59
+ ```
60
+
61
+ Run `dotctl -h` for global help or `dotctl <COMMAND> -h` for command-specific help.
62
+
63
+ ---
64
+
65
+ ## 🛠️ Commands
66
+
67
+ ### 📁 `init`
68
+
69
+ Initialize a new profile.
70
+
71
+ ```sh
72
+ dotctl init [-h] [-u <git-url>] [-p <profile>] [-c <config-path>] [-e <env>]
73
+ ```
74
+
75
+ **Examples:**
76
+
77
+ ```sh
78
+ dotctl init -e kde
79
+ dotctl init -u https://github.com/user880/dots.git -p mydesktop
80
+ dotctl init -c ./my_custom_config.yaml
81
+ ```
82
+
83
+ **Options:**
84
+
85
+ - `-e, --env` – Target environment (e.g., kde, gnome, server).
86
+ - `-u, --url` – Git URL to clone profile from.
87
+ - `-p, --profile` – Activate this profile after init.
88
+ - `-c, --config` – Path to custom YAML config.
89
+
90
+ ---
91
+
92
+ ### 💾 `save`
93
+
94
+ Save current system state to the active profile.
95
+
96
+ ```sh
97
+ dotctl save [-h] [-p <password>] [--skip-sudo] [profile]
98
+ ```
99
+
100
+ **Examples:**
101
+
102
+ ```sh
103
+ dotctl save
104
+ dotctl save my_web_server --skip-sudo
105
+ dotctl save my_web_server -p mYsecretp@ssw0rd
106
+ ```
107
+
108
+ **Options:**
109
+
110
+ - `--skip-sudo` – Ignore restricted resources.
111
+ - `-p, --password` – Password for restricted resources.
112
+
113
+ ---
114
+
115
+ ### 📋 `list` / `ls`
116
+
117
+ List all profiles.
118
+
119
+ ```sh
120
+ dotctl list [-h] [--details] [--fetch]
121
+ ```
122
+
123
+ **Examples:**
124
+
125
+ ```sh
126
+ dotctl list
127
+ dotctl list --details
128
+ dotctl list --fetch
129
+ ```
130
+
131
+ **Options:**
132
+
133
+ - `--details` – Show extended info.
134
+ - `--fetch` – Refresh remote data.
135
+
136
+ ---
137
+
138
+ ### 🔀 `switch` / `sw`
139
+
140
+ Switch to another profile.
141
+
142
+ ```sh
143
+ dotctl switch [-h] [--fetch] [profile]
144
+ ```
145
+
146
+ **Examples:**
147
+
148
+ ```sh
149
+ dotctl switch MyProfile
150
+ dotctl sw MyProfile --fetch
151
+ ```
152
+
153
+ **Options:**
154
+
155
+ - `--fetch` – Refresh profile info before switching.
156
+
157
+ ---
158
+
159
+ ### 🆕 `create` / `new`
160
+
161
+ Create a new, empty profile.
162
+
163
+ ```sh
164
+ dotctl create [-h] [--fetch] <profile>
165
+ ```
166
+
167
+ **Examples:**
168
+
169
+ ```sh
170
+ dotctl create myserver
171
+ dotctl new myserver --fetch
172
+ ```
173
+
174
+ **Options:**
175
+
176
+ - `--fetch` – Sync with remote before creating.
177
+
178
+ ---
179
+
180
+ ### ❌ `remove` / `rm` / `delete` / `del`
181
+
182
+ Remove a profile locally and/or remotely.
183
+
184
+ ```sh
185
+ dotctl remove [-h] [-y] [--fetch] <profile>
186
+ ```
187
+
188
+ **Examples:**
189
+
190
+ ```sh
191
+ dotctl rm MyProfile
192
+ dotctl del MyProfile --fetch
193
+ dotctl del MyProfile -y
194
+ ```
195
+
196
+ **Options:**
197
+
198
+ - `--fetch` – Refresh data before removal.
199
+ - `-y, --no-confirm` – Skip confirmation prompt.
200
+
201
+ ---
202
+
203
+ ### 🧪 `apply`
204
+
205
+ Apply a saved profile.
206
+
207
+ ```sh
208
+ dotctl apply [-h] [-p <password>] [--skip-sudo] [--skip-hooks] [--skip-pre-hooks] [--skip-post-hooks] [--ignore-hook-errors] [profile]
209
+ ```
210
+
211
+ **Examples:**
212
+
213
+ ```sh
214
+ dotctl apply
215
+ dotctl apply mydesktop --skip-hooks
216
+ dotctl apply MyProfile --skip-pre-hooks --ignore-hook-errors
217
+ ```
218
+
219
+ **Options:**
220
+
221
+ - `--skip-sudo` – Ignore restricted resources.
222
+ - `--skip-hooks` – Skip all hooks.
223
+ - `--skip-pre-hooks` – Skip only pre-hooks.
224
+ - `--skip-post-hooks` – Skip only post-hooks.
225
+ - `--ignore-hook-errors` – Don’t abort if hooks fail.
226
+ - `-p, --password` – Password for restricted actions.
227
+
228
+ ---
229
+
230
+ ### 📤 `export`
231
+
232
+ Export a profile to `.dtsv`.
233
+
234
+ ```sh
235
+ dotctl export [-h] [-p <password>] [--skip-sudo] [profile]
236
+ ```
237
+
238
+ **Examples:**
239
+
240
+ ```sh
241
+ dotctl export
242
+ dotctl export my_web_server --skip-sudo
243
+ dotctl export my_web_server -p mYsecretp@ssw0rd
244
+ ```
245
+
246
+ **Options:**
247
+
248
+ - `--skip-sudo`, `-p` same as above.
249
+
250
+ ---
251
+
252
+ ### 📥 `import`
253
+
254
+ Import a `.dtsv` profile.
255
+
256
+ ```sh
257
+ dotctl import [-h] [-p <password>] [--skip-sudo] <file.dtsv>
258
+ ```
259
+
260
+ **Examples:**
261
+
262
+ ```sh
263
+ dotctl import my_web_server.dtsv
264
+ dotctl import /data/backup/web.dtsv --skip-sudo
265
+ ```
266
+
267
+ **Options:**
268
+
269
+ - `--skip-sudo`, `-p` same as above.
270
+
271
+ ---
272
+
273
+ ### 🔥 `wipe`
274
+
275
+ Remove all local profiles.
276
+
277
+ ```sh
278
+ dotctl wipe [-h] [-y]
279
+ ```
280
+
281
+ **Examples:**
282
+
283
+ ```sh
284
+ dotctl wipe
285
+ dotctl wipe -y
286
+ ```
287
+
288
+ **Options:**
289
+
290
+ - `-y, --no-confirm` – Do not prompt before wiping.
291
+
292
+ ---
293
+
294
+ ## 🧑‍💻 Development & Publishing
295
+
296
+ ### Setup Development Environment
297
+
298
+ ```sh
299
+ python -m venv venv
300
+ source venv/bin/activate # Linux/macOS
301
+ venv\Scripts\activate # Windows
302
+
303
+ pip install -r requirements.txt
304
+ ```
305
+
306
+ ### Build the Package
307
+
308
+ ```sh
309
+ python -m build
310
+ ```
311
+
312
+ ### Publish to TestPyPI
313
+
314
+ ```sh
315
+ twine upload --repository testpypi dist/*
316
+ ```
317
+
318
+ ### Publish to PyPI
319
+
320
+ ```sh
321
+ twine upload --repository pypi dist/*
322
+ ```
323
+
324
+ ---
325
+
326
+ ## 🙋 Contact
327
+
328
+ - **Maintainer:** [Pankaj Jackson](https://github.com/pankajackson)
329
+ - **Support:** [Open an Issue](https://github.com/pankajackson/dotctl/issues)