Forrest logo
tool overview
On this page you find all important commands for the CLI tool web-ext. If the command you are looking for is missing please ask our AI.

web-ext

Web-ext is a command line tool released by Mozilla for developing and testing web extensions. It allows developers to easily build, run, and debug their extensions for various browsers, including Firefox, Chrome, and Edge.

With web-ext, developers can quickly generate a scaffold for a new extension project, including all the necessary files and folders. This tool also provides a built-in web server that allows developers to test their extensions in a local environment. It automatically reloads the extension when changes are made, making the development process efficient and convenient.

Web-ext offers a wide range of commands and options, allowing developers to perform tasks like validating their extension's manifest, linting their code, and running comprehensive tests. It also provides support for internationalization and localization of the extension's messages.

This command line tool has a watch mode that can continuously monitor the extension's files for changes and build and reload the extension accordingly. It also offers a browser-specific feature, which allows developers to target a particular browser and execute commands specific to that browser.

Web-ext supports the use of APIs and frameworks like browser.runtime, browser.tabs, and more, to create powerful and interactive extension functionalities. Developers can also interact with the extension through a browser console for testing and debugging purposes.

Web-ext is an open-source tool and readily available for installation via npm. It's actively maintained by Mozilla and has a growing developer community that contributes to its development and improvement. Overall, web-ext simplifies the process of developing, testing, and debugging web extensions, empowering developers to create robust and feature-rich browser extensions efficiently.

List of commands for web-ext:

  • web-ext:tldr:09cf7 web-ext: Run the web extension in the current directory in Firefox.
    $ web-ext run
    try on your machine
    explain this command
  • web-ext:tldr:0e731 web-ext: Run a web extension from a specific directory in Firefox.
    $ web-ext run --source-dir ${path-to-directory}
    try on your machine
    explain this command
  • web-ext:tldr:13194 web-ext: Display verbose execution output.
    $ web-ext run --verbose
    try on your machine
    explain this command
  • web-ext:tldr:507e7 web-ext: Build and package the extension.
    $ web-ext build
    try on your machine
    explain this command
  • web-ext:tldr:760b3 web-ext: Run a web extension in Firefox Android.
    $ web-ext run --target firefox-android
    try on your machine
    explain this command
  • web-ext:tldr:abf1e web-ext: Lint the manifest and source files for errors.
    $ web-ext lint
    try on your machine
    explain this command
  • web-ext:tldr:ccfbe web-ext: Display verbose build output.
    $ web-ext build --verbose
    try on your machine
    explain this command
  • web-ext:tldr:e2e0e web-ext: Sign a package for self-hosting.
    $ web-ext sign --api-key ${api_key} --api-secret ${api_secret}
    try on your machine
    explain this command
tool overview