Add terminal TUI and shell completion
This commit is contained in:
parent
a7535cfc56
commit
cab60cd633
11 changed files with 612 additions and 0 deletions
|
|
@ -365,6 +365,31 @@ Exit code:
|
|||
- `0`: daemon is running and the heartbeat is fresh.
|
||||
- `1`: daemon is down or the heartbeat is stale.
|
||||
|
||||
### `tui` / `enodia-sentinel-tui`
|
||||
|
||||
```bash
|
||||
enodia-sentinel tui
|
||||
enodia-sentinel-tui
|
||||
```
|
||||
|
||||
Opens the stdlib curses terminal dashboard for SSH/tmux operators. It does not
|
||||
require the optional tray dependencies and reads the same local state as the CLI:
|
||||
daemon status, recent alert snapshots, incident index, and event-rule metadata.
|
||||
|
||||
Keys:
|
||||
|
||||
- `1` / `2` / `3` / `4`: status, alerts, incidents, rules.
|
||||
- `j` / `k` or arrows: scroll.
|
||||
- `r`: refresh.
|
||||
- `/`: filter the current view.
|
||||
- `:`: command mode.
|
||||
- `Tab`: complete command names in command mode.
|
||||
- `Ctrl-L`: redraw.
|
||||
- `q`: quit.
|
||||
|
||||
Command mode supports `status`, `alerts`, `incidents`, `rules`, `help`,
|
||||
`refresh`, `filter <text>`, `clear`, and `quit`.
|
||||
|
||||
### `web`
|
||||
|
||||
```bash
|
||||
|
|
@ -401,6 +426,25 @@ from `status --json`, and runs `check --json` on demand with the result shown
|
|||
as a desktop notification. Requires the `[tray]` extra (`pystray`, `Pillow`);
|
||||
the core agent stays dependency-free without it.
|
||||
|
||||
### `completion`
|
||||
|
||||
```bash
|
||||
enodia-sentinel completion bash
|
||||
enodia-sentinel completion zsh
|
||||
```
|
||||
|
||||
Prints a shell completion script for the CLI. Example installs:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.local/share/bash-completion/completions
|
||||
enodia-sentinel completion bash > ~/.local/share/bash-completion/completions/enodia-sentinel
|
||||
|
||||
mkdir -p ~/.zfunc
|
||||
enodia-sentinel completion zsh > ~/.zfunc/_enodia-sentinel
|
||||
```
|
||||
|
||||
For zsh, ensure `~/.zfunc` is in `fpath` before `compinit`.
|
||||
|
||||
### `triage`
|
||||
|
||||
```bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue