fx is the entry-point for a set of subcommands that make many tasks related to Fuchsia development easier.
It contains a large number of subcommands. Run fx help to see all the available subcommands. If you use bash or zsh as a shell, source scripts/fx-env.sh
to get some auto-completion.
Also see the global options and flags that affect all subcommands.
Subcommands that are part of the fx workflow.
| Command | Category | Description |
|---|---|---|
| add-update-source | Software delivery | register dev host as target's update source |
| args | Build | manually edit args.gn for the current build directory |
| bazel | Build | Run experimental Bazel build for Fuchsia platform tree |
| bootfs-size-report | Run, inspect and debug | produce an uncompressed size report from a ZBI |
| build | Build | Run Ninja to build Fuchsia |
| build-metrics | Other | manage build metrics configuration |
| build-push | Software delivery | DEPRECATED! build Fuchsia and push to device |
| cipd | Source tree | run the cipd command line tool |
| clean | Build | clean the current Fuchsia build artifacts |
| clean-build | Build | Clean the build directory and then perform a full build |
| cleandead | Build | Delete stale generated files in the build output directory. |
| cleandead-build | Build | Delete stale generated files and then perform a full build. |
| cmc | Build | Component manifest compiler |
| cp | Device management | copy a file to/from a target device |
| create | Source tree | Scaffold new projects |
| doc-checker | Code submission and review | Check the markdown documentation using a variety of checks. |
| exec | Other | read the current build config, then exec |
| fargo | Build | Fargo is a prototype Fuchsia-specific wrapper around Cargo |
| fetch-build-artifacts | Build | TODO(fxbug.dev/60881): under construction. |
| flash | Device management | flash and, optionally, pave a connected device |
| flash-remote | Other | Remotely build, fetch and flash |
| gen | Build | run gn gen against the Fuchsia build directories. |
| get-build-artifacts | Internal api | DEPRECATED! Renamed to list-build-artifacts |
| get-build-dir | Build | print the current fuchsia build directory |
| get-device | Device discovery | print the current selected device name |
| get-device-addr | Device discovery | print the Fuchsia address of the current selected device |
| get-src-dir | Build | print the Fuchsia source directory (checkout root, aka “//”) |
| get-workspace-dir | Build | print the Bazel workspace directory |
| gn | Build | meta-build system that generates build files for Ninja |
| go | Build | Manage Go source code |
| goma_auth | Build | set up authentication for the Goma distributed compilation client |
| goma_ctl | Build | control the local Goma distributed compilation client |
| helpdoc | Documentation | create markdown docs for fx subcommands |
| host-tool | Run, inspect and debug | run a host tool produced by the build |
| is-package-server-running | Software delivery | check if the package server is running |
| jiri | Source tree | multi-purpose tool for multi-repo development. |
| jq | Other | jq is a utility for manipulating JSON on the command-line. |
| jq5 | Build | Extends the functionality of jq to json5 objects. |
| klog | Run, inspect and debug | listen for kernel logs |
| list-boards | Build | list boards available for building |
| list-build-artifacts | Internal api | Builds and returns a list of a desired set of build artifacts |
| list-devices | Device discovery | list all nearby devices (excluding those on zedboot) |
| list-packages | Build | list packages are built |
| list-products | Build | list products available for building |
| list-usb-disks | Other | list attached usb disks |
| log | Run, inspect and debug | listen for logs from the on-device log_listener |
| mdlint | Code submission and review | Markdown linter |
| mem | Diagnostic | invoke mem tool on target device |
| merge-package-config | Other | |
| metrics | Other | manage collection of metrics in fx tools |
| mkzedboot | Software delivery | make a zedboot USB key |
| mkzedboot-remote | Software delivery | make a zedboot USB key |
| multi | Other | Run an fx command across multiple build directories. |
| netaddr | Device discovery | get the address of a running fuchsia system |
| netboot | Software delivery | run bootserver for netbooting |
| netboot-remote | Other | Remotely build, fetch and netboot |
| netls | Device discovery | list running fuchsia systems on the local network |
| ninja | Build | directly run the build system. Don't use for regular workflows. |
| ninjatrace2json | Build | Collect Ninja trace information for analysis in chrome://tracing |
| node-names | Device management | find other names for the same node |
| ota | Software delivery | perform a system OTA on a connected device |
| pave | Software delivery | run bootserver for paving |
| pave-remote | Other | Remotely build, fetch and pave |
| pave-zedboot | Software delivery | run bootserver for paving zedboot |
| pave-zedboot-remote | Other | Remotely build, fetch and pave zedboot |
| push-package | Software delivery | DEPRECATED! push packages to a device |
| qemu | Run, inspect and debug | start fuchsia in qemu with a FVM disk |
| reboot | Device management | reboot a target fuchsia system |
| report-bug | Software delivery | report a bug for an fx command |
| repro | Build | Locally replicate the result of infra builds and tests |
| rfc | Source tree | Scaffold new RFCs |
| run-host-tests | Test | DEPRECATED! build and run tests on host |
| run-in-build-dir | Build | Run the given command at the root of the current build directory |
| run-netboot | Run, inspect and debug | start fuchsia in qemu via netboot |
| scp | Device management | invoke scp with the build ssh config |
| self-build | Build | build the minimal host dependencies to run fx main workflows |
| self-test | Test | run tests of fx and subcommands |
| serial | Device management | attach to a serial console |
| serve | Software delivery | start pave and serve-updates in a single command |
| serve-remote | Other | serve from a remote workstation |
| serve-updates | Software delivery | start the update server and attach to a running fuchsia device |
| set | Build | set up a build directory |
| set-build-dir | Build | set the default build directory used by other fx commands |
| set-device | Device discovery | set the default device to interact with |
| setup-macos | Other | register host tools at MacOS Application Firewall |
| setup-ufw | Other | setup Linux firewall rules to allow Fuchsia device and emulator traffic. |
| sftp | Device management | invoke sftp with the build ssh config |
| shell | Device management | start a remote interactive shell in the target device |
| ssh | Device management | invoke ssh with the keys from $FUCHSIA_BUILD_DIR/ssh-keys |
| status | Other | print relevant information about the developer setup |
| symbolize | Run, inspect and debug | Deprecated, please use “ffx debug symbolize” |
| sync-to | Source tree | Sync the local Fuchsia source tree to a given state |
| syslog | Run, inspect and debug | DEPRECATED! [deprecated] alias for fx log |
| test | Test | Entry point for all Fuchsia tests (host, target and end-to-end) |
| testgen | Test | Component integration test auto-generator |
| unset-device | Device discovery | unset the default device to interact with |
| update | Software delivery | DEPRECATED! [deprecated] alias for fx ota |
| update-if-in-base | Software delivery | check if packages are in base and update the device if needed |
| use | Build | re-use a previous build directory set up by fx set |
| vendor | Other | forward commands to vendor/*/scripts/devshell |
| wait | Device management | wait for a shell to become available |
Subcommands that have been contributed by project members that have other levels of support, ownership, or both. The OWNERS file in the contrib directory provides a pointer to the member that supports each script.
| Command | Category | Description |
|---|---|---|
| arm-esr | Other | decode ARM Exception Syndrome Register values |
| bindc | Run, inspect and debug | run the bind program compiler and debugger |
| binutils | Run, inspect and debug | Provides a shortcut to the prebuilt LLVM binutils tools |
| bisect-rustc | Other | |
| blobstats | Run, inspect and debug | compute some blobfs statistics from the build |
| bt-snoop-from-snapshot | Run, inspect and debug | extract a snoop log from a snapshot as pcap formatted data |
| check-deps | Build | checks dependency graph in areas |
| check-goldens | Source tree | Checks all golden file comparisons in the GN build graph. |
| check-licenses | Documentation | analyze the license state of a given package or directory |
| cl | Code submission and review | Open in a new browser window the gerrit review URL. |
| clang-tidy | Source tree | runs clang-tidy on specified files |
| clippy | Other | Runs a Rust helper script inside the fx environment under the lock |
| clippy | Diagnostic | |
| compdb | Build | DEPRECATED |
| core-tests | Test | run zircon core-tests |
| coverage | Test | Runs test and exports coverage data. |
| cpu-stats | Run, inspect and debug | generate a report of CPU stats from a snapshot |
| dart-remote-test | Test | runs a single remote test target through //scripts/run-dart-action.py |
| dis | Diagnostic | Dumps disassembly for binaries from the build. |
| exec-host-tests | Test | |
| extract-pprof | Run, inspect and debug | Extract pprof data from inspect.json |
| extract-zbi | Other | |
| ffx | Other | execute ffx - future fx |
| fidlcat | Run, inspect and debug | Deprecated, please use “ffx debug fidl” |
| fidldoc | Documentation | generate documentation for FIDL |
| fidltags | Other | generate tags for .fidl files |
| flash-buckeye | Other | Flash Fuchsia onto a buckeye board that has already been provisioned with |
| force-ota-from-devhost | Software delivery | force an Over The Air system update from devhost (reboots!) |
| format-code | Source tree | runs source formatters on modified files |
| fuzz | Run, inspect and debug | DEPRECATED! run a fuzz test on target a device |
| gc | Software delivery | garbage collect packages on the target (reboots!) |
| gce | Other | Google Compute Engine commands |
| gdb | Run, inspect and debug | Run GDB, the GNU DeBugger. |
| gen-cargo | Other | Runs a Rust helper script inside the fx environment |
| gen-cargo | Source tree | generate symlinks to Rust Cargo.toml output files |
| gerrit-split-cl | Code submission and review | Submits chains of CLs to Gerrit |
| gerrit-submit | Code submission and review | Submits chains of CLs to Gerrit |
| gnu | Run, inspect and debug | Provides a shortcut to the prebuilt GNU diagnostic tools |
| goma | Build | manage Goma distributed compilation client |
| grep | Source tree | print lines in the Fuchsia sources matching the given pattern |
| init-partition-tables | Other | run bootserver for initializing partition tables |
| iquery | Other | |
| is-incremental-publisher-running | Software delivery | check if the incremental publisher is running |
| lint | Source tree | runs source linters on modified files |
| ls-buildid | Build | Find binaries among build directories, the checkout, and cloud storage |
| make-fuchsia-vol | Other | build a fuchsia persistent disk |
| mkinstaller | Software delivery | make a Fuchsia installer image |
| move-docs | Documentation | Helper tool to batch move docs from one location to another |
| overnet | Run, inspect and debug | start an overnet host-pipe to target device |
| pending-commits | Source tree | view commits not yet published to global integration |
| qemu-cipd-ensure | Other | Generate CIPD files to download the current QEMU package. |
| remove-update-source | Software delivery | deregisters dev host as target's update source |
| roll-compiler | Other | |
| run-boot-test | Run, inspect and debug | Run a ZBI test |
| run-boot-test.py | Other | |
| run-dart-action | Run, inspect and debug | Run Dart actions (analysis, test, target-test) |
| run-e2e-tests | Test | run e2e tests |
| run-in-build | Run, inspect and debug | Run a command in the build directory |
| run-recovery | Run, inspect and debug | start Fuchsia System Recovery in qemu |
| run-zbi-test-remote | Run, inspect and debug | Remotely build a ZBI test, fetch and run it |
| rustdoc | Other | Runs a Rust helper script inside the fx environment |
| rustdoc | Documentation | generate documentation for Rust code |
| rustfmt | Other | Runs a Rust helper script inside the fx environment |
| rustfmt | Source tree | format Rust code |
| scrutiny | Run, inspect and debug | An extensible security auditing framework and toolkit for Fuchsia. |
| set-petal | Source tree | configure jiri to manage a specific petal |
| set-relay | Other | Actuates the state of an external relay by writing a single byte to |tty|. |
| setup-go | Other | Set up the checkout for Go development. |
| setup-usb-ethernet | Other | Setup udev rules for USB CDC ethernet |
| show-package | Software delivery | lists package contents |
| shush | Source tree | silence rust lints with allows or compiler suggested fixes |
| size-check | Other | Convenience wrapper for running the product size checker. |
| smoke-test | Other | Runs a Python helper script inside the fx environment |
| smoke-test | Test | Finds and runs tests affected by the current change. |
| snapshot | Run, inspect and debug | Obtain and parse a snapshot from a connected target. |
| sniff | Run, inspect and debug | Fuchsia packet capture and display tool |
| sniff.py | Other | |
| symbol-index | Build | (deprecated) manipulate the symbol-index file |
| sync-from-stem | Source tree | sync integration and deps to a state matching fuchsia.git state |
| test-stats | Test | Query and calculate test stats. |
| test-stats.py | Test | Query and calculate test stats. |
| traceutil | Run, inspect and debug | Fuchsia tracing utility |
| triage | Run, inspect and debug | generate a report of error conditions |
| unarchive-package | Software delivery | unarchive a Fuchsia package archive in FAR format |
| update-3p-owners | Source tree | updates OWNERS files for third_party dependencies |
| update-rust-3p-outdated | Source tree | updates external Rust dependencies with latest from crates.io |
| update-rustc-third-party | Source tree | updates rustc_library and rustc_binary third_party dependencies |
| validate-sdk | Build | Attempt to build a few known SDK-based OOT repos based on a core SDK |
| wipe-partition-tables | Other | run bootserver for wiping partition tables |
| zbi_json_to_d3js.py | Other | |
| zedmon | Other | run zedmon client |
| zxdb | Run, inspect and debug | Deprecated, please use “ffx debug connect” |