editor-profile-sync 1.0.5 → 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,145 +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
-
13
- ## Requirements
14
-
15
- - **Node.js** 18 or newer
16
- - **npm** (comes with Node.js)
17
- - At least one [supported editor](#supported-editors) installed
18
- - **macOS**: Choose one of the following options:
19
- - **Option 1 (Recommended)**: Install terminal command:
20
- 1. Open your editor
21
- 2. Press `Cmd + Shift + P` to open the Command Palette
22
- 3. Type: `shell command`
23
- 4. Select: **Shell Command: Install '[command]' command in PATH**
24
- 5. Restart your terminal
25
- - **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.
26
- - **Windows/Linux**: Editor CLI must be on your PATH (e.g., `code`, `cursor`)
27
-
28
- ## Install
29
-
30
- ### Via npx (recommended)
31
-
32
- Run directly without installing:
33
-
34
- ```bash
35
- npx editor-profile-sync
36
- ```
37
-
38
- ### Global install
39
-
40
- Install once, then run from anywhere:
41
-
42
- ```bash
43
- npm install -g editor-profile-sync
44
- editor-profile-sync
45
- ```
46
-
47
- ### From source
48
-
49
- Clone this repo, then install dependencies:
50
-
51
- ```bash
52
- npm install
53
- ```
54
-
55
- ## Usage
56
-
57
- ### CLI options
58
-
59
- | Option | Description |
60
- | ----------------- | ------------------- |
61
- | `-h`, `--help` | Show help message |
62
- | `-v`, `--version` | Show version number |
63
-
64
- ## How it works
65
-
66
- 1. Detect installed editors (only editors with CLI on PATH are shown).
67
- 2. Choose a source editor.
68
- 3. Choose what to share:
69
- - `Extensions`
70
- - `settings.json`
71
- - `Snippets`
72
- 4. Choose mode(s) for selected item types:
73
- - Extensions:
74
- - Install on top of existing (additive)
75
- - Exact sync (replace all extensions)
76
- - Snippets:
77
- - Merge (source snippets override key conflicts in matching snippet files)
78
- - Replace (target snippets folder is replaced)
79
- 5. Choose one or more target editors.
80
- 6. Run sync.
81
-
82
- ### Settings merge behavior
83
-
84
- For `settings.json`, each target is merged as:
85
-
86
- ```js
87
- const merged = {
88
- ...targetSettings,
89
- ...sourceSettings,
90
- };
91
- ```
92
-
93
- What this means:
94
-
95
- - Shared/source settings win on key conflicts.
96
- - Existing unrelated target settings stay.
97
- - Editor-specific keys are preserved unless your source uses the same key.
98
-
99
- Example:
100
-
101
- Target:
102
-
103
- ```json
104
- {
105
- "terminal.integrated.fontSize": 14
106
- }
107
- ```
108
-
109
- Source:
110
-
111
- ```json
112
- {
113
- "editor.formatOnSave": true
114
- }
115
- ```
116
-
117
- Result:
118
-
119
- ```json
120
- {
121
- "terminal.integrated.fontSize": 14,
122
- "editor.formatOnSave": true
123
- }
124
- ```
125
-
126
- ## Supported editors
127
-
128
- These editors are currently supported:
129
-
130
- | Editor | CLI command |
131
- | ----------- | ------------- |
132
- | Antigravity | `antigravity` |
133
- | Cursor | `cursor` |
134
- | Kiro | `kiro` |
135
- | Trae | `trae` |
136
- | VS Code | `code` |
137
- | Windsurf | `windsurf` |
138
-
139
- **macOS**: Editors work with either option: install terminal command (recommended) or auto-detect from `/Applications/` if installed as `.app` bundles.
140
-
141
- **Windows/Linux**: Each editor must be installed and its CLI available in your terminal (e.g. `code`, `cursor`).
142
-
143
- ## License
144
-
145
- 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