ftl2-apps-pep723-inline-metadata

Status: IN

FTL2 applications can be single-file scripts using PEP 723 inline script metadata for dependency declarations, runnable via `uv run` with no virtualenv setup.

Source: entries/2026/05/11/ftl2-htop-CLAUDE.md

Example

#!/usr/bin/env -S uv run
# /// script
# requires-python = ">=3.11"
# dependencies = ["ftl2"]
# ///

import asyncio
from ftl2.automation import automation

async def main():
    async with automation() as ftl:
        await ftl.ping()

asyncio.run(main())

JSON