editor-profile-sync 1.0.6 → 1.0.7

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.
package/README.md CHANGED
@@ -1,189 +1,189 @@
1
- # editor-profile-sync
2
-
3
- Cross-platform CLI to share your VS Code-based editor profile between editors.
4
-
5
- [GitHub](https://github.com/sbetav/editor-profile-sync) · [npm](https://www.npmjs.com/package/editor-profile-sync)
6
-
7
- You can sync:
8
-
9
- - extensions
10
- - snippets
11
- - `settings.json`
12
- - `keybindings.json`
13
-
14
- ## Requirements
15
-
16
- - **Node.js** 18 or newer
17
- - **npm** (comes with Node.js)
18
- - At least one [supported editor](#supported-editors) installed
19
- - **macOS**: Choose one of the following options:
20
- - **Option 1 (Recommended)**: Install terminal command:
21
- 1. Open your editor
22
- 2. Press `Cmd + Shift + P` to open the Command Palette
23
- 3. Type: `shell command`
24
- 4. Select: **Shell Command: Install '[command]' command in PATH**
25
- 5. Restart your terminal
26
- - **Option 2**: Have the editor installed in `/Applications/` (e.g., `/Applications/Visual Studio Code.app`). The CLI will be auto-detected from the app bundle.
27
- - **Windows/Linux**: Editor CLI must be on your PATH (e.g., `code`, `cursor`)
28
-
29
- ## Install
30
-
31
- ### Via npx (recommended)
32
-
33
- Run directly without installing:
34
-
35
- ```bash
36
- npx editor-profile-sync
37
- ```
38
-
39
- ### Global install
40
-
41
- Install once, then run from anywhere:
42
-
43
- ```bash
44
- npm install -g editor-profile-sync
45
- editor-profile-sync
46
- ```
47
-
48
- ### From source
49
-
50
- Clone this repo, then install dependencies:
51
-
52
- ```bash
53
- npm install
54
- ```
55
-
56
- ## Usage
57
-
58
- ### CLI options
59
-
60
- | Option | Description |
61
- | ----------------- | ------------------- |
62
- | `-h`, `--help` | Show help message |
63
- | `-v`, `--version` | Show version number |
64
-
65
- ## How it works
66
-
67
- 1. Detect installed editors (only editors with CLI on PATH are shown).
68
- 2. Choose a source editor.
69
- 3. Choose what to share:
70
- - `Extensions`
71
- - `Snippets`
72
- - `settings.json`
73
- - `keybindings.json`
74
- 4. Choose mode(s) for selected item types:
75
- - Extensions:
76
- - Install on top of existing (additive)
77
- - Exact sync (replace all extensions)
78
- - Snippets:
79
- - Merge (source snippets override key conflicts in matching snippet files)
80
- - Replace (target snippets folder is replaced)
81
- 5. Choose one or more target editors.
82
- 6. Run sync.
83
-
84
- ### Settings merge behavior
85
-
86
- For `settings.json`, each target is merged as:
87
-
88
- ```js
89
- const merged = {
90
- ...targetSettings,
91
- ...sourceSettings,
92
- };
93
- ```
94
-
95
- What this means:
96
-
97
- - Shared/source settings win on key conflicts.
98
- - Existing unrelated target settings stay.
99
- - Editor-specific keys are preserved unless your source uses the same key.
100
-
101
- Example:
102
-
103
- Target:
104
-
105
- ```json
106
- {
107
- "terminal.integrated.fontSize": 14
108
- }
109
- ```
110
-
111
- Source:
112
-
113
- ```json
114
- {
115
- "editor.formatOnSave": true
116
- }
117
- ```
118
-
119
- Result:
120
-
121
- ```json
122
- {
123
- "terminal.integrated.fontSize": 14,
124
- "editor.formatOnSave": true
125
- }
126
- ```
127
-
128
- ### Keybindings merge behavior
129
-
130
- For `keybindings.json`, keybindings are merged intelligently:
131
-
132
- - Source keybindings override target ones with the same `key` + `command` combination
133
- - Existing target keybindings that don't conflict are preserved
134
- - New source keybindings are added to the target
135
-
136
- Example:
137
-
138
- Target:
139
-
140
- ```json
141
- [{ "key": "ctrl+k", "command": "workbench.action.terminal.clear" }]
142
- ```
143
-
144
- Source:
145
-
146
- ```json
147
- [
148
- {
149
- "key": "ctrl+k",
150
- "command": "workbench.action.terminal.clear",
151
- "when": "terminalFocus"
152
- },
153
- { "key": "ctrl+shift+p", "command": "workbench.action.showCommands" }
154
- ]
155
- ```
156
-
157
- Result:
158
-
159
- ```json
160
- [
161
- {
162
- "key": "ctrl+k",
163
- "command": "workbench.action.terminal.clear",
164
- "when": "terminalFocus"
165
- },
166
- { "key": "ctrl+shift+p", "command": "workbench.action.showCommands" }
167
- ]
168
- ```
169
-
170
- ## Supported editors
171
-
172
- These editors are currently supported:
173
-
174
- | Editor | CLI command |
175
- | ----------- | ------------- |
176
- | Antigravity | `antigravity` |
177
- | Cursor | `cursor` |
178
- | Kiro | `kiro` |
179
- | Trae | `trae` |
180
- | VS Code | `code` |
181
- | Windsurf | `windsurf` |
182
-
183
- **macOS**: Editors work with either option: install terminal command (recommended) or auto-detect from `/Applications/` if installed as `.app` bundles.
184
-
185
- **Windows/Linux**: Each editor must be installed and its CLI available in your terminal (e.g. `code`, `cursor`).
186
-
187
- ## License
188
-
189
- MIT
1
+ # editor-profile-sync
2
+
3
+ Cross-platform CLI to share your VS Code-based editor profile between editors.
4
+
5
+ [GitHub](https://github.com/sbetav/editor-profile-sync) · [npm](https://www.npmjs.com/package/editor-profile-sync)
6
+
7
+ You can sync:
8
+
9
+ - extensions
10
+ - snippets
11
+ - `settings.json`
12
+ - `keybindings.json`
13
+
14
+ ## Requirements
15
+
16
+ - **Node.js** 18 or newer
17
+ - **npm** (comes with Node.js)
18
+ - At least one [supported editor](#supported-editors) installed
19
+ - **macOS**: Choose one of the following options:
20
+ - **Option 1 (Recommended)**: Install terminal command:
21
+ 1. Open your editor
22
+ 2. Press `Cmd + Shift + P` to open the Command Palette
23
+ 3. Type: `shell command`
24
+ 4. Select: **Shell Command: Install '[command]' command in PATH**
25
+ 5. Restart your terminal
26
+ - **Option 2**: Have the editor installed in `/Applications/` (e.g., `/Applications/Visual Studio Code.app`). The CLI will be auto-detected from the app bundle.
27
+ - **Windows/Linux**: Editor CLI must be on your PATH (e.g., `code`, `cursor`)
28
+
29
+ ## Install
30
+
31
+ ### Via npx (recommended)
32
+
33
+ Run directly without installing:
34
+
35
+ ```bash
36
+ npx editor-profile-sync
37
+ ```
38
+
39
+ ### Global install
40
+
41
+ Install once, then run from anywhere:
42
+
43
+ ```bash
44
+ npm install -g editor-profile-sync
45
+ editor-profile-sync
46
+ ```
47
+
48
+ ### From source
49
+
50
+ Clone this repo, then install dependencies:
51
+
52
+ ```bash
53
+ npm install
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ ### CLI options
59
+
60
+ | Option | Description |
61
+ | ----------------- | ------------------- |
62
+ | `-h`, `--help` | Show help message |
63
+ | `-v`, `--version` | Show version number |
64
+
65
+ ## How it works
66
+
67
+ 1. Detect installed editors (only editors with CLI on PATH are shown).
68
+ 2. Choose a source editor.
69
+ 3. Choose what to share:
70
+ - `Extensions`
71
+ - `Snippets`
72
+ - `settings.json`
73
+ - `keybindings.json`
74
+ 4. Choose mode(s) for selected item types:
75
+ - Extensions:
76
+ - Install on top of existing (additive)
77
+ - Exact sync (replace all extensions)
78
+ - Snippets:
79
+ - Merge (source snippets override key conflicts in matching snippet files)
80
+ - Replace (target snippets folder is replaced)
81
+ 5. Choose one or more target editors.
82
+ 6. Run sync.
83
+
84
+ ### Settings merge behavior
85
+
86
+ For `settings.json`, each target is merged as:
87
+
88
+ ```js
89
+ const merged = {
90
+ ...targetSettings,
91
+ ...sourceSettings,
92
+ };
93
+ ```
94
+
95
+ What this means:
96
+
97
+ - Shared/source settings win on key conflicts.
98
+ - Existing unrelated target settings stay.
99
+ - Editor-specific keys are preserved unless your source uses the same key.
100
+
101
+ Example:
102
+
103
+ Target:
104
+
105
+ ```json
106
+ {
107
+ "terminal.integrated.fontSize": 14
108
+ }
109
+ ```
110
+
111
+ Source:
112
+
113
+ ```json
114
+ {
115
+ "editor.formatOnSave": true
116
+ }
117
+ ```
118
+
119
+ Result:
120
+
121
+ ```json
122
+ {
123
+ "terminal.integrated.fontSize": 14,
124
+ "editor.formatOnSave": true
125
+ }
126
+ ```
127
+
128
+ ### Keybindings merge behavior
129
+
130
+ For `keybindings.json`, keybindings are merged intelligently:
131
+
132
+ - Source keybindings override target ones with the same `key` + `command` combination
133
+ - Existing target keybindings that don't conflict are preserved
134
+ - New source keybindings are added to the target
135
+
136
+ Example:
137
+
138
+ Target:
139
+
140
+ ```json
141
+ [{ "key": "ctrl+k", "command": "workbench.action.terminal.clear" }]
142
+ ```
143
+
144
+ Source:
145
+
146
+ ```json
147
+ [
148
+ {
149
+ "key": "ctrl+k",
150
+ "command": "workbench.action.terminal.clear",
151
+ "when": "terminalFocus"
152
+ },
153
+ { "key": "ctrl+shift+p", "command": "workbench.action.showCommands" }
154
+ ]
155
+ ```
156
+
157
+ Result:
158
+
159
+ ```json
160
+ [
161
+ {
162
+ "key": "ctrl+k",
163
+ "command": "workbench.action.terminal.clear",
164
+ "when": "terminalFocus"
165
+ },
166
+ { "key": "ctrl+shift+p", "command": "workbench.action.showCommands" }
167
+ ]
168
+ ```
169
+
170
+ ## Supported editors
171
+
172
+ These editors are currently supported:
173
+
174
+ | Editor | CLI command |
175
+ | ----------- | ------------- |
176
+ | Antigravity | `antigravity` |
177
+ | Cursor | `cursor` |
178
+ | Kiro | `kiro` |
179
+ | Trae | `trae` |
180
+ | VS Code | `code` |
181
+ | Windsurf | `windsurf` |
182
+
183
+ **macOS**: Editors work with either option: install terminal command (recommended) or auto-detect from `/Applications/` if installed as `.app` bundles.
184
+
185
+ **Windows/Linux**: Each editor must be installed and its CLI available in your terminal (e.g. `code`, `cursor`).
186
+
187
+ ## License
188
+
189
+ MIT