feat: manage.py cross-platform product manager #18
No reviewers
Labels
No labels
architecture
backlog
enhancement
module:documents
module:hardware
module:manage
module:pipeline
module:voice
priority:backlog
priority:high
priority:medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/circuitforge-core#18
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/manage-py"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #6
circuitforge_core.managemodule — replaces bash-onlymanage.shdocker compose(v2 plugin) ordocker-compose(v1 fallback); auto-detected when Docker is available and a compose file existsplatformdirspaths; cross-platform kill (SIGTERM/SIGKILL on Unix,taskkill /Fon Windows); polling log tail (notail -f)manage.toml: product config — app name, URL, compose file, native service listinstall-shimscommand: writesmanage.sh+manage.ps1into the product directorypython -m circuitforge_core.manageentry pointcf-manageconsole scriptTest plan
pytest tests/test_manage/— 36 tests (config 6, docker_mode 9, native_mode 21)python -m circuitforge_core.manage --helpfrom any product dirpython -m circuitforge_core.manage install-shimsgenerates shims- circuitforge_core.manage module — replaces bash-only manage.sh - config.py: ManageConfig from manage.toml (TOML via tomllib/tomli) app name, default_url, docker compose_file/project, native services Falls back to directory name when no manage.toml present - docker_mode.py: DockerManager wrapping 'docker compose' (v2 plugin) or 'docker-compose' (v1 fallback); docker_available() probe Commands: start, stop, restart, status, logs, build - native_mode.py: NativeManager with PID file process management platformdirs for platform-appropriate PID/log paths Windows-compatible log tailing (polling, no tail -f) Cross-platform kill: SIGTERM→SIGKILL on Unix, taskkill /F on Windows - cli.py: typer CLI — start/stop/restart/status/logs/build/open/install-shims Mode auto-detection: Docker available + compose file → docker; else native --mode docker|native|auto override - templates/manage.sh: bash shim (conda, venv, python3 detection) - templates/manage.ps1: PowerShell shim (same detection, Windows) - templates/manage.toml.example: annotated config template - __main__.py: python -m circuitforge_core.manage entry point - pyproject.toml: manage extras group (platformdirs, typer) cf-manage console script; version bumped to 0.5.0 - 36 tests: config (6), docker_mode (9), native_mode (21)