Reference/02

Command reference

Every esx command in one list.

Run esx <command> --help for the options of a command. Run esx help-topic for the built-in guides.

commands and help-topic

Command Description
esx commands List all commands with arguments and examples (machine readable with –format json)
esx help-topic Show a guide about a topic (paths, records, output, debugging). Without a topic: list topics

See Output and errors.

archive

Command Description
esx archive info Show format, version, compression, sizes and game compatibility warnings
esx archive list List entries, including byte offsets and texture mip chunks. Supports JSON Lines
esx archive check Read and decompress every selected entry; report corrupt entries with offsets
esx archive extract Extract selected entries into a directory. DX10 entries become complete DDS files
esx archive pack Pack a directory of assets. Output is published after all assets pack successfully

behavior

Command Description
esx behavior check Validate a .bhv source and its resolved assets and generated plugin without publishing files
esx behavior plan Resolve .bhv selectors and show hash-pinned edits, bindings and build inputs without publishing files
esx behavior expand Print the graph-level source that the compiler makes from a mod source
esx behavior clips List, for each view, the folder that supplies each animation name and the names that no folder has
esx behavior explain Show the graphs, states and clips that a vanilla action uses for a template keyword
esx behavior contexts List archived contexts and their animation folders for a Meshes-relative base graph path
esx behavior build Compile a .bhv source into a Data-style directory: graph copies, animation metadata, the plugin with its attachment, and the effect project of an effect block
esx behavior verify Check that each artifact of a behavior build is in the given archives or Data folder with the same bytes
esx behavior clip-info Inspect a supported animation clip’s duration and annotations without decompressing bone tracks
esx behavior context-data Generate native AnimationFileData and AnimationOffsets for one animation folder
esx behavior clip-data Generate a native V4 ClipGeneratorData file, including referenced graph clips

See Weapon animations.

batch

Command Description
esx batch Run many changes on one plugin from a JSON document and save once (all or nothing)

build

Command Description
esx build Build a project folder: the plugin from its item files and records files, each behavior source, a mesh from each model file, the assets, Papyrus, the archives and the release check

See Project and build.

item

Command Description
esx item expand Print the batch operations that esx build makes from the item files of a project. Write nothing, or write one records file for each item file with --output
esx item new Write a starter item file from a vanilla record, with each value filled in from that record

See Item files.

ck

These commands run the Creation Kit tools that you installed. esx does not download them.

Command Description
esx ck doctor Check the installed Fallout 4/Creation Kit tools and dedicated runtime without executing them
esx ck setup Prepare tool state. On Linux, initialize a dedicated prefix from installed Proton files
esx ck compile Compile Papyrus .psc sources with the installed Creation Kit compiler; validate and publish .pex files
esx ck anim-info Generate animation data for staged behavior graphs in an isolated CK Data overlay
esx ck archive pack Pack assets with installed Archive2. Linux also needs a tools prefix and Xvfb
esx ck archive extract Extract through installed Archive2 to a new directory after validating entry paths and payloads
esx ck plugin export Export an inline-string Fallout 4 plugin to a new Spriggit JSON directory
esx ck plugin build Build Spriggit JSON, verifying ModKey, record identities and explicit record fields

debug

Command Description
esx debug roundtrip Decode and re-encode every record in memory; report byte changes without writing a plugin
esx debug explain Decode a record with a full trace: byte offsets, sizes, hex, union and array decisions, unexpected subrecords and unused data. Start here when a value looks wrong
esx debug subrecords List the raw subrecords of a record (signature, offset, size, hex) without definitions
esx debug hexdump Hex dump of a record (header + decompressed data)
esx debug scan Decode every record of a plugin and report decoding problems (unknown records, unexpected subrecords, unused data, short values)

defs

Command Description
esx defs list List all record types of the game
esx defs show Show the definition tree of a record type (subrecords, fields, types, enums, flags)

game

Command Description
esx game list List the games that esx knows and which of them have record definitions
esx game detect Detect install, Data, INI, saves and activation-list paths, including Steam/Proton

hkx

Command Description
esx hkx show Inspect header, class signatures, opaque objects and reference counts
esx hkx edit Apply a hash-pinned JSON patch to one graph file; resolve every selector before writing
esx hkx diff Compare a behavior graph with its base graph: added, removed and changed nodes, events and variables
esx hkx events List what uses each event of a behavior graph, and the events that the graph does not use
esx hkx roundtrip Reconstruct packfiles and compare every output byte with the input

See Weapon animations.

loadorder

Command Description
esx loadorder show Show installed plugins, activation, dependencies and assigned slots
esx loadorder check Validate active plugins, master dependencies and full/light/medium slot limits
esx loadorder write Export a normalized plugins.txt with active dependencies included. This does not change plugin timestamps in games that order by modification time
esx loadorder merged-patch Create a merged patch (xEdit: Create Merged Patch): merges leveled lists, container items, faction relations, keywords and other lists of all given plugins into a new plugin
esx loadorder check-leveled-lists Find circular leveled lists in the winning overrides (xEdit: Check for Circular Leveled Lists)
esx loadorder check-info-links Check winning INFO previous links for cycles, missing targets and deleted targets

See Load order.

material

Command Description
esx material show Show every binary material field, its type and byte offset
esx material create Create a binary material with scalar defaults. Set textures and settings before use
esx material set Edit one typed field. Other bytes are preserved; –dry-run previews the result
esx material import Convert CK/xEdit JSON material settings to a version-2 binary material

See Meshes and materials.

nif

Command Description
esx nif show List FO4 stream-130 blocks, editable fields and array entry schemas
esx nif shapes List the nodes, the shapes and the materials of a mesh, with the decoded geometry
esx nif set Edit one or more supported fields, preserving geometry and unrelated block bytes
esx nif set-paths Replace text in the path fields of a mesh by rule, and report each changed field
esx nif export Write a model file (glTF 2.0) from a mesh: the nodes, the shapes, the materials, the connect points, the skin of a shape with its joints and weights, and the segment table of a shape
esx nif insert Insert a JSON entry into an existing connect-point or furniture-marker array
esx nif remove Remove one entry from an existing connect-point or furniture-marker array
esx nif prune Remove each block that the roots of the mesh do not reach, and fix each reference
esx nif connect-points List a node’s attached connect points, or copy them from another FO4 mesh
esx nif import Make a mesh from a model file (glTF 2.0): a new mesh, or a template with new geometry, with the collision of another mesh when the job file asks for it. A model with a skin gives a skinned shape with its bone nodes and weights, and a shape of an armor gets a segment table from the model, from the template, or the default table
esx nif furniture-markers List a node’s attached furniture markers, or copy them from a template mesh

See Meshes and materials.

papyrus

Command Description
esx papyrus inspect Inspect compiled Fallout 4 PEX 3.9 object, property and function metadata

Two other commands work with Papyrus scripts. esx plugin check-scripts compares the script bindings of a plugin with the compiled scripts. esx ck compile compiles Papyrus source with the installed Creation Kit compiler.

plugin

Command Description
esx plugin next-formid Find the next free object ID, respecting full, light and medium plugin limits
esx plugin info Show the file header, masters, flags and record counts of a plugin
esx plugin records List the records of a plugin, with optional filters
esx plugin clean Clean a plugin like xEdit’s Quick Auto Clean: remove “Identical to Master” records (ITM), undelete and disable deleted references (UDR), and report deleted navmeshes
esx plugin check Check every record for errors (xEdit: Check for Errors): unresolved FormIDs, wrong reference types, unknown enum values, decoding errors
esx plugin conflicts List the records of a plugin that override other plugins, with their conflict state
esx plugin create Create a new empty plugin
esx plugin esl-check Check whether a plugin can be a light plugin (ESL flag) and what compacting would do
esx plugin compact-esl Renumber new records outside the light plugin range into it (xEdit: Compact FormIDs for ESL). Plugins loaded with –with that use this plugin are updated too
esx plugin renumber Renumber all new records of a plugin to consecutive FormIDs (xEdit: Renumber FormIDs from)
esx plugin refs Build the reference index of the loaded plugins and report counts (xEdit: Build Reference Info)
esx plugin seq Write the SEQ file of a plugin (start game enabled quests) to the file of -o (xEdit: Create SEQ File). Without -o the file goes to Data/Seq/.seq, and a Data folder of a game needs --allow-game-folder
esx plugin export-records Write a plugin as the records files of a project that esx build makes into the same plugin
esx plugin diff Compare two plugins (usually two versions of one plugin): added, removed and changed records with the changed fields (xEdit: Compare To)
esx plugin injected List injected records: records whose FormID belongs to a master that does not contain them (xEdit shows them with the “injected” filter)
esx plugin masters list List the masters and which of them are used by FormIDs
esx plugin masters add Add masters (they must exist in the Data folder). FormIDs are rewritten as needed
esx plugin masters clean Remove masters that no FormID uses (xEdit: Clean Masters)
esx plugin masters sort Sort the masters by load order (xEdit: Sort Masters)
esx plugin groups Show the group (GRUP) structure of a plugin
esx plugin resave Write the plugin to a new file without changes (tests that the engine writes it back exactly)
esx plugin set-flags Change ESM, ESL or localized header flags with validation and optional preview
esx plugin merge Merge selected FO4 plugins into a new file, remapping collisions and references
esx plugin assets List referenced assets, their loose/archive sources and missing files
esx plugin weapon-parts Show the default parts of weapons, the mesh of each part and the meshes that weapons share
esx plugin check-weapons Check the slots, the parts, the recipes, the loose mods and the mesh points of weapons
esx plugin collect-assets Recursively collect resolved FO4 assets into a new directory for packaging
esx plugin check-scripts Check FO4 VMAD Papyrus script/property bindings against winning compiled PEX files
esx plugin check-precombines List FO4 cells whose precombine/previs data needs review after record changes

probe

Command Description
esx probe doctor Check the game runtime, F4SE, the Address Library file, the probe DLL, the launch backend and the display. Read-only
esx probe install Install F4SE, the Address Library file, the probe DLL and a test world into the test folder
esx probe uninstall Remove each file of the install manifest whose hash is unchanged
esx probe status Show the install, the live session and leftover mod files
esx probe start Build the test profile, start the game with the probe and wait until it is ready. On native Windows with the headless display, --allow-other-games permits a game that runs from a different folder
esx probe call Send one request to the probe of a session
esx probe run Run a test plan: start a session, run each step, stop the session, report. It has --allow-other-games as esx probe start has
esx probe plan Write the test plan of a built project into build/test-plan.toml: each new weapon with its parts and its reload variants, and each new armor
esx probe stop Quit the game of a session, stop its processes and remove its mod files from the test folder
esx probe clean End each session whose game is dead
esx probe ops List the ops of the probe with their arguments and availability
esx probe log Print the end of a log of a session: probe, f4se, f4se-loader, papyrus, game or crash

See Game tests.

record

Command Description
esx record create Create a record with definition defaults; set its remaining fields before using it in-game
esx record set-deleted Delete a record body, or restore it from a complete master with VALUE=false
esx record set-partial Keep only a record’s editor ID, or restore its complete body with VALUE=false
esx record show Show a record as an element tree
esx record get Read the value of one element, or of each element that a [*] selector selects
esx record set Change the value of the elements that a path selects and save the plugin
esx record conflicts Compare all versions of a record (master and overrides) like xEdit’s conflict view: overall conflict state, state per plugin, and every field that differs
esx record copy Copy a record into a plugin, as an override (default) or as a new record. Missing masters are added; parent records (CELL/WRLD of a reference, DIAL of an INFO) are copied as overrides too
esx record remove Remove a record from a plugin (the record itself, not a deleted flag)
esx record refs List the records that reference a record (xEdit: Referenced By)
esx record change-formid Change the FormID of a record (and its overrides and all references in the loaded plugins)
esx record retarget Make every record in the plugin that references RECORD reference NEW instead (xEdit: Change Referencing Records)
esx record overrides Show all versions of a record in the loaded plugins (master first)

release

Command Description
esx release check Run every release check on a plugin and its archives, and give one report

See Archives.

resource

Command Description
esx resource list List distinct loose/archive paths. Supports case-insensitive prefixes and globs
esx resource where Show all copies of an asset, in priority order. Set –data and/or repeat –archive
esx resource extract Write the winning copy of an asset to a file
esx resource dependencies Inspect FO4 NIF, BGSM/BGEM and compiled PEX dependencies through resource lookup

rhai

Command Description
esx rhai run Run globals and Initialize/Process/Finalize hooks. Preview by default; –apply saves
esx rhai api List the xEdit-style functions that a Rhai file can call. Pascal source requires translation

See Bulk edits.

Command Description
esx search Find records by signature, editor ID, name, element values or references

strings

Command Description
esx strings dump List every localized string field of a plugin: record, path, table, ID and text
esx strings localize Move the inline strings of a plugin into .STRINGS files and set the localized flag
esx strings delocalize Put the strings of a localized plugin back into the plugin and clear the localized flag
esx strings set Change one entry of a strings table of a localized plugin
esx strings export Export all translatable fields to a JSON document. Edit only each item’s text
esx strings import Import translated text after checking source values and field identities

See Strings.

texture

Command Description
esx texture info Show the format, the size, the mip levels and the cube map flag of a DDS file, and if its alpha channel has a value below 255
esx texture convert Convert one PNG or TGA image to a DDS file with the format of its role and each mip level
esx texture pack-channels Make one DDS file from one gray image for each channel
esx texture cubemap Make one cube map DDS file from six square images

See Textures.

scene, render and gui

esx scene says what a weapon or a mesh consists of, and esx render draws a picture of it with no window and no game. See Viewer. esx gui starts the graphical interface. See Interface.

Command Description
esx scene weapon List each slot and each part of a weapon, with each mesh, material and texture resolved
esx scene mesh List the materials and the textures of one mesh, each resolved
esx render weapon Draw a weapon with the default part of each slot, each at its connect point, to a PNG file
esx render mesh Draw one mesh with its materials and its textures to a PNG file
esx render material Draw a sphere or a plane with one material to a PNG file
esx render texture Write the pixels of a DDS texture as a PNG file: its color, or one channel
esx gui Find the program esx-gui beside esx or on the path and start it. An argument is a project folder to open. With no such program: NOT_FOUND with the reason GUI_NOT_INSTALLED