The fetchext CLI (command: fext) provides a comprehensive suite of tools for downloading, analyzing, and managing browser extensions.
fext <command> [options]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. This includes full HTTP request/response headers (with sensitive data redacted) and status codes for debugging network issues.
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 the metadata (manifest) of a downloaded extension file.
fext inspect <file> [options]Aliases: i
Options:
--json: Output results as JSON.
List the contents of an extension archive without extracting it.
fext preview <file>Aliases: p
Extract an existing extension file (.crx, .xpi) to a directory.
fext extract <file> [-o <output_dir>]Aliases: x
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 an extension for Manifest V3 compatibility and deprecated APIs.
fext audit <file> [--json]Aliases: a
Analyze permission risks and calculate a privacy score.
fext risk <file> [--json]Aliases: r
Scan an extension for known vulnerable third-party libraries (e.g., jQuery, Lodash).
fext scan <file> [--json] [--csv]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.
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.
Compare two extension versions.
fext diff <old_file> <new_file> [--json] [--ast]Options:
--json: Output results as JSON.--ast: Use AST-based comparison for JavaScript files (ignores whitespace and comments).
Cryptographically verify a CRX3 file signature.
fext verify <file> [--json]Inspect supported locales and message counts.
fext locales <file> [--json]Check for updates of local extension files against the Web Store.
fext check <file_or_dir> [--json]Host the local repository as a Chrome/Edge Update Server.
fext serve [-d <directory>] [--host <host>] [-p <port>]Generate update.xml (Chrome/Edge) or updates.json (Firefox) for self-hosted extensions.
fext update-manifest <directory> --base-url <url> [--output <file>]Aliases: um
Synchronize a local directory with a list of extension IDs.
fext mirror <list_file> [-o <output_dir>] [--prune] [-w <workers>]Convert extensions between formats.
fext convert <input> --to <format> [-o <output>]Supported Formats: zip
Losslessly compress images within an extension directory.
fext optimize <directory> [-q <quality>] [--json]Visualize the modification timeline of files within an extension.
fext timeline <file> [--json]Generate a dependency graph of internal files.
fext graph <file> [-o <output.dot>]Analyze a directory of extensions for aggregate statistics.
fext stats <directory> [--json]Get a detailed explanation and risk assessment for a specific permission.
fext explain <permission> [--json]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.
Pack an extension directory into a .crx file.
fext pack <directory> [options]Options:
--pem <file>: Path to private key file (generated if not exists).--out <file>: Output filename.
Migrate a Manifest V2 extension to Manifest V3.
fext migrate <directory> [options]Options:
--in-place: Modify files in place.
Launch the terminal-based user interface (TUI).
fext uiLaunch the interactive TUI tutorial.
fext tutorialRun the interactive configuration wizard.
fext setupManage configuration settings.
fext config [show|init]Get JSON schema for various outputs.
fext schema <type>Types: config, audit, risk, history, scan.
Share a report file via a configured provider (e.g., GitHub Gist).
fext share <file> [--provider <provider>] [--description <text>]Options:
--provider: Sharing provider (default:gist).--description: Description for the shared file.
Monitor a directory for new extensions and automatically process them.
fext watch <directory> [--extract] [--report] [--scan]Options:
--extract: Automatically extract new extensions.--report: Automatically generate reports.--scan: Automatically scan for vulnerabilities.
Manage analysis rules.
fext rules sync [--url <url>] [--dir <dir>]Subcommands:
sync: Download or update community rules from a git repository.
Options:
--url: Git repository URL (overrides config).--dir: Local directory to sync to (overrides config).
Clean up cache and temporary files.
fext clean [--cache] [--downloads] [--all] [--dry-run] [--force]The CLI returns the following exit codes to indicate the status of the operation:
| Code | Name | Description |
|---|---|---|
| 0 | SUCCESS |
Command completed successfully. |
| 1 | ERROR |
Generic error (catch-all). |
| 2 | USAGE |
Invalid arguments or usage error. |
| 3 | NETWORK |
Network connection failed (DNS, timeout, connection refused). |
| 4 | IO |
File system error (permission denied, disk full, file not found). |
| 5 | CONFIG |
Configuration error (invalid config file, missing keys). |
| 6 | NOT_FOUND |
Resource not found (extension ID, file). |
| 7 | SECURITY |
Security check failed (signature verification, risk threshold). |
| 8 | CANCELLED |
Operation cancelled by user (Ctrl+C). |
| 9 | DEPENDENCY |
Missing external dependency. |