Repository navigation
Configuration
Keep your project's build settings in .poefilterx.json. You can choose an entrypoint, set an output path, supply variables, and configure the other CLI options there.
poefilterx init creates this file, a .poefilterx.dev.json profile, and a .gitignore that ignores the dev profile. Keep the base file with your project; use the dev profile for settings specific to your machine.
Here's an example .poefilterx.json:
{
"$schema": "https://raw.githubusercontent.com/SteffenBlake/PoeFilterX/main/schemas/poefilterx.schema.json",
"entrypoint": "src/main.filterx",
"output": "MyFilter.filter",
"verbosity": "Information",
"variables": {
"League": "SSF"
}
}Run poefilterx to build with those settings. The output directory must already exist.
The $schema line lets editors offer completion and validation for the configuration file. Both files created by Init include it. See the configuration schema for the full format.
PoeFilterX searches the current directory and its parents for .poefilterx.json. Its directory becomes the project root. If you supply an input path, the search starts in that file's directory.
If no configuration file is found, PoeFilterX uses the nearest directory containing entrypoint.filterx or a filename ending in .entrypoint.filterx.
The entrypoint setting chooses the file to build. Without that setting, PoeFilterX looks for an entrypoint in the project root. If several match, supply the input path explicitly.
Relative paths in the JSON files use the project root. Explicit CLI input and output paths use your terminal's current directory.
Profiles let you keep different settings for development, releases, or other builds.
For example, put these settings in .poefilterx.dev.json:
{
"$schema": "https://raw.githubusercontent.com/SteffenBlake/PoeFilterX/main/schemas/poefilterx.schema.json",
"output": "MyFilter-dev.filter",
"verbosity": "Debug"
}Run poefilterx build --profile dev to use it. The profile changes the output path and verbosity while keeping the other base settings.
Profiles are loaded when selected with --profile or POEFILTERX_PROFILE. The dev profile is not automatically active just because the file exists. A selected profile file must exist; profile names can contain letters, digits, hyphens, and underscores.
Settings load in this order:
.poefilterx.json-
.poefilterx.<profile>.json, when a profile is selected - Environment variables beginning with
POEFILTERX_ - Explicit CLI arguments
Later values override earlier ones. For example, poefilterx --profile dev --verbosity Warning uses the dev profile with Warning logging.
You can override a configured boolean too: poefilterx build --locked false.
Use the setting name after POEFILTERX_, for example POEFILTERX_OUTPUT or POEFILTERX_VERBOSITY.
For nested settings, separate the names with two underscores. For example, POEFILTERX_VARIABLES__League=SSF sets the League compiler variable. Arrays use numbered entries, such as POEFILTERX_FACT__0=BaseArmour=100.
These names are also supported:
POEFILTERX_NO_RESTOREPOEFILTERX_PACKAGE_CACHEPOEFILTERX_ITEM_FILEPOEFILTERX_AREA_LEVELPOEFILTERX_PROJECT_NAME
Use POEFILTERX_PROFILE to select a profile. An explicit --profile takes precedence.
Suppose your filter imports a package you're editing in /Projects/my-filter-style:
import theme from "https://github.com/UserName/my-filter-style";
using @theme/styles/main.fss;
Add a package override to .poefilterx.dev.json:
{
"$schema": "https://raw.githubusercontent.com/SteffenBlake/PoeFilterX/main/schemas/poefilterx.schema.json",
"packageOverrides": {
"https://github.com/UserName/my-filter-style": "/Projects/my-filter-style"
}
}Run poefilterx build --profile dev. PoeFilterX reads that checkout directly, including changes you haven't committed. Save your package edits and build again to try them out. The local directory must exist, and the repository URL must match the import exactly, including any .git suffix.
The override skips downloading that package and preserves its release pin. Other people can restore the same GitHub import normally. --locked still requires a matching lockfile; it doesn't prevent an active override from using your working files.
You can also pass the same JSON object through --package-overrides or POEFILTERX_PACKAGE_OVERRIDES. For example, in a POSIX shell:
poefilterx build --package-overrides '{"https://github.com/UserName/my-filter-style":"/Projects/my-filter-style"}'The language server reads the same configuration. Select the same profile with poefilterx language-server --stdio --profile dev, or set POEFILTERX_PROFILE=dev in the editor's environment before launching it. External saves refresh diagnostics, and files opened at their original checkout paths supply unsaved edits to the language server. CLI builds read saved files.
Before publishing, build with the dev profile inactive and local package overrides removed from the environment and CLI arguments to check the published package contents.
See Packages for imports, restore, and commit pins.
Settings apply to the commands that use them. JSON property names follow the table below; CLI option names are listed in Commands.
| Setting | Value | Used for |
|---|---|---|
entrypoint |
File path | Input .filterx file |
output |
File path | Build output; defaults to the input path with a .filter extension |
verbosity |
Trace, Debug, Information, Warning, Error, Critical, None
|
CLI logging; defaults to Information
|
variables |
Object of string values | Compiler variables |
packageOverrides |
Object mapping repository URLs to directories | Local package development |
packageCache |
Directory path | Downloaded package cache |
noRestore |
Boolean | Use available packages without restoring |
locked |
Boolean | Require a matching package lockfile |
update |
Boolean | Refresh unpinned packages to remote HEAD |
item, itemFile
|
Copied item text or file path | Check input; supply one |
game |
Poe1, Poe2
|
Check game; defaults to Poe1
|
areaLevel |
Integer | Check drop area level |
format |
Text, Json
|
Check output; defaults to Text
|
fact |
Array of Name=value strings |
Check item property overrides |
define |
Array of Name=value strings |
Check compiler variables |
name, path
|
Project name and parent directory | Init |
stdio, socket, pipe
|
Boolean, TCP port, or pipe name | Language server transport; select one |