@tinyrack/devsync 1.3.0 → 1.5.0

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 (126) hide show
  1. package/README.md +124 -78
  2. package/dist/cli/base-command.d.ts +3 -0
  3. package/dist/cli/base-command.d.ts.map +1 -1
  4. package/dist/cli/base-command.js +7 -1
  5. package/dist/cli/base-command.js.map +1 -1
  6. package/dist/cli/commands/doctor.d.ts.map +1 -1
  7. package/dist/cli/commands/doctor.js +3 -4
  8. package/dist/cli/commands/doctor.js.map +1 -1
  9. package/dist/cli/commands/index.d.ts +4 -4
  10. package/dist/cli/commands/index.js +4 -4
  11. package/dist/cli/commands/init.d.ts.map +1 -1
  12. package/dist/cli/commands/init.js +1 -2
  13. package/dist/cli/commands/init.js.map +1 -1
  14. package/dist/cli/commands/{machine → profile}/list.d.ts +1 -1
  15. package/dist/cli/commands/profile/list.d.ts.map +1 -0
  16. package/dist/cli/commands/profile/list.js +14 -0
  17. package/dist/cli/commands/profile/list.js.map +1 -0
  18. package/dist/cli/commands/{machine → profile}/use.d.ts +2 -2
  19. package/dist/cli/commands/{machine → profile}/use.d.ts.map +1 -1
  20. package/dist/cli/commands/profile/use.js +26 -0
  21. package/dist/cli/commands/profile/use.js.map +1 -0
  22. package/dist/cli/commands/pull.d.ts +1 -1
  23. package/dist/cli/commands/pull.d.ts.map +1 -1
  24. package/dist/cli/commands/pull.js +7 -8
  25. package/dist/cli/commands/pull.js.map +1 -1
  26. package/dist/cli/commands/push.d.ts +1 -1
  27. package/dist/cli/commands/push.d.ts.map +1 -1
  28. package/dist/cli/commands/push.js +6 -7
  29. package/dist/cli/commands/push.js.map +1 -1
  30. package/dist/cli/commands/status.d.ts +1 -1
  31. package/dist/cli/commands/status.d.ts.map +1 -1
  32. package/dist/cli/commands/status.js +8 -9
  33. package/dist/cli/commands/status.js.map +1 -1
  34. package/dist/cli/commands/track.d.ts +1 -1
  35. package/dist/cli/commands/track.d.ts.map +1 -1
  36. package/dist/cli/commands/track.js +18 -18
  37. package/dist/cli/commands/track.js.map +1 -1
  38. package/dist/cli/commands/untrack.d.ts.map +1 -1
  39. package/dist/cli/commands/untrack.js +2 -3
  40. package/dist/cli/commands/untrack.js.map +1 -1
  41. package/dist/config/global-config.d.ts +7 -7
  42. package/dist/config/global-config.js +11 -11
  43. package/dist/config/platform.d.ts +3 -3
  44. package/dist/config/platform.d.ts.map +1 -1
  45. package/dist/config/platform.js +1 -1
  46. package/dist/config/platform.js.map +1 -1
  47. package/dist/config/sync.d.ts +69 -49
  48. package/dist/config/sync.d.ts.map +1 -1
  49. package/dist/config/sync.js +84 -71
  50. package/dist/config/sync.js.map +1 -1
  51. package/dist/config/xdg.js +1 -1
  52. package/dist/config/xdg.js.map +1 -1
  53. package/dist/lib/output.d.ts +24 -16
  54. package/dist/lib/output.d.ts.map +1 -1
  55. package/dist/lib/output.js +179 -146
  56. package/dist/lib/output.js.map +1 -1
  57. package/dist/services/add.d.ts +3 -4
  58. package/dist/services/add.d.ts.map +1 -1
  59. package/dist/services/add.js +54 -42
  60. package/dist/services/add.js.map +1 -1
  61. package/dist/services/config-file.d.ts +17 -20
  62. package/dist/services/config-file.d.ts.map +1 -1
  63. package/dist/services/config-file.js +5 -5
  64. package/dist/services/config-file.js.map +1 -1
  65. package/dist/services/doctor.d.ts +2 -3
  66. package/dist/services/doctor.d.ts.map +1 -1
  67. package/dist/services/doctor.js +23 -20
  68. package/dist/services/doctor.js.map +1 -1
  69. package/dist/services/filesystem.d.ts +2 -3
  70. package/dist/services/filesystem.d.ts.map +1 -1
  71. package/dist/services/filesystem.js +0 -1
  72. package/dist/services/filesystem.js.map +1 -1
  73. package/dist/services/forget.d.ts +1 -2
  74. package/dist/services/forget.d.ts.map +1 -1
  75. package/dist/services/forget.js +20 -18
  76. package/dist/services/forget.js.map +1 -1
  77. package/dist/services/init.d.ts +1 -2
  78. package/dist/services/init.d.ts.map +1 -1
  79. package/dist/services/init.js +19 -20
  80. package/dist/services/init.js.map +1 -1
  81. package/dist/services/local-materialization.d.ts +1 -1
  82. package/dist/services/local-materialization.js +4 -4
  83. package/dist/services/local-snapshot.d.ts +1 -1
  84. package/dist/services/local-snapshot.js +4 -4
  85. package/dist/services/local-snapshot.js.map +1 -1
  86. package/dist/services/paths.d.ts +3 -7
  87. package/dist/services/paths.d.ts.map +1 -1
  88. package/dist/services/paths.js +2 -3
  89. package/dist/services/paths.js.map +1 -1
  90. package/dist/services/profile.d.ts +39 -0
  91. package/dist/services/profile.d.ts.map +1 -0
  92. package/dist/services/profile.js +117 -0
  93. package/dist/services/profile.js.map +1 -0
  94. package/dist/services/pull.d.ts +5 -5
  95. package/dist/services/pull.d.ts.map +1 -1
  96. package/dist/services/pull.js +15 -12
  97. package/dist/services/pull.js.map +1 -1
  98. package/dist/services/push.d.ts +5 -5
  99. package/dist/services/push.d.ts.map +1 -1
  100. package/dist/services/push.js +16 -14
  101. package/dist/services/push.js.map +1 -1
  102. package/dist/services/repo-artifacts.d.ts +9 -9
  103. package/dist/services/repo-artifacts.js +22 -22
  104. package/dist/services/repo-snapshot.js +12 -12
  105. package/dist/services/runtime.d.ts +11 -20
  106. package/dist/services/runtime.d.ts.map +1 -1
  107. package/dist/services/runtime.js +20 -27
  108. package/dist/services/runtime.js.map +1 -1
  109. package/dist/services/set.d.ts +9 -10
  110. package/dist/services/set.d.ts.map +1 -1
  111. package/dist/services/set.js +45 -24
  112. package/dist/services/set.js.map +1 -1
  113. package/dist/services/status.d.ts +5 -7
  114. package/dist/services/status.d.ts.map +1 -1
  115. package/dist/services/status.js +16 -14
  116. package/dist/services/status.js.map +1 -1
  117. package/package.json +7 -7
  118. package/dist/cli/commands/machine/list.d.ts.map +0 -1
  119. package/dist/cli/commands/machine/list.js +0 -12
  120. package/dist/cli/commands/machine/list.js.map +0 -1
  121. package/dist/cli/commands/machine/use.js +0 -28
  122. package/dist/cli/commands/machine/use.js.map +0 -1
  123. package/dist/services/machine.d.ts +0 -40
  124. package/dist/services/machine.d.ts.map +0 -1
  125. package/dist/services/machine.js +0 -113
  126. package/dist/services/machine.js.map +0 -1
package/README.md CHANGED
@@ -1,26 +1,27 @@
1
1
  # devsync
2
2
 
3
- `devsync` is a cross-platform CLI for managing the configuration files in your home directory with git and syncing them across multiple machines.
3
+ `devsync` is a cross-platform CLI for managing the configuration files in your home directory with git and syncing them across multiple devices.
4
4
 
5
- Instead of treating the repository as the source of truth, `devsync` treats your actual local config as the truth. You choose files and directories under `HOME`, `devsync` mirrors them into a git-backed sync repository, and later restores that repository onto another machine when you need it.
5
+ Instead of treating the repository as the source of truth, `devsync` treats your actual local config as the truth. You choose files and directories under `HOME`, `devsync` mirrors them into a git-backed sync repository, and later restores that repository onto another device when you need it.
6
6
 
7
7
  ## 1. Purpose and how it differs
8
8
 
9
- Most dotfiles tools start from the repository and ask you to shape your local machine around it.
9
+ Most dotfiles tools start from the repository and ask you to shape your local system around it.
10
10
 
11
11
  `devsync` takes the opposite approach:
12
12
 
13
13
  - Your real config under `HOME` is the source of truth.
14
14
  - The git repository is a sync artifact, not the primary authoring location.
15
- - `push` captures your current machine state into the repository.
16
- - `pull` applies the repository back onto another machine.
15
+ - `push` captures your current local state into the repository.
16
+ - `pull` applies the repository back onto another device.
17
17
 
18
18
  That makes `devsync` a good fit when you want to:
19
19
 
20
20
  - manage existing dotfiles and app configs without reorganizing your home directory,
21
- - keep machine-specific config workflows intact,
21
+ - keep profile-specific config workflows intact,
22
22
  - sync plain files and encrypted secrets together,
23
- - use normal git remotes as the transport layer between PCs.
23
+ - use normal git remotes as the transport layer between PCs,
24
+ - handle platform-specific paths across Windows, macOS, and Linux.
24
25
 
25
26
  Core capabilities:
26
27
 
@@ -28,6 +29,8 @@ Core capabilities:
28
29
  - store synced artifacts in `~/.config/devsync/sync`,
29
30
  - mark paths as `normal`, `secret`, or `ignore`,
30
31
  - encrypt secret artifacts with `age`,
32
+ - assign entries to profiles so different machines sync different subsets,
33
+ - support platform-specific local paths per entry,
31
34
  - preview both directions with `status`, `push --dry-run`, and `pull --dry-run`.
32
35
 
33
36
  ## 2. Installation
@@ -71,9 +74,9 @@ devsync init
71
74
  Track a few configs:
72
75
 
73
76
  ```bash
74
- devsync add ~/.gitconfig
75
- devsync add ~/.zshrc
76
- devsync add ~/.config/mytool --secret
77
+ devsync track ~/.gitconfig
78
+ devsync track ~/.zshrc
79
+ devsync track ~/.config/mytool --mode secret
77
80
  ```
78
81
 
79
82
  Review what would be captured:
@@ -92,14 +95,13 @@ devsync push
92
95
  Open the sync repository and publish it with git:
93
96
 
94
97
  ```bash
95
- devsync cd
96
- git status
98
+ cd "$(devsync dir)"
97
99
  git add .
98
100
  git commit -m "Update synced config"
99
101
  git push
100
102
  ```
101
103
 
102
- On another machine, clone and restore from the same repo:
104
+ On another device, clone and restore from the same repo:
103
105
 
104
106
  ```bash
105
107
  devsync init https://example.com/my-sync-repo.git
@@ -118,7 +120,7 @@ Notes:
118
120
 
119
121
  ### How tracking works
120
122
 
121
- - You add files or directories that live under your home directory.
123
+ - You track files or directories that live under your home directory.
122
124
  - `devsync` mirrors them into `~/.config/devsync/sync/default/<repoPath>` for the default profile, or `~/.config/devsync/sync/<profile>/<repoPath>` for a named profile.
123
125
  - Plain artifacts are stored as-is.
124
126
  - Secret artifacts are stored with the `.devsync.secret` suffix.
@@ -138,58 +140,89 @@ Each tracked path can use one of three modes:
138
140
  - `secret`: encrypt before storing in the repo
139
141
  - `ignore`: skip during push and pull
140
142
 
141
- You can apply modes to tracked roots or nested paths inside tracked directories.
143
+ Set modes when tracking, or update them later:
142
144
 
143
- Profile-specific behavior inherits the tracked root mode and only changes nested paths inside tracked directories.
145
+ ```bash
146
+ devsync track ~/.config/mytool --mode secret
147
+ devsync track ~/.config/mytool/cache --mode ignore
148
+ devsync track ~/.config/mytool/public.json --mode normal
149
+ ```
150
+
151
+ Child entries inside a tracked directory inherit the parent mode unless explicitly overridden.
144
152
 
145
- Examples:
153
+ ### Profiles
154
+
155
+ Profiles let you sync different subsets of entries on different machines. Each entry can be assigned to one or more profiles. When a profile is active, only entries assigned to that profile (plus entries with no profile restriction) are synced.
146
156
 
147
157
  ```bash
148
- devsync set secret ~/.config/mytool/token.json
149
- devsync set ignore ~/.config/mytool/cache --recursive
150
- devsync set normal ~/.config/mytool/public.json
151
- devsync set secret ~/.config/mytool/token.json --profile work
158
+ devsync track ~/.ssh/config --mode secret --profile work
159
+ devsync track ~/.gitconfig --profile work --profile personal
160
+ devsync track ~/.zshrc
161
+ devsync profile use work
162
+ devsync profile list
152
163
  ```
153
164
 
154
- ### Profile-specific overrides
165
+ Key behaviors:
166
+
167
+ - Entries without `--profile` are synced on all profiles (including when no profile is active).
168
+ - Entries with `--profile` are only synced when one of the listed profiles is active.
169
+ - Pass `--profile ''` to clear profile restrictions from an entry.
170
+ - The `default` profile namespace is reserved for entries with no profile restriction.
171
+ - Commands like `push`, `pull`, and `status` accept `--profile` to override the active profile for a single operation.
155
172
 
156
- - Track the root once without `--profile`.
157
- - Use `devsync set --profile <name>` only for child paths inside tracked directories.
158
- - Profile-specific rules inherit the parent root mode and only override nested paths.
159
- - Named profile artifacts are stored under `<profile>/<repoPath>`.
160
- - `default` is reserved for the base layout and cannot be used as a named profile.
161
- - Standalone profiled roots and profiled file entries are not supported.
173
+ ### Platform-specific paths
162
174
 
163
- Example `config.json`:
175
+ Entries can specify different local paths per platform, so the same sync config works across Windows, macOS, and Linux:
176
+
177
+ Example `manifest.json`:
164
178
 
165
179
  ```json
166
180
  {
167
- "version": 1,
181
+ "version": 7,
168
182
  "age": {
169
183
  "identityFile": "$XDG_CONFIG_HOME/devsync/age/keys.txt",
170
184
  "recipients": ["age1example..."]
171
185
  },
172
186
  "entries": [
187
+ {
188
+ "kind": "file",
189
+ "localPath": {
190
+ "default": "~/.gitconfig",
191
+ "win": "%USERPROFILE%/.gitconfig"
192
+ },
193
+ "mode": {
194
+ "default": "normal"
195
+ }
196
+ },
173
197
  {
174
198
  "kind": "directory",
175
- "localPath": "~/.config/mytool",
176
- "mode": "normal",
177
- "overrides": {
178
- "cache/": "ignore"
199
+ "localPath": {
200
+ "default": "~/.config/mytool",
201
+ "win": "%APPDATA%/mytool"
179
202
  },
180
- "profiles": {
181
- "work": {
182
- "overrides": {
183
- "token.json": "secret"
184
- }
185
- }
203
+ "mode": {
204
+ "default": "normal",
205
+ "win": "ignore"
206
+ },
207
+ "profiles": ["work"]
208
+ },
209
+ {
210
+ "kind": "file",
211
+ "localPath": {
212
+ "default": "~/.config/mytool/token.json"
186
213
  },
187
- "repoPath": ".config/mytool"
214
+ "mode": {
215
+ "default": "secret"
216
+ },
217
+ "profiles": ["work"]
188
218
  }
189
219
  ]
190
220
  }
191
221
  ```
192
222
 
223
+ The `localPath` object supports `default`, `win`, `mac`, and `linux` keys. The `default` key is required and is used as a fallback when no platform-specific path is set for the current OS.
224
+ The `mode` object uses the same shape. `mode.default` is required, OS-specific keys are optional, and an explicit child `mode` replaces the parent's full mode policy instead of merging platform overrides.
225
+
193
226
  ### Common workflow
194
227
 
195
228
  Check what changed:
@@ -204,7 +237,7 @@ Capture local config into the repository:
204
237
  devsync push
205
238
  ```
206
239
 
207
- Restore repository state onto the machine:
240
+ Restore repository state locally:
208
241
 
209
242
  ```bash
210
243
  devsync pull
@@ -217,6 +250,14 @@ devsync push --dry-run
217
250
  devsync pull --dry-run
218
251
  ```
219
252
 
253
+ Override the active profile for a single operation:
254
+
255
+ ```bash
256
+ devsync push --profile work
257
+ devsync pull --profile personal
258
+ devsync status --profile work
259
+ ```
260
+
220
261
  ### Command reference
221
262
 
222
263
  #### `init`
@@ -229,47 +270,31 @@ devsync init https://example.com/my-sync-repo.git
229
270
  devsync init --identity "$XDG_CONFIG_HOME/devsync/age/keys.txt" --recipient age1...
230
271
  ```
231
272
 
232
- #### `add`
273
+ #### `track`
233
274
 
234
275
  Track a file or directory under your home directory.
235
276
 
236
277
  ```bash
237
- devsync add ~/.gitconfig
238
- devsync add ~/.config/mytool
239
- devsync add ~/.config/mytool --secret
278
+ devsync track ~/.gitconfig
279
+ devsync track ~/.gitconfig ~/.zshrc ~/.config/nvim
280
+ devsync track ~/.ssh/config --mode secret
281
+ devsync track ~/.ssh/config --mode secret --profile work
282
+ devsync track ~/.config/mytool/cache --mode ignore
240
283
  ```
241
284
 
242
- `add --profile` is not supported for tracked roots. Track the root first, then use `set --profile` for child overrides.
285
+ If the target is already tracked, its mode is updated. Targets may also be repository paths inside a tracked directory to create child entries with a specific mode.
243
286
 
244
- #### `set`
287
+ #### `untrack`
245
288
 
246
- Change the sync mode for a tracked root, child path, or subtree.
289
+ Remove a tracked entry from the sync config.
247
290
 
248
291
  ```bash
249
- devsync set secret ~/.config/mytool/token.json
250
- devsync set ignore ~/.config/mytool/cache --recursive
251
- devsync set secret ~/.config/mytool/token.json --profile work
292
+ devsync untrack ~/.gitconfig
293
+ devsync untrack ~/.config/mytool
294
+ devsync untrack .config/mytool/token.json
252
295
  ```
253
296
 
254
- With `--profile`, the target must be a child path inside a tracked directory, and `default` cannot be used as the profile name. Profile-specific root mode changes are not supported.
255
-
256
- #### `forget`
257
-
258
- Remove a tracked path or nested override from config.
259
-
260
- ```bash
261
- devsync forget ~/.gitconfig
262
- devsync forget ~/.config/mytool
263
- devsync forget .config/mytool/token.json --profile work
264
- ```
265
-
266
- #### `list`
267
-
268
- Show tracked entries, default modes, root overrides, and profile-specific child overrides.
269
-
270
- ```bash
271
- devsync list
272
- ```
297
+ This only updates the sync config; actual file changes happen on the next push or pull.
273
298
 
274
299
  #### `status`
275
300
 
@@ -277,6 +302,7 @@ Preview planned push and pull changes.
277
302
 
278
303
  ```bash
279
304
  devsync status
305
+ devsync status --profile work
280
306
  ```
281
307
 
282
308
  #### `doctor`
@@ -294,24 +320,45 @@ Write local state into the sync repository.
294
320
  ```bash
295
321
  devsync push
296
322
  devsync push --dry-run
323
+ devsync push --profile work
297
324
  ```
298
325
 
299
326
  #### `pull`
300
327
 
301
- Apply repository state back onto the local machine.
328
+ Apply repository state back onto local paths.
302
329
 
303
330
  ```bash
304
331
  devsync pull
305
332
  devsync pull --dry-run
333
+ devsync pull --profile work
334
+ ```
335
+
336
+ #### `profile list`
337
+
338
+ Show configured profiles and which one is active.
339
+
340
+ ```bash
341
+ devsync profile list
306
342
  ```
307
343
 
308
- #### `cd`
344
+ #### `profile use`
345
+
346
+ Set or clear the active sync profile.
347
+
348
+ ```bash
349
+ devsync profile use work
350
+ devsync profile use
351
+ ```
352
+
353
+ Omit the profile name to clear the active profile.
354
+
355
+ #### `dir`
309
356
 
310
- Open the sync repository in your shell, or print its path.
357
+ Print the sync repository path.
311
358
 
312
359
  ```bash
313
- devsync cd
314
- devsync cd --print
360
+ devsync dir
361
+ cd "$(devsync dir)"
315
362
  ```
316
363
 
317
364
  For flag-level details, use built-in help:
@@ -319,8 +366,7 @@ For flag-level details, use built-in help:
319
366
  ```bash
320
367
  devsync --help
321
368
  devsync init --help
322
- devsync add --help
323
- devsync set --help
369
+ devsync track --help
324
370
  ```
325
371
 
326
372
  ## Development
@@ -6,6 +6,9 @@ type CommandError = Error & {
6
6
  };
7
7
  };
8
8
  export declare abstract class BaseCommand extends Command {
9
+ static baseFlags: {
10
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
+ };
9
12
  protected print(output: string): void;
10
13
  protected printError(message: Error | string): void;
11
14
  catch(error: CommandError): Promise<unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/cli/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAStC,KAAK,YAAY,GAAG,KAAK,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAMF,8BAAsB,WAAY,SAAQ,OAAO;IAC/C,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM;IAI9B,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM;IAItB,KAAK,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CAQnE"}
1
+ {"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/cli/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAS7C,KAAK,YAAY,GAAG,KAAK,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAMF,8BAAsB,WAAY,SAAQ,OAAO;IAC/C,OAAuB,SAAS;;MAK9B;IAEF,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM;IAI9B,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM;IAItB,KAAK,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CAQnE"}
@@ -1,10 +1,16 @@
1
- import { Command } from "@oclif/core";
1
+ import { Command, Flags } from "@oclif/core";
2
2
  import { formatErrorMessage, writeStderr, writeStdout, } from "#app/lib/output.js";
3
3
  import { formatDevsyncError } from "#app/services/error.js";
4
4
  const resolveExitCode = (error) => {
5
5
  return error.oclif?.exit ?? error.exitCode ?? 1;
6
6
  };
7
7
  export class BaseCommand extends Command {
8
+ static baseFlags = {
9
+ verbose: Flags.boolean({
10
+ default: false,
11
+ summary: "Show detailed output including file paths",
12
+ }),
13
+ };
8
14
  print(output) {
9
15
  writeStdout(output);
10
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base-command.js","sourceRoot":"","sources":["../../src/cli/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,WAAW,GACZ,MAAM,oBAAoB,CAAC;AA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OAAO,CAAC;YACrB,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,2CAA2C;SACrD,CAAC;KACH,CAAC;IAEQ,KAAK,CAAC,MAAc;QAC5B,WAAW,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;IAES,UAAU,CAAC,OAAuB;QAC1C,WAAW,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,CAAC;IAEe,KAAK,CAAC,KAAK,CAAC,KAAmB;QAC7C,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;QACpC,CAAC;QAED,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IACjD,OAAuB,OAAO,SAC2C;IAEzE,OAAuB,WAAW,SACsK;IAExM,OAAuB,QAAQ,WAA2C;IAEpD,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAU3C"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IACjD,OAAuB,OAAO,SAC2C;IAEzE,OAAuB,WAAW,SACsK;IAExM,OAAuB,QAAQ,WAA2C;IAEpD,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAU3C"}
@@ -1,15 +1,14 @@
1
1
  import { BaseCommand } from "#app/cli/base-command.js";
2
2
  import { formatSyncDoctorResult } from "#app/lib/output.js";
3
3
  import { runSyncDoctor } from "#app/services/doctor.js";
4
- import { createSyncContext } from "#app/services/runtime.js";
5
4
  export default class SyncDoctor extends BaseCommand {
6
5
  static summary = "Check sync repository, config, age identity, and tracked local paths";
7
6
  static description = "Run health checks for the local sync setup, including repository availability, config validity, age identity configuration, and whether tracked local paths still exist where devsync expects them.";
8
7
  static examples = ["<%= config.bin %> <%= command.id %>"];
9
8
  async run() {
10
- await this.parse(SyncDoctor);
11
- const result = await runSyncDoctor(createSyncContext());
12
- this.print(formatSyncDoctorResult(result));
9
+ const { flags } = await this.parse(SyncDoctor);
10
+ const result = await runSyncDoctor(process.env);
11
+ this.print(formatSyncDoctorResult(result, { verbose: flags.verbose }));
13
12
  if (result.hasFailures) {
14
13
  this.exit(1);
15
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IAC1C,MAAM,CAAU,OAAO,GAC5B,sEAAsE,CAAC;IAElE,MAAM,CAAU,WAAW,GAChC,qMAAqM,CAAC;IAEjM,MAAM,CAAU,QAAQ,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAE1D,KAAK,CAAC,GAAG;QACvB,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC7B,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAExD,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC;QAE3C,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;IACH,CAAC"}
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IAC1C,MAAM,CAAU,OAAO,GAC5B,sEAAsE,CAAC;IAElE,MAAM,CAAU,WAAW,GAChC,qMAAqM,CAAC;IAEjM,MAAM,CAAU,QAAQ,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAE1D,KAAK,CAAC,GAAG;QACvB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEhD,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAEvE,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;IACH,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import SyncDir from "#app/cli/commands/dir.js";
2
2
  import SyncDoctor from "#app/cli/commands/doctor.js";
3
3
  import SyncInit from "#app/cli/commands/init.js";
4
- import SyncMachineList from "#app/cli/commands/machine/list.js";
5
- import SyncMachineUse from "#app/cli/commands/machine/use.js";
4
+ import SyncProfileList from "#app/cli/commands/profile/list.js";
5
+ import SyncProfileUse from "#app/cli/commands/profile/use.js";
6
6
  import SyncPull from "#app/cli/commands/pull.js";
7
7
  import SyncPush from "#app/cli/commands/push.js";
8
8
  import SyncStatus from "#app/cli/commands/status.js";
@@ -12,8 +12,8 @@ export declare const COMMANDS: {
12
12
  dir: typeof SyncDir;
13
13
  doctor: typeof SyncDoctor;
14
14
  init: typeof SyncInit;
15
- "machine:list": typeof SyncMachineList;
16
- "machine:use": typeof SyncMachineUse;
15
+ "profile:list": typeof SyncProfileList;
16
+ "profile:use": typeof SyncProfileUse;
17
17
  pull: typeof SyncPull;
18
18
  push: typeof SyncPush;
19
19
  status: typeof SyncStatus;
@@ -1,8 +1,8 @@
1
1
  import SyncDir from "#app/cli/commands/dir.js";
2
2
  import SyncDoctor from "#app/cli/commands/doctor.js";
3
3
  import SyncInit from "#app/cli/commands/init.js";
4
- import SyncMachineList from "#app/cli/commands/machine/list.js";
5
- import SyncMachineUse from "#app/cli/commands/machine/use.js";
4
+ import SyncProfileList from "#app/cli/commands/profile/list.js";
5
+ import SyncProfileUse from "#app/cli/commands/profile/use.js";
6
6
  import SyncPull from "#app/cli/commands/pull.js";
7
7
  import SyncPush from "#app/cli/commands/push.js";
8
8
  import SyncStatus from "#app/cli/commands/status.js";
@@ -12,8 +12,8 @@ export const COMMANDS = {
12
12
  dir: SyncDir,
13
13
  doctor: SyncDoctor,
14
14
  init: SyncInit,
15
- "machine:list": SyncMachineList,
16
- "machine:use": SyncMachineUse,
15
+ "profile:list": SyncProfileList,
16
+ "profile:use": SyncProfileUse,
17
17
  pull: SyncPull,
18
18
  push: SyncPush,
19
19
  status: SyncStatus,
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAC/C,OAAuB,OAAO,SAA8C;IAE5E,OAAuB,WAAW,SAC8N;IAEhQ,OAAuB,QAAQ,WAI7B;IAEF,OAAuB,IAAI;;MAKzB;IAEF,OAAuB,KAAK;;;MAc1B;IAEoB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAe3C"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAC/C,OAAuB,OAAO,SAA8C;IAE5E,OAAuB,WAAW,SAC8N;IAEhQ,OAAuB,QAAQ,WAI7B;IAEF,OAAuB,IAAI;;MAKzB;IAEF,OAAuB,KAAK;;;MAc1B;IAEoB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAgB3C"}
@@ -2,7 +2,6 @@ import { Args, Flags } from "@oclif/core";
2
2
  import { BaseCommand } from "#app/cli/base-command.js";
3
3
  import { formatSyncInitResult } from "#app/lib/output.js";
4
4
  import { initializeSync } from "#app/services/init.js";
5
- import { createSyncContext } from "#app/services/runtime.js";
6
5
  export default class SyncInit extends BaseCommand {
7
6
  static summary = "Initialize the git-backed sync directory";
8
7
  static description = "Create or connect the local devsync repository under your XDG config directory, then store the sync settings used by later pull and push operations. If you omit the repository argument, devsync initializes a local git repository in the sync directory.";
@@ -36,7 +35,7 @@ export default class SyncInit extends BaseCommand {
36
35
  identityFile: flags.identity,
37
36
  recipients: flags.recipient ?? [],
38
37
  repository: args.repository,
39
- }, createSyncContext()));
38
+ }, process.env), { verbose: flags.verbose });
40
39
  this.print(output);
41
40
  }
42
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO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C,QAAQ;YAC5B,UAAU,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE;YACjC,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,EACD,OAAO,CAAC,GAAG,CACZ,EACD,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAC3B,CAAC;QAEF,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { BaseCommand } from "#app/cli/base-command.js";
2
- export default class SyncMachineList extends BaseCommand {
2
+ export default class SyncProfileList extends BaseCommand {
3
3
  static summary: string;
4
4
  static description: string;
5
5
  run(): Promise<void>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/profile/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW;IACtD,OAAuB,OAAO,SAA8C;IAE5E,OAAuB,WAAW,SACgH;IAE5H,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAS3C"}
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from "#app/cli/base-command.js";
2
+ import { formatSyncProfileListResult } from "#app/lib/output.js";
3
+ import { listSyncProfiles } from "#app/services/profile.js";
4
+ export default class SyncProfileList extends BaseCommand {
5
+ static summary = "Show configured and active sync profiles";
6
+ static description = "List the profile names referenced by the current sync configuration and show which profile is active through ~/.config/devsync/settings.json.";
7
+ async run() {
8
+ const { flags } = await this.parse(SyncProfileList);
9
+ this.print(formatSyncProfileListResult(await listSyncProfiles(process.env), {
10
+ verbose: flags.verbose,
11
+ }));
12
+ }
13
+ }
14
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/cli/commands/profile/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW;IAC/C,MAAM,CAAU,OAAO,GAAG,0CAA0C,CAAC;IAErE,MAAM,CAAU,WAAW,GAChC,+IAA+I,CAAC;IAElI,KAAK,CAAC,GAAG;QACvB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAEpD,IAAI,CAAC,KAAK,CACR,2BAA2B,CAAC,MAAM,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC/D,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC,CACH,CAAC;IACJ,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { BaseCommand } from "#app/cli/base-command.js";
2
- export default class SyncMachineUse extends BaseCommand {
2
+ export default class SyncProfileUse extends BaseCommand {
3
3
  static summary: string;
4
4
  static description: string;
5
5
  static examples: string[];
6
6
  static args: {
7
- machine: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
7
+ profile: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
8
8
  };
9
9
  run(): Promise<void>;
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/machine/use.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,OAAuB,OAAO,SAA0C;IAExE,OAAuB,WAAW,SACuJ;IAEzL,OAAuB,QAAQ,WAG7B;IAEF,OAAuB,IAAI;;MAKzB;IAEoB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAU3C"}
1
+ {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/profile/use.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,OAAuB,OAAO,SAA0C;IAExE,OAAuB,WAAW,SACuJ;IAEzL,OAAuB,QAAQ,WAG7B;IAEF,OAAuB,IAAI;;MAKzB;IAEoB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAW3C"}
@@ -0,0 +1,26 @@
1
+ import { Args } from "@oclif/core";
2
+ import { BaseCommand } from "#app/cli/base-command.js";
3
+ import { formatSyncProfileUpdateResult } from "#app/lib/output.js";
4
+ import { clearSyncProfiles, useSyncProfile } from "#app/services/profile.js";
5
+ export default class SyncProfileUse extends BaseCommand {
6
+ static summary = "Set or clear the active sync profile";
7
+ static description = "Write ~/.config/devsync/settings.json so plain push, pull, status, and doctor commands use the selected profile layer by default. Omit the profile name to clear the active profile.";
8
+ static examples = [
9
+ "<%= config.bin %> <%= command.id %> work",
10
+ "<%= config.bin %> <%= command.id %>",
11
+ ];
12
+ static args = {
13
+ profile: Args.string({
14
+ description: "Profile name to activate (omit to clear)",
15
+ required: false,
16
+ }),
17
+ };
18
+ async run() {
19
+ const { args, flags } = await this.parse(SyncProfileUse);
20
+ const result = args.profile !== undefined
21
+ ? await useSyncProfile(args.profile, process.env)
22
+ : await clearSyncProfiles(process.env);
23
+ this.print(formatSyncProfileUpdateResult(result, { verbose: flags.verbose }));
24
+ }
25
+ }
26
+ //# sourceMappingURL=use.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use.js","sourceRoot":"","sources":["../../../../src/cli/commands/profile/use.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE7E,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IAC9C,MAAM,CAAU,OAAO,GAAG,sCAAsC,CAAC;IAEjE,MAAM,CAAU,WAAW,GAChC,sLAAsL,CAAC;IAElL,MAAM,CAAU,QAAQ,GAAG;QAChC,0CAA0C;QAC1C,qCAAqC;KACtC,CAAC;IAEK,MAAM,CAAU,IAAI,GAAG;QAC5B,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;YACnB,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH,CAAC;IAEc,KAAK,CAAC,GAAG;QACvB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACzD,MAAM,MAAM,GACV,IAAI,CAAC,OAAO,KAAK,SAAS;YACxB,CAAC,CAAC,MAAM,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC;YACjD,CAAC,CAAC,MAAM,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAE3C,IAAI,CAAC,KAAK,CACR,6BAA6B,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAClE,CAAC;IACJ,CAAC"}
@@ -5,7 +5,7 @@ export default class SyncPull extends BaseCommand {
5
5
  static examples: string[];
6
6
  static flags: {
7
7
  "dry-run": import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
- machine: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
9
  };
10
10
  run(): Promise<void>;
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/pull.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAC/C,OAAuB,OAAO,SACiC;IAE/D,OAAuB,WAAW,SACyL;IAE3N,OAAuB,QAAQ,WAI7B;IAEF,OAAuB,KAAK;;;MAY1B;IAEoB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAc3C"}
1
+ {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/pull.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAC/C,OAAuB,OAAO,SACiC;IAE/D,OAAuB,WAAW,SACyL;IAE3N,OAAuB,QAAQ,WAI7B;IAEF,OAAuB,KAAK;;;MAY1B;IAEoB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAe3C"}