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 |
build | Build | Run Ninja to build Fuchsia |
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 and Zircon build artifacts |
clean-build | Build | clean the build directory and then perform a full build |
cmc | Build | Component manifest compiler |
cp | Device management | copy a file to/from a target device |
emu | Run, inspect and debug | start fuchsia in an emulator |
emu-remote | Other | Remotely run emulator |
exec | Other | read the current build config, then exec |
fargo | Build | Fargo is a prototype Fuchsia-specific wrapper around Cargo |
fdt | Run, inspect and debug | run fuchsia devtools |
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 Zircon and 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 |
gn | Build | meta-build system that generates build files for Ninja |
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. |
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 |
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 |
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 |
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 |
run | Software delivery | build Fuchsia and push to device |
run-host-tests | Run, inspect and debug | DEPRECATED! build and run tests on host |
run-netboot | Run, inspect and debug | start fuchsia in qemu via netboot |
run-test | Run, inspect and debug | DEPRECATED! build a test package and run on target. |
run-test-component | Run, inspect and debug | DEPRECATED! build a test package and run on target. |
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 | Other | 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 | symbolize backtraces and program locations provided as input on stdin |
syslog | Run, inspect and debug | DEPRECATED! [deprecated] alias for fx log |
test | Run, inspect and debug | Entry point for all Fuchsia tests (host, target and end-to-end) |
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 |
vdl | Other | |
vendor | Other | forward commands to vendor/*/scripts/devshell |
wait | Device management | wait for a shell to become available |
zxdb | Run, inspect and debug | Fuchsia native debugger |
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 |
---|---|---|
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 | Other | extract a snoop log from a snapshot as pcap formatted data |
check-deps | Build | checks dependency graph in areas |
check-licenses | Documentation | analyze the license state of a given package or directory |
clang-tidy | Source tree | runs clang-tidy on specified files |
codesize | Run, inspect and debug | Code size attribution on binaries from the system image |
compdb | Build | Generates a compile_commands.json file in FUCHSIA_DIR using the current build configuration |
component-graph | Run, inspect and debug | start component graph server to map component topology |
component-surveyor | Other | produce a dump of v1 components in CSV form. |
core-tests | Run, inspect and debug | run zircon core-tests |
cpu-stats | Run, inspect and debug | generate a report of CPU stats from a snapshot |
dart-remote-test | Run, inspect and debug | runs a single remote test target through //scripts/run-dart-action.py |
dart-tunnel | Run, inspect and debug | forward local ports to Dart VMs on the device. |
debug | Run, inspect and debug | run the debug agent on target and connect to it with zxdb |
delta | Software delivery | compare all built Fuchsia packages with a prior package snapshot |
exec-host-tests | Other | |
extract_pprof | Run, inspect and debug | Extract pprof data from inspect.json |
extract-zbi | Other | |
fidlcat | Run, inspect and debug | run fidlcat on given target. |
fidldoc | Documentation | generate documentation for FIDL |
fidltags | Other | generate tags for .fidl files |
flutter-attach | Run, inspect and debug | attach to a running flutter module to enable hot reload and debugging |
format-code | Source tree | runs source formatters on modified files |
fuzz | Run, inspect and debug | run a fuzz test on target a device |
gc | Software delivery | garbage collect packages on the target (reboots!) |
gce | Other | Google Compute Engine commands |
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-submit | Code submission and review | Submits chains of CLs to Gerrit |
goma | Build | manage Goma distributed compilation client |
grep | Source tree | print lines in the Fuchsia and Zircon sources matching the given pattern |
init-partition-tables | Other | run bootserver for initializing partition tables |
iquery | Other | |
lint | Source tree | runs source linters on modified files |
make-fuchsia-vol | Other | build a fuchsia persistent disk |
make-integration-patch | Source tree | Creates an integration CL to test other CLs in the global integration commit queue. |
mkinstaller | Software delivery | make a Fuchsia installer image |
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. |
regen-goldens | Source tree | regenerates golden files in the source tree |
roll-compiler | Other | |
run-dart-action | Run, inspect and debug | Run Dart actions (analysis, test, target-test) |
run-e2e-tests | Run, inspect and debug | 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 | Run, inspect and debug | Run a ZBI test |
run-zbi-test.py | Other | |
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 |
save-package-stats | Software delivery | take a snapshot of all built Fuchsia packages |
screenshot | Device management | takes a screenshot and copies it to the host |
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-usb-ethernet | Other | Setup udev rules for USB CDC ethernet |
show-package | Software delivery | lists package contents |
smoke-test | Other | Runs a Python helper script inside the fx environment |
smoke-test | Build | 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 | packet capture and display tool |
symbol-index | Build | manipulate the symbol-index file |
sync-from-stem | Source tree | sync integration and deps to a state matching fuchsia.git state |
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-rustc-third-party | Source tree | updates rustc_library and rustc_binary third_party dependencies |
wipe-partition-tables | Other | run bootserver for wiping partition tables |
zedmon | Other | run zedmon client |