LED feedback for SSH activity - green/blue/red/amber based on login state
  • JavaScript 100%
Find a file
2026-07-02 11:08:14 +00:00
src feat(#1): Core mood engine with auth.log parser and LED states 2026-06-12 12:38:24 +00:00
tests test: add e2e tests 2026-07-02 11:08:11 +00:00
.gitignore chore: add .gitignore, remove node_modules from tracking 2026-06-12 12:38:43 +00:00
cli.js feat(#1): Core mood engine with auth.log parser and LED states 2026-06-12 12:38:24 +00:00
package-lock.json feat(#1): Core mood engine with auth.log parser and LED states 2026-06-12 12:38:24 +00:00
package.json feat(#1): Core mood engine with auth.log parser and LED states 2026-06-12 12:38:24 +00:00
README.md feat(#1): Core mood engine with auth.log parser and LED states 2026-06-12 12:38:24 +00:00

SSH Mood Light

LED feedback for SSH activity - changes color based on login state.

Moods

Color State Description
Green Idle No one connected
Blue Connected Someone logged in
Red Failed Login attempt failed
Amber Active Active session in progress

Usage

# Monitor auth.log (requires root/sudo)
sudo ssh-mood-light /var/log/auth.log

# Mock demo (no hardware needed)
ssh-mood-light --mock

# With webhook
ssh-mood-light --webhook=http://localhost:8080/color /var/log/auth.log

Architecture

auth.log -> parser -> mood engine -> LED controller
                                    -> webhook (optional)

Configuration

JSON config file via --config=:

{
  "fail_cooldown_ms": 10000,
  "initial_state": "green",
  "webhook_url": "http://localhost:8080/color",
  "log_file": "/var/log/auth.log",
  "controller": "mock"
}

Install

npm install
npm test