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.

The start_server command launches a Flask web server that acts as a CAR (Central Application Repository) host for .507ex files. Once running, other machines can upload executables to it with fzx2 upload and download and run them with fzx2 exec <url>. The server stores uploaded files in a storage/ directory in the current working directory and generates a secret code for each upload that must be presented at download time.

Usage

fzx2 start_server .
The CLI requires a path argument for all modes, but start_server does not use it. Pass any value (e.g., .) as a placeholder — it is ignored.

How it works

1

Create the storage directory

If a storage/ directory does not already exist in the current working directory, it is created. All uploaded .507ex files are stored here.
2

Start the Flask server

Flask’s built-in development server starts on 127.0.0.1:5000 (the Flask default). The server exposes two endpoints: POST /push and POST /pull/<file_id>.

Server endpoints

POST /push

Accepts a .507ex file upload and stores it in storage/. Returns a JSON response with a download URL and a randomly generated secret code. Form fields:
FieldTypeDescription
filefileThe .507ex file to store.
file_idstringThe exec_id UUID read from the file’s metadata header by fzx2 upload.
Response:
{
  "url": "http://<host>:5000/pull/<file_id>",
  "secret_code": "<code>"
}

POST /pull/<file_id>

Serves the stored .507ex file for the given file_id. Requires the secret code that was issued at upload time. Form fields:
FieldTypeDescription
secret_codestringThe SHA-256 hash of the secret code printed by fzx2 upload.
Returns HTTP 401 if the secret code does not match.

Example workflow

1

Start the server

fzx2 start_server .
 * Running on http://127.0.0.1:5000
2

Upload an executable

From another terminal or machine:
fzx2 upload my_app.507ex
Please enter the server address:
http://127.0.0.1:5000
Upload Complete!
Upload URL: http://127.0.0.1:5000/pull/a1b2c3d4-e5f6-7890-abcd-ef1234567890
Your Secret Code Is: 482910
3

Execute the uploaded file remotely

fzx2 exec http://127.0.0.1:5000/pull/a1b2c3d4-e5f6-7890-abcd-ef1234567890
Please enter the secret code:
482910
Hello from my_app!

Storage layout

After one or more uploads, the working directory looks like:
storage/
├── a1b2c3d4-e5f6-7890-abcd-ef1234567890.507ex
├── a1b2c3d4-e5f6-7890-abcd-ef1234567890.json
├── b9c8d7e6-f5a4-3210-fedc-ba9876543210.507ex
└── b9c8d7e6-f5a4-3210-fedc-ba9876543210.json
Each .507ex file is paired with a .json file containing the SHA-256 hash of its secret code.
Flask’s built-in server is intended for development only. It is single-threaded and not hardened against malicious input. Do not expose it on a public network or use it in production without a proper WSGI server such as Gunicorn or uWSGI behind a reverse proxy.
To make the server reachable from other machines on your local network, set the FLASK_RUN_HOST environment variable to 0.0.0.0 before running fzx2 start_server ., or run the underlying Flask app directly:
python3 -m flask --app server/app.py run --host 0.0.0.0

Build docs developers (and LLMs) love