reference

CLI reference

One command for the whole workflow. Run pyxpo --help or pyxpo <command> --help for the same information in your terminal.

terminal
pyxpo create demo
pyxpo run ios
pyxpo build android --release

pyxpo create

Create a new project with a root layout, a home screen, a dynamic route and a not-found screen.

bash
pyxpo create <name> [--dir PATH]

pyxpo run

Build and start the app with hot reload. The target defaults to desktop: a native Mac app (Mac Catalyst) on macOS, a native WinUI 3 app on Windows. web starts a dev server and opens the app in your browser.

bash
pyxpo run [desktop|android|ios|web]
OptionMeaning
--no-reloadTurn hot reload off.
--port NPort for the hot reload server (default 8765, or dev_port in the config). For web: the dev server port (default 8000).
--previewDesktop only: show the app in a browser window instead of building the native Mac or Windows app.
--base PATHWeb only: the path the site is served under, such as /myapp.
--no-openWeb only: do not open a browser.
--no-devtoolsWeb only: hide the dev tools button (device preview, breakpoints).
--dir PATHProject folder, if it is not the current one.

pyxpo build

Build an installable app. Android release builds use R8 when build_properties turn minify on. desktop builds the Mac .app or the Windows .exe. web writes a static site to build/web/ that any static host can serve.

bash
pyxpo build {android|ios|desktop|web} [--release]
OptionMeaning
--releaseMake a release build instead of a debug build.
--base PATHWeb only: the path the site is served under, such as /myapp.

pyxpo prebuild

Generate editable android/ and ios/ projects that you can open in Android Studio or Xcode. Running it again keeps your edits; changed generated files are written next to them with a .pyxpo-new suffix.

bash
pyxpo prebuild [all|android|ios]
OptionMeaning
--cleanDelete the native folders first. Your edits in them are lost.
--yesSkip the confirmation for --clean.

pyxpo stage

Copy your Python app into a prebuilt native project. Gradle and Xcode run this for you, so you rarely call it by hand.

bash
pyxpo stage {android|ios} [--release] [--kind simulator|device]

pyxpo runtime

Manage the cached CPython runtime in ~/.cache/pyxpo.

bash
pyxpo runtime {fetch|path|clean}
OptionMeaning
--platform ios|androidOnly this platform.
--abi ABIOnly this Android ABI.
--from DIRInstall from local .tar.gz files, for offline machines.
--allWith clean: remove every cached runtime version.

pyxpo doctor

Check Python, Xcode, the Android SDK, the JDK and Gradle, and say how to fix what is missing.

bash
pyxpo doctor

pyxpo config

Validate [tool.pyxpo] and print the resolved config. --schema prints the JSON Schema for editor completion.

bash
pyxpo config [--platform ios|android] [--schema]

pyxpo add-lib

Check that a PyPI package works on iOS and Android, then add it to your dependencies.

bash
pyxpo add-lib <package>