CLI Reference

Complete command reference for the XEarthLayer command-line interface.

Complete reference for every xearthlayer command, grouped by purpose.

Run xearthlayer --help or xearthlayer <command> --help for built-in usage information.

Service Management

xearthlayer / xearthlayer run

Start XEarthLayer and mount all installed packages. This is the default command — running xearthlayer with no arguments is equivalent to xearthlayer run.

xearthlayer
xearthlayer run --provider bing --no-prefetch
xearthlayer run --airport KJFK
FlagDescription
--provider <TYPE>Imagery provider: apple, arcgis, bing, go2, google, mapbox, usgs
--google-api-key <KEY>Google Maps API key (required when provider is google)
--mapbox-token <TOKEN>MapBox access token (required when provider is mapbox)
--dds-format <FORMAT>DDS compression format: bc1 or bc3
--timeout <SECS>Per-chunk download timeout in seconds (overrides executor.request_timeout_secs)
--no-cacheDisable the disk and memory cache
--debugEnable debug logging
--profileEnable Chrome Trace profiling output
--no-prefetchDisable adaptive predictive prefetching
--airport <ICAO>ICAO airport code for cold-start pre-warming (e.g., LFBO, KJFK)
CLI flags override values from config.ini. For example, --provider google --google-api-key <KEY> overrides whatever provider is set in the config file.

To stop the service, press q in the terminal for a clean shutdown (unmounts FUSE, flushes caches). Ctrl+C, SIGTERM and SIGHUP shut down the same way, and the exit status names the signal (130, 143 and 129). Stop X-Plane first: it reads scenery from the mount.

Only run writes xearthlayer.log, in ~/.local/state/xearthlayer/ (~/Library/Logs/XEarthLayer/ on macOS). --debug and --profile apply to run and the packages commands; every other command writes no log.

Setup & Configuration

xearthlayer init

Create a default configuration file in the configuration directory, ~/.config/xearthlayer/config.ini (~/Library/Application Support/XEarthLayer/config.ini on macOS). Auto-detects your X-Plane installation. xearthlayer config path prints the path in use.

xearthlayer init

xearthlayer setup

Interactive setup wizard, recommended for first-time users. Six steps: X-Plane Custom Scenery, package location, imagery provider (a key or token is asked for only with Google Maps or Mapbox), cache location and sizes, DDS encoding (GPU selection only when two GPUs are found), and third-party scenery (detects SimHeaven X-World Pro and asks whether to give it priority). It offers to open the package manager when it finishes.

xearthlayer setup

xearthlayer config get <KEY>

Read a single configuration value. Keys use section.key format.

xearthlayer config get provider.provider_type
xearthlayer config get cache.disk_size

xearthlayer config set <KEY> <VALUE>

Write a configuration value.

xearthlayer config set provider.provider_type bing
xearthlayer config set cache.disk_size 10737418240

xearthlayer config list

Display all configuration settings grouped by section.

xearthlayer config list

xearthlayer config path

Print the full path to the configuration file.

xearthlayer config path

xearthlayer config upgrade

Upgrade your configuration file to the current version. Adds missing settings with defaults and removes deprecated entries. A timestamped backup is created automatically.

xearthlayer config upgrade --dry-run   # Preview changes without modifying
xearthlayer config upgrade             # Apply the upgrade
FlagDescription
--dry-runShow what would change without modifying the file
Run this after upgrading. It removes settings XEarthLayer no longer uses and writes a timestamped backup of your existing file first. A configuration containing obsolete keys loads normally, so this is tidying rather than a requirement. See Obsolete Settings.

xearthlayer migrate

Review where XEarthLayer keeps its files, and move configuration between layouts. The layout migration runs by itself on the first start after upgrading to 0.5.0; run it here to revisit the choices, which is also what happens when the automatic run had no terminal to ask in.

xearthlayer migrate            # Review and change locations
xearthlayer migrate --dry-run  # Show what would change, change nothing
xearthlayer migrate status     # What has run, what is pending
FlagDescription
--dry-runShow what would change without changing anything
statusList migrations that have run and those pending, and where each resource resolves

Only config.ini is relocated, by copying. Nothing else is moved: anything at an old location with data in it has that path written into the new configuration. See Where XEarthLayer Keeps Its Files.

Package Management

xearthlayer packages

With no subcommand, in a terminal, opens the package manager: a full-screen view of the library, your installed packages and the jobs of this session, with a Settings tab for the [packages] section of your configuration.

xearthlayer packages
KeysWhereAction
1 2 3 4, Tab, Shift+TabeverywhereSwitch between Local, Library, Progress and Settings
SpaceLocal, LibraryMark or unmark the selected row
aLocal, LibraryMark every row shown, or clear the marks
iLibraryInstall the marked rows (or the selected one)
uLocalUpdate
dLocalDelete
tLibraryCycle the type filter: all, ortho, overlay
c / CProgressCancel the selected job / every unfinished job
EnterSettingsEdit the selected setting; Enter again saves, Esc cancels
reverywhereRefresh
?everywhereHelp
q, Esc, Ctrl+CeverywhereQuit (cancels running jobs first)

Installs and deletes ask for confirmation. With packages.auto_install_overlays on, an ortho install brings its overlay. Without a terminal, xearthlayer packages prints the command help instead.

Selecting packages by region code

Region codes are hierarchical, continent first. install, update, remove and info accept the start of a code and act on every package it selects, ignoring case. When a code selects several packages, the matches are listed and confirmed before anything downloads. A code that selects nothing lists the codes that would have worked.

You typeSelects
NAevery North America package
NA-CANADANA-CANADA-WEST and NA-CANADA-EAST
AS-RUSSIAAS-RUSSIA-CENTRAL and AS-RUSSIA-EAST
AF-SOUTHexactly AF-SOUTH

install and remove take several codes at once, or --all for every package of the chosen type. See the Package Management page for the full list of codes.

xearthlayer packages list

List installed packages with their versions and sizes. Sizes are recorded at install time, so this is fast even with the whole world installed.

xearthlayer packages list
xearthlayer packages list --verbose
FlagDescription
--verbose, -vShow the install path of each package
--install-dir <PATH>Override the installation directory

xearthlayer packages check

Compare installed packages with the library and report what is new or has an update.

xearthlayer packages check
FlagDescription
--library-url <URL>Override the package library URL
--install-dir <PATH>Override the installation directory

xearthlayer packages install <REGION>...

Install one or more regional scenery packages. Downloads run ahead of installs, so a batch takes about as long as its downloads.

xearthlayer packages install EU-WEST
xearthlayer packages install NA-CANADA AF
xearthlayer packages install --all
xearthlayer packages install SA --type overlay
FlagDescription
--allInstall every package of the type in the library
--type <TYPE>Package type: ortho (default) or overlay
--library-url <URL>Override the package library URL
--install-dir <PATH>Override the installation directory
--temp-dir <PATH>Override the temporary download directory

While xearthlayer run is active, a package that is already installed is refused (installing over it is an update); new packages install and are used from the next start.

xearthlayer packages update [REGION]

Update installed packages. With no region, every installed package is checked.

xearthlayer packages update EU
xearthlayer packages update --all
FlagDescription
--allUpdate all packages without prompting
--type <TYPE>Filter by package type: ortho or overlay
--library-url <URL>Override the package library URL
--install-dir <PATH>Override the installation directory
--temp-dir <PATH>Override the temporary download directory

Refused while xearthlayer run is active.

xearthlayer packages remove <REGION>...

Remove installed packages. The whole selection is validated before anything is deleted, and one confirmation covers the set.

xearthlayer packages remove EU-EAST
xearthlayer packages remove NA --type overlay --force
xearthlayer packages remove --all
FlagDescription
--allRemove every installed package of the type
--type <TYPE>Package type: ortho (default) or overlay
--force, -fSkip the confirmation prompt (validation still runs)
--install-dir <PATH>Override the installation directory

Refused while xearthlayer run is active. A full code is also the start of every longer one, so while both EU and EU-WEST are installed, EU selects both.

xearthlayer packages info <REGION>

Show detailed information about an installed package.

xearthlayer packages info AS-CHINA-MONGOLIA
FlagDescription
--type <TYPE>Package type: ortho (default) or overlay
--install-dir <PATH>Override the installation directory
Package commands write their own log, xearthlayer-packages.log, beside xearthlayer.log, so a failed install’s diagnostics survive the next flight.

Cache Management

xearthlayer cache stats

Show disk cache location, file count, and total size.

xearthlayer cache stats

xearthlayer cache clear

Delete all cached tiles from the disk cache.

xearthlayer cache clear
Clearing the cache means all textures will need to be re-downloaded on the next flight. This is safe but may cause longer initial load times.

Scenery Index

The scenery index maps installed packages to tile coordinates, enabling adaptive prefetching. It is built automatically on startup, but you can manage it manually.

xearthlayer scenery-index status

Show index cache status including version, package count, and tile counts.

xearthlayer scenery-index status

The report ends with a completeness line comparing the number of indexed tiles against the number of .ter files found across your installed packages:

Indexed:   184320 of 184320 .ter files (100.0%)

If fewer tiles were indexed than there are .ter files, a warning follows:

Indexed:   184102 of 184320 .ter files (99.9%)
  WARNING:   218 .ter files did not produce a tile

A shortfall means those .ter files could not be parsed, so their tiles are absent from the index. Prefetch cannot see tiles it has no index entry for, and will not fetch them ahead of the aircraft — they are still generated on demand when X-Plane asks for them. Rebuild with scenery-index update to see which packages the failures came from; if the count persists, the package files themselves are likely damaged and worth reinstalling.

xearthlayer scenery-index update

Rebuild the scenery index from installed packages. Useful after manually adding or removing package files.

xearthlayer scenery-index update

Each package reports its tile count as it is indexed. Packages containing .ter files that failed to parse report the failure count alongside the tiles that succeeded, so a problem package can be identified by name:

Indexing EU-WEST... 42196 tiles
  Indexing NA-USA-BERMUDA-BAHAMAS... 61840 tiles (218 .ter files failed to parse)

xearthlayer scenery-index clear

Delete the scenery index cache file. It will be rebuilt automatically on the next xearthlayer run.

xearthlayer scenery-index clear

Patches

Patches are pre-built Ortho4XP tiles with custom mesh or elevation data. XEarthLayer overlays them with dynamically generated textures at runtime.

xearthlayer patches list

List installed patches with validation status, priority order, and file counts.

xearthlayer patches list

xearthlayer patches validate

Validate patch directory structure and required files.

xearthlayer patches validate
xearthlayer patches validate --name my-patch
FlagDescription
--name <PATCH_NAME>Validate a specific patch by name

xearthlayer patches path

Print the configured patches directory path.

xearthlayer patches path

Diagnostics

xearthlayer diagnostics

Output system diagnostics for bug reports: the platform and its version, CPU, memory, the GPU adapters XEarthLayer can use (Vulkan, Metal and DX12 only), where each of its directories resolves, the configuration in use, and the cache size.

xearthlayer diagnostics

The report includes the size of your cache directory. That measurement is bounded at five seconds: on a very large cache it stops and reports the size as unmeasured rather than delaying the rest of the report.

When filing a bug report, include the output of xearthlayer diagnostics to help with troubleshooting.