base on 🧩 The cross-browser extension framework [npm-version-image]: https://img.shields.io/npm/v/extension.svg?color=0971fe [npm-version-url]: https://www.npmjs.com/package/extension [downloads-image]: https://img.shields.io/npm/dm/extension.svg?color=2ecc40 [downloads-url]: https://npmjs.org/package/extension [action-image]: https://github.com/extension-js/extension.js/actions/workflows/ci.yml/badge.svg?branch=main&color=2ecc40 [action-url]: https://github.com/extension-js/extension.js/actions [discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=2ecc40 [discord-url]: https://discord.gg/v9h2RgeTSN [snyk-image]: https://snyk.io/test/github/extension-js/extension/badge.svg?color=2ecc40 [snyk-url]: https://snyk.io/test/github/extension-js/extension > The cross-browser extension framework # Extension.js [![Version][npm-version-image]][npm-version-url] [![Downloads][downloads-image]][downloads-url] [![workflow][action-image]][action-url] [![discord][discord-image]][discord-url] <img alt="Logo" align="right" src="https://avatars.githubusercontent.com/u/172809806" width="20%" /> - [Create A New Extension](#create-a-new-extension) — How to create a new extension. - [Get Started Immediately](#get-started-immediately) — Get work done in no time. - [Start From An Example](https://github.com/extension-js/extension.js/tree/main/examples) — Start with your favorite tool. - [I have An Extension](#i-have-an-extension) — Use only specific parts of Extension.js. Extension.js makes it very easy to develop cross-browser extensions.<br />Developers prefer it for its fast builds, unified interface, and zero configuration setup. ## Create A New Extension Use the `create` command to generate a new extension. Also works with pnpm, yarn, and bun. ```bash npx extension@latest create my-extension cd my-extension npm run dev ``` ### Watch Demo https://github.com/cezaraugusto/extension/assets/4672033/7263d368-99c4-434f-a60a-72c489672586 ## Web Standards and Framework Support <!-- For a preview of extensions running these technologies, see the [templates](https://templates.extension.land) website. --> <div align="center"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/a9e2541a-96f0-4caa-9fc9-5fc5c3e901c8" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/b42c5330-9e2a-4045-99c3-1f7d264dfaf4" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/f19edff3-9005-4f50-b05c-fba615896a7f" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/ff64721d-d145-4213-930d-e70193f8d57e" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/15f1314a-aa65-4ce2-a3f3-cf53c4f730cf" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/de1082fd-7cf6-4202-8c12-a5c3cd3e5b42" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/8807efd9-93e5-4db5-a1d2-9ac524f7ecc2" width="70"> | | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | | ESNext<br>[Try out](https://templates.extension.land/javascript) | TypeScript<br>[Try out](https://templates.extension.land/typescript) | WASM<br>(soon) | React<br>[Try out](https://templates.extension.land/react) | Vue<br>[Try out](https://templates.extension.land/vue) | Svelte<br>[Try out](https://templates.extension.land/svelte) | Preact<br>[Try out](https://templates.extension.land/preact) | </div> ## Get Started Immediately Start developing an extension using a sample from Chrome Extension Samples See the example below where we request the sample [page-redder](https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/functional-samples/sample.page-redder) from [Google Chrome Extension Samples](https://github.com/GoogleChrome/chrome-extensions-samples). ### Watch Demo https://github.com/cezaraugusto/extension/assets/4672033/ee221a94-6ec7-4e04-8553-8812288927f1 ### Try Yourself ```bash npx extension@latest dev https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/functional-samples/sample.page-redder --browser=edge ``` </details> ## I have An Extension If you have an existing extension which is using a package manager, you can install the Extension.js package and manually create the scripts used to run your extension. ### See How It Works https://github.com/cezaraugusto/extension/assets/4672033/48694a23-b7f1-4098-9c5d-eff49983739c **Step 1 - Install extension as a `devDependency`** ```bash npm install extension@latest --save-dev ``` **Step 2 - Link your npm scripts with the executable Extension.js commands** ```json { "scripts": { "build": "extension build", "dev": "extension dev", "preview": "extension preview" }, "devDependencies": { // ...other dependencies "extension": "latest" } } ``` Done. You are all set! - To develop the extension, run `npm run dev`. - To build the extension in production mode, run `npm run build`. - To visualize the extension in production mode, run `npm run build` and `npm run preview`. ## Using a specific browser for development | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/chromium/chromium.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox.svg" width="70"> | | :-----------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | | Chrome browser<br>āœ… | Edge browser<br>āœ… | Firefox browser<br>āœ… | Safari browser<br>(soon) | Chromium-based<br>āœ… | Gecko-based<br>āœ… | ### Browser flags and custom binaries Use these flags with `extension dev`, `extension start`, or `extension preview`: - Select a browser: `--browser <chrome | edge | firefox>` - Custom Chromium binary: `--chromium-binary <path-to-binary>` - Custom Gecko (Firefox) binary: `--gecko-binary <path-to-binary>` Examples: ```bash # Chrome (system default) npx extension@latest dev --browser=chrome # Edge npx extension@latest dev --browser=edge # Custom Chrome/Chromium path npx extension@latest dev --chromium-binary "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" # Custom Firefox path npx extension@latest dev --gecko-binary "/Applications/Firefox.app/Contents/MacOS/firefox" ``` <div align="center"> <p> <span style="font-size:21px; color:black;">Browser testing via</span><br> <a href="https://www.lambdatest.com/?utm_source=extensionjs&utm_medium=sponsor" target="_blank"> <img src="https://www.lambdatest.com/blue-logo.png" width="250" height="45" alt="LambdaTest Logo" /> </a> </p> </div> ## License MIT (c) Cezar Augusto and the Extension.js Authors. ", Assign "at most 3 tags" to the expected json: {"id":"9818","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"