You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Adds
- `kernel extensions <list|delete|download|download-web-store>` for
managing extensions and also downloading them as unpacked extensions
from the chrome web store
- `kernel browsers extensions upload` to do an ad-hoc upload to a
running browser instance
Along the way:
- added an -o/--output json option to `browsers list`
- added the ability to pass more than one session ID to `browsers
delete`
---
<!-- mesa-description-start -->
## TL;DR
This PR introduces CLI commands to manage browser extensions, allowing
users to list, delete, download from the Chrome Web Store, and upload
extensions to browser instances.
## Why we made these changes
This addresses a feature request for programmatic control over browser
extensions. It enables users to automate the setup of browser profiles
with necessary extensions, improving developer workflow and consistency
across environments.
## What changed?
- **New `extensions` command:**
- Added a new top-level command `kernel extensions` for managing the
extension registry with `list`, `delete`, `download`, and
`download-web-store` subcommands.
- **Enhanced `browsers` command:**
- Added `browsers extensions upload` to install an extension in a
running browser.
- Added an `--extension` flag to `browsers create` to install extensions
on creation.
- Added a `-o/--output json` option to `browsers list`.
- Updated `browsers delete` to accept multiple session IDs.
- **Utilities & Dependencies:**
- Added a new `Unzip` utility in `pkg/util/zip.go` to handle extension
packages.
- Updated `go.mod` to replace the `kernel-go-sdk` dependency.
- **Documentation & Testing:**
- Updated `README.md` to document the new commands.
- Added comprehensive unit tests for the new functionality.
## Validation
- [ ] `kernel extensions list` correctly displays registered extensions.
- [ ] `kernel extensions delete` successfully removes an extension.
- [ ] `kernel extensions download-web-store` downloads and unpacks an
extension correctly.
- [ ] `kernel browsers extensions upload` successfully installs an
extension in a running browser.
<sup>_Description generated by Mesa. [Update
settings](https://app.mesa.dev/onkernel/settings/pull-requests)_</sup>
<!-- mesa-description-end -->
Copy file name to clipboardExpand all lines: README.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,12 +106,14 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
106
106
### App Deployment
107
107
108
108
-`kernel deploy <file>` - Deploy an app to Kernel
109
+
109
110
-`--version <version>` - Specify app version (default: latest)
110
111
-`--force` - Allow overwriting existing version
111
112
-`--env <KEY=VALUE>`, `-e` - Set environment variables (can be used multiple times)
112
113
-`--env-file <file>` - Load environment variables from file (can be used multiple times)
113
114
114
115
-`kernel deploy logs <deployment_id>` - Stream logs for a deployment
116
+
115
117
-`--follow`, `-f` - Follow logs in real-time (stream continuously)
116
118
-`--since`, `-s` - How far back to retrieve logs. Duration formats: ns, us, ms, s, m, h (e.g., 5m, 2h, 1h30m). Timestamps also supported: 2006-01-02, 2006-01-02T15:04, 2006-01-02T15:04:05, 2006-01-02T15:04:05.000
117
119
-`--with-timestamps`, `-t` - Include timestamps in each log line
@@ -234,6 +236,23 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
234
236
-`--mode <mode>` - File mode (octal string)
235
237
-`--source <path>` - Local source file path (required)
236
238
239
+
### Browser Extensions
240
+
241
+
-`kernel browsers extensions upload <id or persistent id> <extension-path>...` - Ad-hoc upload of one or more unpacked extensions to a running browser instance.
242
+
243
+
### Extension Management
244
+
245
+
-`kernel extensions list` - List all uploaded extensions
extensionsRoot:=&cobra.Command{Use: "extensions", Short: "Add browser extensions to a running instance"}
1471
+
extensionsUpload:=&cobra.Command{Use: "upload <id|persistent-id> <extension-path>...", Short: "Upload one or more unpacked extensions and restart Chromium", Args: cobra.MinimumNArgs(2), RunE: runBrowsersExtensionsUpload}
1472
+
extensionsRoot.AddCommand(extensionsUpload)
1473
+
browsersCmd.AddCommand(extensionsRoot)
1474
+
1322
1475
// Add flags for create command
1323
1476
browsersCreateCmd.Flags().StringP("persistent-id", "p", "", "Unique identifier for browser session persistence")
1324
1477
browsersCreateCmd.Flags().BoolP("stealth", "s", false, "Launch browser in stealth mode to avoid detection")
@@ -1328,6 +1481,7 @@ func init() {
1328
1481
browsersCreateCmd.Flags().String("profile-name", "", "Profile name to load into the browser session (mutually exclusive with --profile-id)")
1329
1482
browsersCreateCmd.Flags().Bool("save-changes", false, "If set, save changes back to the profile when the session ends")
1330
1483
browsersCreateCmd.Flags().String("proxy-id", "", "Proxy ID to use for the browser session")
1484
+
browsersCreateCmd.Flags().StringSlice("extension", []string{}, "Extension IDs or names to load (repeatable; may be passed multiple times or comma-separated)")
0 commit comments