evilstudio/homelab-assistant-tool
Composer 安装命令:
composer create-project evilstudio/homelab-assistant-tool
包简介
CLI Tool which can help with manage your homelab devices.
关键字:
README 文档
README
Introduction
Homelab Assistant Tool is an application for homelab operations and automation. It combines a CLI interface with a Web UI for managing devices, UPS units, schedules, and operational logs.
For technical details, see Tech Stack.
✨ Key Features
-
🔌 Device operations- Start, stop, check status, and SSH operations for managed devices (via CLI)
-
🔋 UPS-aware behavior- UPS monitoring support and battery-aware automation logic
-
⏰ Scheduling- Cron-based automation with schedule-to-device assignment
-
🧾 Action logs- Unified action history for
CLI,CRON, andWEBoperations - Log filtering and cleanup tools
- Unified action history for
-
🌐 Web UI- Management views for devices, UPS, schedules, and logs
- Manual operational actions from the browser
-
🔐 Authenticationsimplemode (local username/password)oidcmode (OIDC provider login)
📁 Project Structure
.
├── bin/ # CLI entrypoints and helper scripts
├── config/ # Symfony and app configuration
├── docs/ # Main technical documentation
├── migrations/ # Doctrine migrations
├── public/ # Web entrypoint and built assets
├── src/ # Application source code
│ ├── Command/ # CLI commands (setup, CRUD, runtime, users)
│ ├── Contract/ # Runtime contracts and enums
│ ├── Controller/ # Web controllers
│ ├── Entity/ # Doctrine entities
│ ├── EventSubscriber/ # Request/auth/log subscribers
│ ├── Factory/ # Runtime factories/adapters
│ ├── Helper/ # Configuration and helpers
│ ├── Repository/ # Doctrine repositories
│ ├── Runtime/ # Runtime models
│ └── Service/ # Application, runtime, auth, infrastructure services
├── templates/ # Twig templates (dashboard, devices, ups, schedules, logs, auth)
├── tests/ # Unit, integration, and functional test suites
└── var/ # Runtime data, cache, logs, SQLite files
🚀 Quick Start
You can run HAT in two ways.
Option 1: Docker only (without cloning the full repository)
1. Download docker-compose.yml, .env.example, and config/parameters.yaml
mkdir -p config var/data curl -L -o docker-compose.yml https://raw.githubusercontent.com/evilstudio/homelab-assistant-tool/main/docker-compose.yml curl -L -o .env https://raw.githubusercontent.com/evilstudio/homelab-assistant-tool/main/.env.example curl -L -o config/parameters.yaml https://raw.githubusercontent.com/evilstudio/homelab-assistant-tool/main/config/parameters.yaml
2. Update .env and config/parameters.yaml
Set values for your environment (.env for app/auth settings and OIDC values when using HAT_AUTH_MODE=oidc, config/parameters.yaml for runtime settings).
3. Pull GHCR image
docker compose pull
4. Run initial setup commands
docker compose run --rm hat-app php bin/console hat:setup:configure docker compose run --rm hat-app php bin/console hat:setup:db --init docker compose run --rm hat-app php bin/console hat:user:create
hat:user:create is required only for simple auth mode.
5. Start container
docker compose up -d
6. Open application
Open: http://localhost:8080
Option 2: Clone full project (development/local workflow)
1. Clone repository
git clone https://github.com/evilstudio/homelab-assistant-tool.git
cd homelab-assistant-tool
composer install
cp .env.example .env
2. Update .env
Set values for your environment (application/auth settings, and OIDC values when using HAT_AUTH_MODE=oidc).
3. Run setup commands locally
php bin/console hat:setup:configure
php bin/console hat:setup:db --init
php bin/console hat:user:create # Required only for `simple` auth mode
4. Start an application with an GHCR image
docker compose pull docker compose up -d
5. Or run development compose with local build and Xdebug
docker compose -f docker-compose.dev.yml up -d --build
For local non-docker CLI workflow (optional):
php bin/console list
💻 Commands Overview
Here is a list of commands available in HAT.
| Command | Description |
|---|---|
hat:setup:configure |
Configure app technical settings. |
hat:setup:db |
Initialize/migrate SQLite database. |
hat:setup:init |
Run full setup flow. |
hat:device:create/update/remove/list |
Manage devices. |
hat:ups:create/update/remove/list |
Manage UPS entries. |
hat:schedule:create/update/remove/list |
Manage schedules. |
hat:device:check-status |
Check runtime status for a device. |
hat:device:ssh |
Open SSH session to a device. |
hat:device:start |
Start a device. |
hat:device:stop |
Stop a device. |
hat:cron:execute |
Execute scheduled tasks and maintenance. |
hat:logs:list |
List action logs stored in DB. |
hat:logs:cleanup |
Remove old/all action logs from DB. |
hat:user:create |
Create local user for simple auth mode. |
hat:user:remove |
Remove local user in simple auth mode. |
hat:user:reset-password |
Reset local user password (simple mode). |
🧭 Notes
- Business data is stored in SQLite.
- Integration/functional tests use separate SQLite DB (
var/data/hat_test.sqlite). - Runtime settings are configured in
config/parameters.yaml. - Web logs are written to
var/log/web.log.
🧪 Testing & Quality
Quick Start:
# Run all tests (Xdebug off) bin/phpunit # Run with coverage report bin/phpunit-coverage
📚 Documentation:
- 📖 Test Implementation Summary - Overview and current scope
- 🚀 CI/CD Guide - GitLab pipeline setup
evilstudio/homelab-assistant-tool 适用场景与选型建议
evilstudio/homelab-assistant-tool 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 11 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「tool」 「helper」 「assistant」 「homelab」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 evilstudio/homelab-assistant-tool 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 evilstudio/homelab-assistant-tool 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 evilstudio/homelab-assistant-tool 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Backend Google Sign On for Magento 2
Datetime helpers for timezone handling
An app setting manager tool for laravel nova
Library with classes to help you do batch.
This adds functions about array. If you feel like there few php built-in functions about array, this will be useful.
HTML and form generation
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-14