Skip to content

serve_service_cmd

diapason.cli.serve_service_cmd

CLI: diapason serve-service — keep the API server running at login.

The desktop app talks to the Python backend on 127.0.0.1:8000. Without this, the app shows "Backend unreachable" until someone remembers to run diapason serve in a terminal — and loses it again when that terminal closes.

Unlike the dictation agent, this one needs no TCC permissions: it opens a loopback socket and touches neither the keyboard nor the microphone. So it installs and works in one step.

install(host, port, maillage_reseau, lan_port, allow_network)

Run the API server at login, in the background.

logs(lines)

Print the tail of the API server logs.

restart()

Restart the API server.

serve_service()

Manage the background API server (macOS LaunchAgent).

status()

Show whether the API server agent is loaded and answering.

uninstall()

Stop the API server and remove it from login.