@siamriaz/octomux 1.0.0 โ 1.1.1
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/LICENSE +21 -21
- package/README.md +315 -272
- package/dist/bin/octomux.js +1 -1
- package/dist/bin/octomux.js.map +1 -1
- package/dist/{chunk-3NCQOE6V.js โ chunk-7F27QTP5.js} +1110 -113
- package/dist/chunk-7F27QTP5.js.map +1 -0
- package/dist/index.d.ts +608 -1
- package/dist/index.js +25 -1
- package/package.json +71 -68
- package/dist/chunk-3NCQOE6V.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Octomux Contributors
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Octomux Contributors
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,272 +1,315 @@
|
|
|
1
|
-
# ๐ octomux (`omx`)
|
|
2
|
-
|
|
3
|
-
[](https://www.typescriptlang.org/)
|
|
5
|
-
[](https://opensource.org/licenses/MIT)
|
|
6
|
-
[]()
|
|
7
|
-
[ with zero SSH collisions and zero commit identity mistakes.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## โจ Features
|
|
16
|
-
|
|
17
|
-
- ๐ **Multi-Account & SSH Engine**: Add, edit, list, and switch between unlimited GitHub accounts with automated Ed25519/RSA SSH key generation.
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
npx
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
โ
|
|
57
|
-
โ โ
|
|
58
|
-
โ โ
|
|
59
|
-
โ โ
|
|
60
|
-
โ โ
|
|
61
|
-
โ โ
|
|
62
|
-
โ โ
|
|
63
|
-
โ โ
|
|
64
|
-
โ โ
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
--
|
|
83
|
-
--
|
|
84
|
-
--
|
|
85
|
-
--
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
omx account
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
omx account
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
#
|
|
163
|
-
omx
|
|
164
|
-
|
|
165
|
-
#
|
|
166
|
-
omx
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
#
|
|
182
|
-
omx
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
#
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
1
|
+
# ๐ octomux (`omx`)
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@siamriaz/octomux)
|
|
4
|
+
[](https://www.typescriptlang.org/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[]()
|
|
7
|
+
[](https://vitest.dev/)
|
|
8
|
+
|
|
9
|
+
> **Enterprise-grade, cross-platform GitHub multi-account multiplexer, SSH identity manager, and smart repository clone CLI.**
|
|
10
|
+
|
|
11
|
+
Seamlessly manage multiple GitHub accounts (Work, Personal, Client, Open Source) with zero SSH collisions and zero commit identity mistakes.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## โจ Features
|
|
16
|
+
|
|
17
|
+
- ๐ **Multi-Account & SSH Engine**: Add, edit, list, and switch between unlimited GitHub accounts with automated Ed25519/RSA SSH key generation.
|
|
18
|
+
- ๐ **SSH Key Rotation & Account Updates**: Rotate keys on the fly, replace with discovered or custom keys, rename account aliases, and update GPG signing keys or Personal Access Tokens (PAT).
|
|
19
|
+
- ๐ **Automatic SSH Key Discovery**: Automatically scans `~/.ssh/` for existing keys and imports them with one click.
|
|
20
|
+
- ๐ก๏ธ **Zero-Data-Loss SSH Sync**: Safely syncs `~/.ssh/config` using isolated block delimiters (`# === OCTOMUX MANAGED HOSTS ===`) with automated backups (`.bak`).
|
|
21
|
+
- ๐ **Local & Global Identity Switcher**: Instantly toggle `user.name`, `user.email`, and `core.sshCommand` globally or per repository.
|
|
22
|
+
- ๐ **Remote Origin Helper**: `omx remote` or `omx origin` binds existing local repositories to dedicated SSH aliases with automated author and SSH key configuration.
|
|
23
|
+
- ๐ฆ **Smart Clone**: `omx clone owner/repo` automatically clones using the account's dedicated SSH Host alias and binds repository-local Git identities upon completion.
|
|
24
|
+
- ๐ป **Cross-Platform Compatibility**: Native support for **Windows** (PowerShell, CMD, Git Bash, OpenSSH), **macOS**, and **Linux** with POSIX path normalization and `chmod 0600` key permission handling.
|
|
25
|
+
- ๐จ **Dual-Mode Experience**: Modern interactive TUI wizard with `@clack/prompts` and non-interactive flags (`--json`, `--yes`, `--global`) for CI/CD scripting.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## ๐ Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Global installation via npm
|
|
33
|
+
npm install -g @siamriaz/octomux
|
|
34
|
+
|
|
35
|
+
# Or run directly via npx without installing
|
|
36
|
+
npx @siamriaz/octomux
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
*Both `octomux` and `omx` binary aliases are available upon installation.*
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## โก Quick Start
|
|
44
|
+
|
|
45
|
+
### Interactive Command Center
|
|
46
|
+
Simply run `omx` without arguments to open the interactive command center:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
omx
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
โ ๐ octomux (omx) โ GitHub Identity & SSH Manager
|
|
54
|
+
โ
|
|
55
|
+
โ What would you like to do?
|
|
56
|
+
โ โ ๐ List configured accounts
|
|
57
|
+
โ โ โ Add a new GitHub account
|
|
58
|
+
โ โ โ๏ธ Edit an existing account
|
|
59
|
+
โ โ ๐ Auto-import existing SSH keys
|
|
60
|
+
โ โ ๐ Switch Git identity (global / local)
|
|
61
|
+
โ โ ๐ Add or set remote origin for this repo
|
|
62
|
+
โ โ ๐ฆ Smart clone a repository
|
|
63
|
+
โ โ ๐ Check active Git & SSH status
|
|
64
|
+
โ โ โก Test SSH connections
|
|
65
|
+
โ โ ๐๏ธ Uninstall & clean up octomux
|
|
66
|
+
โ โ ๐ช Exit
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## ๐ Command Reference
|
|
72
|
+
|
|
73
|
+
### Account Management (`omx account` / `omx acc`)
|
|
74
|
+
|
|
75
|
+
#### 1. Add an Account (with Auto-Detected Keys)
|
|
76
|
+
```bash
|
|
77
|
+
# Interactive setup wizard (automatically scans ~/.ssh and shows detected keys)
|
|
78
|
+
omx account add
|
|
79
|
+
|
|
80
|
+
# Headless / scriptable setup
|
|
81
|
+
omx account add \
|
|
82
|
+
--alias work \
|
|
83
|
+
--username johndoe-corp \
|
|
84
|
+
--email john@company.com \
|
|
85
|
+
--git-name "John Doe" \
|
|
86
|
+
--keygen \
|
|
87
|
+
--global
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### 2. Edit & Rotate Account (`omx account edit`)
|
|
91
|
+
Update any aspect of an existing GitHub account profile:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Interactive modular editor (prompts to choose fields: Profile, SSH Key, Rename, Security, Global)
|
|
95
|
+
omx account edit work
|
|
96
|
+
|
|
97
|
+
# Update GitHub username and commit email
|
|
98
|
+
omx account edit work -u new-username -e new-email@company.com
|
|
99
|
+
|
|
100
|
+
# Rotate SSH key: generate a fresh Ed25519 key pair and test connection immediately
|
|
101
|
+
omx account edit work --generate-key --key-type ed25519 --test
|
|
102
|
+
|
|
103
|
+
# Link an existing private SSH key and delete previous key files from disk
|
|
104
|
+
omx account edit work --key-path ~/.ssh/id_custom_ed25519 --delete-old-key
|
|
105
|
+
|
|
106
|
+
# Rename an account alias (automatically migrates SSH host configs & global references)
|
|
107
|
+
omx account edit work --rename enterprise
|
|
108
|
+
|
|
109
|
+
# Update GPG commit signing key ID and GitHub Personal Access Token (PAT)
|
|
110
|
+
omx account edit work --signing-key 3AA5C34371567BD2 --token ghp_yourSecretToken
|
|
111
|
+
|
|
112
|
+
# Set account as active global Git identity
|
|
113
|
+
omx account edit work --global
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
##### Supported Edit Flags:
|
|
117
|
+
| Flag | Description |
|
|
118
|
+
| :--- | :--- |
|
|
119
|
+
| `--name <name>` | Update account display label |
|
|
120
|
+
| `-u, --username <username>` | Update GitHub username |
|
|
121
|
+
| `-e, --email <email>` | Update Git commit email |
|
|
122
|
+
| `-g, --git-name <name>` | Update Git author display name |
|
|
123
|
+
| `-k, --key-path <path>` | Path to an existing private SSH key |
|
|
124
|
+
| `--generate-key` | Generate a new SSH key pair |
|
|
125
|
+
| `--key-type <type>` | SSH key type: `ed25519` (default) or `rsa` |
|
|
126
|
+
| `--delete-old-key` | Delete previous SSH key files from disk upon replacement |
|
|
127
|
+
| `--rename <newAlias>` | Rename account alias identifier |
|
|
128
|
+
| `--host-alias <alias>` | Update custom SSH Host alias |
|
|
129
|
+
| `--signing-key <keyId>` | Update GPG commit signing key ID |
|
|
130
|
+
| `--token <token>` | Update GitHub Personal Access Token (PAT) |
|
|
131
|
+
| `--global` | Set this account as the active global Git identity |
|
|
132
|
+
| `--test` | Test SSH authentication with GitHub after updating |
|
|
133
|
+
| `--json` | Output updated profile in JSON format |
|
|
134
|
+
|
|
135
|
+
#### 3. Auto-Import Existing SSH Keys
|
|
136
|
+
```bash
|
|
137
|
+
# Interactive key auto-discovery & import wizard:
|
|
138
|
+
omx account import
|
|
139
|
+
# or shorthand:
|
|
140
|
+
omx import
|
|
141
|
+
|
|
142
|
+
# Import a specific existing private key directly:
|
|
143
|
+
omx import ~/.ssh/id_rsa_work --alias work --username johndoe --email john@work.com
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### 4. List Accounts
|
|
147
|
+
```bash
|
|
148
|
+
omx account list
|
|
149
|
+
# or shorthand:
|
|
150
|
+
omx ls
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
#### 5. Remove an Account
|
|
154
|
+
```bash
|
|
155
|
+
omx account remove work
|
|
156
|
+
# Delete associated SSH keys as well:
|
|
157
|
+
omx account remove work --delete-keys --yes
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
#### 6. Test SSH Connection
|
|
161
|
+
```bash
|
|
162
|
+
# Test specific profile
|
|
163
|
+
omx account test work
|
|
164
|
+
|
|
165
|
+
# Test all profiles
|
|
166
|
+
omx account test --all
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
### Identity Switcher (`omx switch` / `omx use`)
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# Interactive switcher (prompts for account and local/global scope)
|
|
176
|
+
omx switch
|
|
177
|
+
|
|
178
|
+
# Switch global Git configuration
|
|
179
|
+
omx switch work --global
|
|
180
|
+
|
|
181
|
+
# Switch local repository Git configuration & dedicated SSH key
|
|
182
|
+
omx switch work --local
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
### Status Check (`omx status` / `omx current`)
|
|
188
|
+
|
|
189
|
+
Inspect active global and local Git identities and match them against configured `octomux` profiles:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
omx status
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### Remote Origin Configuration (`omx remote` / `omx origin`)
|
|
198
|
+
|
|
199
|
+
Attach or update a Git remote origin for an existing local repository and automatically bind the local author and SSH key:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# Interactive wizard (prompts for repo URL/slug and account profile)
|
|
203
|
+
omx remote
|
|
204
|
+
|
|
205
|
+
# Set origin to a GitHub repository using a specific account profile:
|
|
206
|
+
omx remote owner/repo -a work
|
|
207
|
+
|
|
208
|
+
# Or with shorthand alias:
|
|
209
|
+
omx origin owner/repo -a personal
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### What `omx remote` does:
|
|
213
|
+
1. Translates the repo slug/URL into `git@github.com-<alias>:owner/repo.git`.
|
|
214
|
+
2. Adds or updates `origin` remote (`git remote add` or `git remote set-url`).
|
|
215
|
+
3. Automatically sets local repository `user.name`, `user.email`, and `core.sshCommand`.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
### Smart Clone (`omx clone`)
|
|
220
|
+
|
|
221
|
+
Clone any repository and automatically bind the local repository author name, email, and SSH key identity:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# Clone with interactive account picker
|
|
225
|
+
omx clone facebook/react
|
|
226
|
+
|
|
227
|
+
# Clone with explicit account identity
|
|
228
|
+
omx clone facebook/react -a work
|
|
229
|
+
|
|
230
|
+
# Clone into custom target directory
|
|
231
|
+
omx clone https://github.com/facebook/react.git my-react -a personal
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
#### What happens behind the scenes:
|
|
235
|
+
1. Translates the clone URL to `git@github.com-work:facebook/react.git`.
|
|
236
|
+
2. Runs `git clone`.
|
|
237
|
+
3. Navigates into the newly cloned repository directory and configures:
|
|
238
|
+
- `git config --local user.name "<gitUserName>"`
|
|
239
|
+
- `git config --local user.email "<email>"`
|
|
240
|
+
- `git config --local core.sshCommand "ssh -i <keyPath> -o IdentitiesOnly=yes"`
|
|
241
|
+
4. Guarantees every future `git commit` and `git push` in that repo will use the correct identity.
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## ๐ ๏ธ Architecture & Data Safety
|
|
246
|
+
|
|
247
|
+
### SSH Configuration Isolation (`~/.ssh/config`)
|
|
248
|
+
`octomux` isolates its host definitions inside marked delimiters. Your existing custom SSH entries are never modified or deleted:
|
|
249
|
+
|
|
250
|
+
```sshconfig
|
|
251
|
+
# Existing user configurations are preserved
|
|
252
|
+
Host my-vps
|
|
253
|
+
HostName 192.168.1.100
|
|
254
|
+
User root
|
|
255
|
+
|
|
256
|
+
# === OCTOMUX MANAGED HOSTS: START ===
|
|
257
|
+
# This block is automatically managed by octomux (omx).
|
|
258
|
+
Host github.com-work
|
|
259
|
+
HostName github.com
|
|
260
|
+
User git
|
|
261
|
+
IdentityFile "C:/Users/User/.ssh/id_ed25519_octomux_work"
|
|
262
|
+
IdentitiesOnly yes
|
|
263
|
+
|
|
264
|
+
Host github.com-personal
|
|
265
|
+
HostName github.com
|
|
266
|
+
User git
|
|
267
|
+
IdentityFile "C:/Users/User/.ssh/id_ed25519_octomux_personal"
|
|
268
|
+
IdentitiesOnly yes
|
|
269
|
+
# === OCTOMUX MANAGED HOSTS: END ===
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## ๐งช Testing
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# Run unit & integration tests
|
|
278
|
+
npm test
|
|
279
|
+
|
|
280
|
+
# Run type check
|
|
281
|
+
npm run typecheck
|
|
282
|
+
|
|
283
|
+
# Build bundle with tsup
|
|
284
|
+
npm run build
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## ๐งน Safe Uninstallation & Cleanup
|
|
290
|
+
|
|
291
|
+
To safely remove `octomux` configurations and clean up your system:
|
|
292
|
+
|
|
293
|
+
### 1. Using the Built-in Command:
|
|
294
|
+
```bash
|
|
295
|
+
# Clean ~/.ssh/config and ~/.octomux data (prompts for options)
|
|
296
|
+
omx uninstall
|
|
297
|
+
|
|
298
|
+
# Or completely purge everything including generated SSH keys without prompts:
|
|
299
|
+
omx uninstall --delete-keys --yes
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### 2. Remove the NPM Binary:
|
|
303
|
+
```bash
|
|
304
|
+
# If installed globally via npm:
|
|
305
|
+
npm uninstall -g @siamriaz/octomux
|
|
306
|
+
|
|
307
|
+
# If linked locally during development:
|
|
308
|
+
npm unlink -g octomux
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## ๐ License
|
|
314
|
+
|
|
315
|
+
MIT ยฉ [Octomux Contributors](LICENSE)
|