## fx command

For help with specific subcommands, see [Overview page](https://fuchsia.dev/reference/tools/fx.md.txt).

    Run Fuchsia development commands. Must be run from a directory
    that is contained in a Platform Source Tree.

    fx help flags: fx help [OPTION]
      --no-contrib      Hide contrib commands (see //tools/devshell/README.md)
      --deprecated      Do not hide deprecated commands

    Global fx options: fx [OPTION]  ...
      --dir=BUILD_DIR                  Path to the build directory to use when running COMMAND.
      -t|--target DEVICE[:SSH_PORT]    Target a specific device.
                                       DEVICE may be a Fuchsia device name to be resolved using
                                       ffx or an IP address.
                                       An IPv4 address must be specified directly, while an IPv6
                                       need to be surrounded by brackets.
                                       SSH_PORT, if specified, will be used for all commands
                                       that rely on SSH to connect to the device instead of the
                                       default SSH port (22).
                                       Note: See "fx help set-device" for more help and to set
                                       the default device for a BUILD_DIR.
      -i                               Iterative mode. Repeat the command whenever a file is
                                       modified under your Fuchsia directory, not including
                                       out/.
      -x                               Print commands and their arguments as they are executed.
      -xx                              Print extra logging of the fx tool itself (implies -x)
      --no-build                       Skip building registered Bazel/GN host tools; fail if missing.
      --build                          Force building registered Bazel host tools on invocation.
      --invoker=INVOKER                Override the command invoker for metrics and logging.
      --enable|disable=FEATURE  Enable or disable a feature (non-persistent). Valid features:
          fxtest_auto_publishes_packages
                (default=enabled, current=enabled)
                Enables 'fx test' to automatically publish packages to the package
                repository server.
          incremental
                (default=enabled, current=enabled)
                Packages are published and served incrementally by 'fx serve'
                as they are built. Explicit 'fx build' is not required for most operations.
          incremental_legacy
                (default=disabled, current=disabled)
                Packages are published and served incrementally by 'fx serve'
                as they are built using the legacy incremental publisher. Explicit
                'fx build' is not required for most operations.
          incremental_new
                (default=disabled, current=disabled)
                Packages are published and served incrementally by 'fx serve'
                as they are built. Explicit 'fx build' is not required for most operations.
          legacy_fastboot
                (default=disabled, current=disabled)
                Device provisioning based on legacy fastboot instead of ffx.

[fx source code](https://cs.opensource.google/fuchsia/fuchsia/+/main:scripts/fx)