diff --git a/muxplex/cli.py b/muxplex/cli.py
index 847cc59..c7b8292 100644
--- a/muxplex/cli.py
+++ b/muxplex/cli.py
@@ -217,6 +217,23 @@ def _check_dependencies() -> None:
def _install_launchd(executable: str) -> None:
"""Install a macOS launchd agent plist to ~/Library/LaunchAgents/."""
+ import shutil
+
+ # Prefer the entry point script ('muxplex') so macOS shows the correct
+ # process name in Activity Monitor, launchctl list, and login items.
+ # Fall back to 'python -m muxplex' if the entry point isn't on PATH.
+ muxplex_bin = shutil.which("muxplex")
+ if muxplex_bin:
+ program_args = f"""
+ {muxplex_bin}
+ """
+ else:
+ program_args = f"""
+ {executable}
+ -m
+ muxplex
+ """
+
label = "com.muxplex"
plist = f"""
@@ -225,11 +242,7 @@ def _install_launchd(executable: str) -> None:
Label
{label}
ProgramArguments
-
- {executable}
- -m
- muxplex
-
+{program_args}
RunAtLoad
KeepAlive
diff --git a/pyproject.toml b/pyproject.toml
index 532c0f0..fd22aec 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -16,6 +16,7 @@ dependencies = [
"websockets>=11.0",
"python-pam>=1.8.4",
"itsdangerous>=2.1.0",
+ "python-multipart>=0.0.9",
]
[project.optional-dependencies]