feat: Phase 7 — CLI complet (start/serve/stop/status/config/logs)

- Gestion PID (write/read/remove + verification processus)
- cmd_start: lance watcher + dashboard avec Ctrl+C graceful shutdown
- cmd_serve: dashboard seul (Linux) avec --no-watcher
- cmd_stop: kill processus via SIGTERM/OpenProcess + nettoyage PID
- cmd_status: affiche PID, dashboard URL, config, polling
- cmd_config show/set/reset: gestion dotted keys (imago.url, watcher.*, etc.)
- cmd_logs: affiche derniers logs
- Fix Default derives: ImagoConfig, DedupConfig, UiConfig, LoggingConfig
- Ajout dependances: open, libc (Unix)
- Watcher::run(self) au lieu de &self pour Send
- tests: start → API /api/health OK → stop → status OK
- 0 errors, 0 warnings (cargo check + cargo build --release)
This commit is contained in:
2026-06-22 16:57:41 -04:00
parent 38f274c3d5
commit b680c0fff7
6 changed files with 544 additions and 28 deletions
Generated
+39 -1
View File
@@ -1196,7 +1196,9 @@ dependencies = [
"arboard",
"axum",
"clap",
"libc",
"notify",
"open",
"reqwest",
"rusqlite",
"rust-embed",
@@ -1259,6 +1261,25 @@ version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
[[package]]
name = "is-docker"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3"
dependencies = [
"once_cell",
]
[[package]]
name = "is-wsl"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5"
dependencies = [
"is-docker",
"once_cell",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
@@ -1755,6 +1776,17 @@ version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
[[package]]
name = "open"
version = "5.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fbaa89d2ddc8473c78a3adf69eea8cffa28c483b8e02a971ef31527cd0fc92c"
dependencies = [
"is-wsl",
"libc",
"pathdiff",
]
[[package]]
name = "option-ext"
version = "0.2.0"
@@ -1809,6 +1841,12 @@ dependencies = [
"windows-link",
]
[[package]]
name = "pathdiff"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
[[package]]
name = "percent-encoding"
version = "2.3.2"
@@ -1988,7 +2026,7 @@ dependencies = [
"once_cell",
"socket2",
"tracing",
"windows-sys 0.52.0",
"windows-sys 0.60.2",
]
[[package]]