Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/WyattBrashear/507ex-utils2/llms.txt

Use this file to discover all available pages before exploring further.

Every .507ex project must contain a file named exactly runfile — no extension — in the root of the source directory. It holds a single shell command that FZX2 runs after it extracts the archive into a temporary runtime directory. Without this file, fzx2 build refuses to proceed and raises a FileNotFoundError. The command is passed directly to subprocess.run with shell=True, so the full shell feature set — pipes, redirects, environment variables, and shell builtins — is available.

Requirements

  • The file must be named runfile with no file extension.
  • It must be located in the root of the source directory (the directory you pass to fzx2 build).
  • It must contain a single shell command on one line.
  • It is required. Building without it raises FileNotFoundError: No Runfile Detected!

Format

The file contains one shell command. No shebang, no comments, no blank lines are needed — just the command.
python3 main.py
At runtime the command is read and executed as-is, with the working directory set to .fzx2-runtime/<exec_id>/, where <exec_id> is the UUID stored in the 507ex-id metadata field.

Examples

python3 main.py
Because shell=True is set, shell pipelines, redirects (>), and environment variable expansion ($VAR) all work exactly as they would in a terminal.

What happens at execution time

1

Extract the ZIP payload

FZX2 extracts the archive into .fzx2-runtime/<exec_id>/. All files from your source directory — including runfile itself — are available there.
2

Read the runfile

FZX2 reads the contents of runfile from the extracted directory.
3

Run the command

The command is executed via:
subprocess.run(runfile_contents, shell=True, check=False)
The working directory is .fzx2-runtime/<exec_id>/, so relative file references in your command resolve correctly.

Project structure example

The following project structure produces a valid .507ex file when built:
my_project/
├── main.py
├── runfile
└── dependfile   ← optional
With runfile containing:
python3 main.py
Running fzx2 build my_project packages everything into my_project.507ex. When executed, FZX2 extracts the archive and runs python3 main.py from the runtime directory.
check=False is passed to subprocess.run, which means FZX2 does not raise an exception if your command exits with a non-zero status code. Your script is responsible for its own error handling.

Build docs developers (and LLMs) love