@involvex/ext-cli 1.0.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/README.md ADDED
@@ -0,0 +1,177 @@
1
+ # ext-cli
2
+
3
+ A CLI tool for downloading, extracting, packing, searching, and launching Chrome/Edge extensions.
4
+
5
+ ## Features
6
+
7
+ - Download extensions from Chrome Web Store and Edge Add-ons
8
+ - Extract CRX files to directories
9
+ - Pack directories into signed CRX files
10
+ - Search for extensions in both stores
11
+ - Launch Edge with extensions loaded (local or from store)
12
+
13
+ ## Installation
14
+
15
+ ### From source
16
+
17
+ ```bash
18
+ git clone https://github.com/yourusername/chrome-ext-manager.git
19
+ cd chrome-ext-manager
20
+ bun install
21
+ ```
22
+
23
+ ### Build binary
24
+
25
+ ```bash
26
+ bun run build
27
+ ```
28
+
29
+ This creates `dist/ext-cli.exe`.
30
+
31
+ ## Usage
32
+
33
+ ### Search for extensions
34
+
35
+ ```bash
36
+ ext-cli search "ublock"
37
+ ext-cli search "dark reader"
38
+ ext-cli search "ad blocker"
39
+ ```
40
+
41
+ ### Download an extension
42
+
43
+ From a Chrome Web Store URL:
44
+
45
+ ```bash
46
+ ext-cli get "https://chromewebstore.google.com/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm"
47
+ ```
48
+
49
+ From an Edge Add-ons URL:
50
+
51
+ ```bash
52
+ ext-cli get "https://microsoftedge.microsoft.com/addons/detail/ublock-origin/odionnohbojikenmjlgaemjcdhjlhpgf"
53
+ ```
54
+
55
+ From a bare extension ID:
56
+
57
+ ```bash
58
+ ext-cli get cjpalhdlnbpafiamejdnhcphjbkeiagm
59
+ ```
60
+
61
+ With extraction:
62
+
63
+ ```bash
64
+ ext-cli get "https://chromewebstore.google.com/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm" -e
65
+ ```
66
+
67
+ To a specific directory:
68
+
69
+ ```bash
70
+ ext-cli get cjpalhdlnbpafiamejdnhcphjbkeiagm -d ./extensions
71
+ ```
72
+
73
+ ### Extract a CRX file
74
+
75
+ ```bash
76
+ ext-cli extract extension.crx
77
+ ext-cli extract extension.crx -d ./output
78
+ ```
79
+
80
+ ### Pack a directory into CRX
81
+
82
+ ```bash
83
+ ext-cli pack ./extension-dir
84
+ ext-cli pack ./extension-dir -o output.crx
85
+ ```
86
+
87
+ ### Launch Edge with an extension
88
+
89
+ Launch a local extension directory:
90
+
91
+ ```bash
92
+ ext-cli launch --extension ./my-extension
93
+ ```
94
+
95
+ Launch a CRX file (auto-extracts to temp directory):
96
+
97
+ ```bash
98
+ ext-cli launch --extension ./extension.crx
99
+ ```
100
+
101
+ Launch headless with a specific URL:
102
+
103
+ ```bash
104
+ ext-cli launch --extension ./my-extension --headless --url https://example.com
105
+ ```
106
+
107
+ Launch with a custom debugging port and keep open for debugging:
108
+
109
+ ```bash
110
+ ext-cli launch --extension ./my-extension --port 9222 --keep-open
111
+ ```
112
+
113
+ ### Download, extract, and launch a store extension (for testing)
114
+
115
+ ```bash
116
+ ext-cli test "https://chromewebstore.google.com/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm"
117
+ ```
118
+
119
+ With headless mode:
120
+
121
+ ```bash
122
+ ext-cli test "cjpalhdlnbpafiamejdnhcphjbkeiagm" --headless
123
+ ```
124
+
125
+ ### Show Edge installation path
126
+
127
+ ```bash
128
+ ext-cli edge-path
129
+ ```
130
+
131
+ ## Development
132
+
133
+ ### Prerequisites
134
+
135
+ - [Bun](https://bun.sh) >= 1.3.0
136
+
137
+ ### Setup
138
+
139
+ ```bash
140
+ bun install
141
+ ```
142
+
143
+ ### Commands
144
+
145
+ ```bash
146
+ # Run the CLI
147
+ bun run src/cli.ts search "ublock"
148
+
149
+ # Run tests
150
+ bun test
151
+
152
+ # Type check
153
+ bun run typecheck
154
+
155
+ # Lint
156
+ bun run lint
157
+
158
+ # Format
159
+ bun run format
160
+
161
+ # Build binary
162
+ bun run build
163
+ ```
164
+
165
+ ## Architecture
166
+
167
+ - `src/cli.ts` - CLI entry point with commander
168
+ - `src/url-parser.ts` - Parse store URLs and extension IDs
169
+ - `src/downloader.ts` - Download CRX files from stores
170
+ - `src/extractor.ts` - Extract CRX to directories
171
+ - `src/packer.ts` - Pack directories into signed CRX3 files
172
+ - `src/search.ts` - Search Chrome Web Store and Edge Add-ons
173
+ - `src/launcher.ts` - Launch Edge with extensions via chromium-edge-launcher
174
+
175
+ ## License
176
+
177
+ MIT
package/biome.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.5.2/schema.json",
3
+ "files": {
4
+ "includes": ["src/**", "test/**"]
5
+ },
6
+ "formatter": {
7
+ "indentStyle": "space",
8
+ "indentWidth": 2,
9
+ "lineWidth": 100
10
+ },
11
+ "linter": {
12
+ "rules": {
13
+ "correctness": {
14
+ "noUnusedVariables": "warn",
15
+ "noUnusedImports": "warn"
16
+ }
17
+ }
18
+ },
19
+ "javascript": {
20
+ "formatter": {
21
+ "quoteStyle": "double",
22
+ "semicolons": "always"
23
+ }
24
+ }
25
+ }