Skip to content

CLI Reference

The fetchext CLI (command: fext) provides a comprehensive suite of tools for downloading, analyzing, and managing browser extensions.

Basic Usage

fext <command> [options]

Commands

download

Download an extension from a web store.

fext download <browser> <url> [options]

Aliases: d

Arguments:

  • browser: The target browser store. Supported values:
  • chrome (alias: c)
  • edge (alias: e)
  • firefox (alias: f)
  • url: The full URL of the extension page.

Options:

  • -o, --output-dir <dir>: Directory to save the downloaded file (default: current directory).
  • -m, --save-metadata: Save extension metadata (ID, version, name) to a JSON file.
  • -x, --extract: Automatically extract the extension contents to a folder.
  • --verify-hash <sha256>: Verify the downloaded file against a known SHA256 hash.
  • --quiet: Suppress output.
  • --verbose: Enable verbose logging.

Note: Downloads are resumable. If a download is interrupted, running the command again will resume from where it left off.

Search for extensions in a web store (currently supports Firefox).

fext search <browser> <query> [options]

Aliases: s

Options:

  • --json: Output results as JSON.
  • --csv: Output results as CSV.

inspect

Inspect the metadata (manifest) of a downloaded extension file.

fext inspect <file> [options]

Aliases: i

Options:

  • --json: Output results as JSON.

preview

List the contents of an extension archive without extracting it.

fext preview <file>

Aliases: p

extract

Extract an existing extension file (.crx, .xpi) to a directory.

fext extract <file> [-o <output_dir>]

Aliases: x

batch

Download multiple extensions from a batch file.

fext batch <file> [-o <output_dir>] [-w <workers>]

Aliases: b

Options:

  • -w, --workers <n>: Number of parallel downloads (default: 4).

audit

Audit an extension for Manifest V3 compatibility and deprecated APIs.

fext audit <file> [--json]

Aliases: a

risk

Analyze permission risks and calculate a privacy score.

fext risk <file> [--json]

Aliases: r

scan

Scan an extension for known vulnerable third-party libraries (e.g., jQuery, Lodash).

fext scan <file> [--json] [--csv]

analyze

Perform deep analysis on extension code.

fext analyze <file> [options]

Options:

  • --complexity: Calculate cyclomatic complexity of JavaScript files.
  • --entropy: Calculate Shannon entropy to detect obfuscation/packing.
  • --domains: Extract domains and URLs from source code.
  • --secrets: Scan for potential secrets (API keys, tokens).
  • --yara <path>: Scan against YARA rules (file or directory).
  • --json: Output results as JSON.

report

Generate a comprehensive report for an extension.

fext report <file> [options]

Options:

  • -o, --output <file>: Output file path (default: <filename>_REPORT.md).
  • --json: Output unified report as JSON.
  • --yara <path>: Include YARA scan results in the report.

diff

Compare two extension versions.

fext diff <old_file> <new_file> [--json]

verify

Cryptographically verify a CRX3 file signature.

fext verify <file> [--json]

locales

Inspect supported locales and message counts.

fext locales <file> [--json]

check

Check for updates of local extension files against the Web Store.

fext check <file_or_dir> [--json]

serve

Host the local repository as a Chrome/Edge Update Server.

fext serve [-d <directory>] [--host <host>] [-p <port>]

update-manifest

Generate update.xml (Chrome/Edge) or updates.json (Firefox) for self-hosted extensions.

fext update-manifest <directory> --base-url <url> [--output <file>]

Aliases: um

mirror

Synchronize a local directory with a list of extension IDs.

fext mirror <list_file> [-o <output_dir>] [--prune] [-w <workers>]

convert

Convert extensions between formats.

fext convert <input> --to <format> [-o <output>]

Supported Formats: zip

optimize

Losslessly compress images within an extension directory.

fext optimize <directory> [-q <quality>] [--json]

timeline

Visualize the modification timeline of files within an extension.

fext timeline <file> [--json]

graph

Generate a dependency graph of internal files.

fext graph <file> [-o <output.dot>]

stats

Analyze a directory of extensions for aggregate statistics.

fext stats <directory> [--json]

explain

Get a detailed explanation and risk assessment for a specific permission.

fext explain <permission> [--json]

plugin

Manage Python-based plugins.

fext plugin <command> [args]

Commands:

  • list: List installed plugins.
  • install <path>: Install a plugin.
  • enable <name>: Enable a plugin.
  • disable <name>: Disable a plugin.
  • remove <name>: Remove a plugin.

ui

Launch the terminal-based user interface (TUI).

fext ui

tutorial

Launch the interactive TUI tutorial.

fext tutorial

setup

Run the interactive configuration wizard.

fext setup

config

Manage configuration settings.

fext config [show|init]

schema

Get JSON schema for various outputs.

fext schema <type>

Types: config, audit, risk, history, scan.

clean

Clean up cache and temporary files.

fext clean [--cache] [--downloads] [--all] [--dry-run] [--force]