PixelWeaver v0.5.0 /server.src.pixelweaver.cli
On this page

PixelWeaver CLI.

#server.src.pixelweaver.cli

#server.src.pixelweaver.cli

PixelWeaver CLI.

#build_vite_command

python
def build_vite_command(vite_port: int) -> str

Build the vite dev command, forwarding the port explicitly.

--strictPort forbids vite's silent auto-increment when the port is occupied: instead vite exits loudly, which the wrapper surfaces. Without forwarding the port, vite starts on its config default while the readiness probe waits on vite_port and times out.

#platform_summary

python
def platform_summary() -> str

OS name and machine architecture, as diagnose prints them.

Reads platform.uname() once instead of calling platform.system() and platform.machine(), which are projections of exactly that record -- the value is identical (see test_cli.py) and it is one in-process read rather than two.

The spelling also matters: strictcli's effects-bypass lint bans the call leaf system on any receiver, because os.system starts a shell. platform.system collides with that ban while starting no process at all, and ctx.effects has no method for an in-process observe -- routing it would mean shelling out to uname, a real process where there was none, and losing Windows. platform.uname() carries the same information with no collision, so nothing here is suppressed or hidden from the lint.

#_pkg_version

python
def _pkg_version(package_name: str, module_name: str | None=None) -> str

Get package version, trying module attr first then importlib.metadata.

#cmd_serve

python
def cmd_serve(ctx, *, host: str, port: int, data_dir: str, reload: bool) -> None

#cmd_new

python
def cmd_new(ctx, name: str, *, width: int, height: int, data_dir: str) -> None

#cmd_list

python
def cmd_list(ctx, *, data_dir: str) -> None

#cmd_export_parts

python
def cmd_export_parts(ctx, name: str, *, out: str, data_dir: str) -> None

#cmd_mcp

python
def cmd_mcp(ctx, *, data_dir: str, server_url: str) -> None

#cmd_dev

python
def cmd_dev(ctx, *, host: str, port: int, data_dir: str, vite_port: int) -> None

#cmd_open

python
def cmd_open(ctx, *, host: str, port: int, data_dir: str, browser: bool) -> None

#cmd_diagnose

python
def cmd_diagnose(ctx) -> None

#cmd_stop

python
def cmd_stop(ctx) -> None

#main

python
def main() -> None
Search