Skip to content

feat(server): Add web server management commands and related tests - #971

Open
kdb17wsl wants to merge 3 commits into
humanfia:mainfrom
kdb17wsl:feat/hmz-server
Open

kdb17wsl wants to merge 3 commits into
humanfia:mainfrom
kdb17wsl:feat/hmz-server

Conversation

@kdb17wsl

Copy link
Copy Markdown

MFCP Task

This pull request introduces a new hmz server command that allows users to install, manage, and check the status of the Humanize web interface as a per-user login service on macOS and Linux. The implementation includes a new CLI subcommand, updates to documentation, and a new Python module to handle service installation and management. The changes ensure that the web interface can be started automatically at login, kept running, and its output logged securely.

The most important changes are:

New CLI command and implementation:

  • Added the server subcommand to the hmz CLI, with support for install, uninstall, and status actions, enabling users to manage the web interface as a login service. The service uses systemd user units on Linux and LaunchAgents on macOS, running hmz web --no-open and logging output to a per-user log file. (src/hmz/cli/__init__.py [1] [2]; new file src/hmz/cli/server.py [3]

Documentation updates:

  • Updated CLI reference documentation to describe the new hmz server command, its subcommands, and behavior on both supported platforms. (docs/reference/cli.md [1] [2]
  • Added user documentation explaining how to run the web interface as a login service and where logs are stored. (docs/user/web.md docs/user/web.mdR34-R53)
  • Documented the files written by hmz server install and the log file locations in the reference files documentation. (docs/reference/files.md docs/reference/files.mdR372-R373)

Protocol specification and compliance:

  • Updated the CLI protocol specification to formally define the hmz server command, its required behavior, service file locations, log handling, and exit codes. (protocol/cli.md [1] [2] [3] [4]

Testing:

What and why

How it was tested

Checklist

  • The title is a Conventional Commit, with ! if it breaks something.
  • New and changed tests are in the right tier: tests/unit/, tests/integration/ or tests/system/ (where a test goes).
  • The docs say what the code now does, and the code matches protocol/. A protocol document changed only where an issue asked for it.
  • uv run pre-commit run --all-files and uv run pytest pass.

@kdb17wsl
kdb17wsl marked this pull request as ready for review November 26, 2026 05:24
@kdb17wsl
kdb17wsl requested a review from futrime as a code owner November 26, 2026 05:24

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant