fx
Inspect JSON data in the terminal
SYNOPSIS
fx [options] [profile]
PARAMETERS
-h, --help
Display help information.
-v, --verbose
Enable verbose logging.
-p
Specify the Firefox profile to use. If not specified, the default profile is used.
-f
Execute a JavaScript file.
-e
Evaluate a JavaScript expression.
--version
Display version information
DESCRIPTION
fx is a command-line tool providing an interactive JavaScript shell connected to a running Firefox instance or a Firefox profile. It is primarily a developer tool used for inspecting and manipulating the browser's internal state, debugging, and prototyping extensions. With fx, developers can directly interact with the browser's content, chrome, and services via JavaScript commands. This allows for detailed examination of browser behavior, testing of various browser features, and rapid experimentation with code snippets in a real-time environment.
fx is useful for Firefox extension developers, Gecko engineers, and anyone looking to gain deep insights into the inner workings of Firefox. It provides access to a wealth of internal APIs and objects which allows in-depth analysis and manipulation of the browser.
CAVEATS
fx relies on the Firefox Remote Debugging Protocol. Ensure Remote Debugging is enabled in Firefox settings.
EXAMPLES
fx - Starts an interactive shell connected to the default Firefox profile.
fx -p myprofile - Starts an interactive shell connected to the 'myprofile' Firefox profile.
fx -e 'window.content.document.title' - Executes a JavaScript expression and prints the result.
fx -f myscript.js - Executes JavaScript commands found in 'myscript.js' against firefox.
HISTORY
fx emerged as a development tool alongside the increasing complexity of the Firefox browser and the need for better debugging and inspection capabilities. It provides a more direct and interactive way to access and manipulate Firefox's internal state than traditional debugging methods.