ai-monitor
Proactive system monitoring daemon with anomaly detection and suggestions
File Information
| Property | Value |
|---|---|
| Binary Name | ai-monitor |
| Version | 9.8.4 |
| Build Date | Not disclosed |
| Rust Version | 1.82.0 |
| File Size | 8.0MB |
| Author | Warith Al Maawali |
| License | Proprietary |
| Category | Kodachi Binary |
| Description | Proactive system monitoring daemon with anomaly detection and suggestions |
| Git Commit | unknown |
| Metadata Generated | 2026-08-10T13:22:47Z |
| Binary Timestamp | Unknown |
| JSON Data | View Raw JSON |
SHA256 Checksum
e24f0809c2edbc3cbb57fa3d4795b304baf82d715e9c81d508a815caa61ae206
Features
| # | Feature |
|---|---|
| 1 | Advanced functionality for Kodachi OS |
Security Features
| Feature | Description |
|---|---|
| Input Validation | Argument parsing via clap; per-command validation is the consumer's responsibility |
| Rate Limiting | Not provided by cli-core |
| Authentication | Not provided by cli-core (see online-auth) |
| Encryption | Not provided by cli-core |
System Requirements
| Requirement | Value |
|---|---|
| OS | Linux (Debian-based) |
| Privileges | root/sudo for system operations |
| Dependencies | OpenSSL, libcurl |
Global Options
| Flag | Description |
|---|---|
-h, --help |
Print help information |
-v, --version |
Print version information |
-n, --info |
Display detailed information |
-e, --examples |
Show usage examples |
--json |
Output in JSON format |
-o, --output-format <FORMAT> |
Force output format (text|json) |
--json-pretty |
Pretty-print JSON output with indentation |
--json-human |
Enhanced JSON output with improved formatting (like jq) |
--json-filter <FIELD1,FIELD2> |
Return only specified JSON fields (comma-separated) |
--fields <FIELD_LIST> |
Select specific fields to include in output (comma-separated) |
--limit <NUMBER> |
Limit number of results returned |
--offset <NUMBER> |
Skip first N results (for pagination) |
-d, --work-dir <PATH> |
Working directory (defaults to auto-detected base directory) |
--port <PORT> |
Set custom port number (1024-65535) |
--log-level <LEVEL> |
Set log level (error|warn|info|debug) |
--verbose |
Enable verbose output |
--quiet |
Suppress non-essential output |
--no-color |
Disable colored output |
--config <FILE> |
Use custom configuration file |
--timeout <SECS> |
Set operation timeout in seconds (optional; no default applied) |
Commands
Monitoring
start
Start the system monitoring daemon
Usage:
ai-monitor start [OPTIONS]
Options:
-i, --interval <SECONDS>: How often the monitor re-checks the system, in seconds-s, --threshold <SCORE>: Security score (1 to 100) below which the monitor raises an alert-d, --daemon: Install the systemd unit if missing and run under systemd instead of in this shell. Requires root--json: Emit the start result as a JSON envelope
Examples:
ai-monitor start
ai-monitor start --interval 60
ai-monitor start --interval 60 --threshold 80
sudo ai-monitor start --daemon
status
Show current monitor status and statistics
Usage:
ai-monitor status [--verbose] [--json]
Options:
--verbose: Also report database statistics and which monitors (VPN, Tor, DNS, security) are enabled--json: Emit status, message, is_running, active_suggestions, last_check and config as a JSON envelope
Examples:
ai-monitor status
ai-monitor status --verbose
ai-monitor status --json
Service Management
service
Manage the ai-monitor systemd service lifecycle
Usage:
ai-monitor service <ACTION>
Options:
<ACTION>: install (write the unit file), uninstall (stop, disable and remove it), enable (start at boot), disable (do not start at boot), status (read-only). Everything except status requires root--force: With 'install': overwrite a unit file that is not recognized as ai-monitor's own output (e.g. an administrator-customized unit). Ignored by other actions--json: Emit the action result as a JSON envelope
Examples:
sudo ai-monitor service install
sudo ai-monitor service install --force
sudo ai-monitor service enable
ai-monitor service status
sudo ai-monitor service disable
sudo ai-monitor service uninstall
Suggestions
suggestions
List and manage proactive suggestions
Usage:
ai-monitor suggestions [OPTIONS]
Options:
-c, --category <CATEGORY>: Show only one category: security, network, recovery or optimization-r, --resolve <ID>: Mark the suggestion with this ID as resolved. Write operation, needs a prior online-auth login-d, --dismiss <ID>: Mark the suggestion with this ID as dismissed. Write operation, needs a prior online-auth login--cleanup: Delete old inactive suggestions from the database. Write operation, needs a prior online-auth login--json: Emit the suggestion list or the write result as a JSON envelope
Examples:
ai-monitor suggestions
ai-monitor suggestions --json
ai-monitor suggestions --category security
ai-monitor suggestions --resolve 1
ai-monitor suggestions --dismiss 2
ai-monitor suggestions --cleanup
Operational Scenarios
Scenario-oriented workflows generated from the binary's built-in -e --json examples.
Scenario 1: Basic Usage
Look at what the monitor currently knows: is it running, and what has it suggested.
Step 1: Show whether the monitor is running and how many suggestions are open
ai-monitor status
Step 2: Same status as a JSON envelope for the dashboard or a script
ai-monitor status --json
Step 3: Add the SQLite database stats and which monitors are enabled
ai-monitor status --verbose
Note
--verbose adds database{page_count, page_size, freelist_count, total_size_bytes, unused_bytes} and monitoring{vpn_enabled, tor_enabled, dns_enabled, security_enabled} to the JSON form.
Step 4: List every open proactive suggestion
ai-monitor suggestions
Step 5: List open suggestions as JSON
ai-monitor suggestions --json
Step 6: Run the monitoring loop in this terminal (not as a service)
ai-monitor start
Note
Foreground run. Use `service` or `start --daemon` if you want it to survive the shell.
Scenario 2: Tuning the Monitor
Change how often the monitor checks the system and how low the security score has to drop before it raises an alert.
Step 1: Check every 60 seconds and alert below a security score of 80
ai-monitor start --interval 60 --threshold 80
Note
--interval is in seconds (default 30). --threshold is a security score of 1 to 100 (default 70). Short forms are -i and -s.
Step 2: Start a tuned foreground monitor and capture the config as JSON
ai-monitor start --interval 60 --threshold 80 --json
Step 3: Only look at security suggestions
ai-monitor suggestions --category security
Note
--category accepts exactly: security, network, recovery, optimization. Anything else is rejected by clap.
Step 4: Only look at network suggestions
ai-monitor suggestions --category network
Step 5: Filtered suggestions as JSON for automation
ai-monitor suggestions --category security --json
Scenario 3: Service Management
Run the monitor as a systemd unit so it survives logout and reboot. The unit file is generated at install time with the real binary path.
Step 1: Install the unit if needed and start the monitor under systemd
sudo ai-monitor start --daemon
Note
Needs root: it writes the unit file and calls systemctl. Without sudo it fails with 'This operation requires root privileges.'
Step 2: Only write the systemd unit file, do not start it
sudo ai-monitor service install
Note
Needs root.
Step 3: Start the monitor automatically on every boot
sudo ai-monitor service enable
Note
Needs root. Install the service first, enable only creates the boot link.
Step 4: Stop the monitor from starting at boot, leave it installed
sudo ai-monitor service disable
Note
Needs root. A currently running instance keeps running until it is stopped.
Step 5: Check whether the service is installed, active and enabled
ai-monitor service status
Note
The only service action that does not need root.
Step 6: Service state as JSON for the dashboard
ai-monitor service status --json
Step 7: Stop, disable and delete the systemd unit
sudo ai-monitor service uninstall
Note
Needs root. Destructive: the unit file is removed and the monitor stops running at boot. Collected suggestions in the database are not touched.
Scenario 4: Suggestion Maintenance
Act on suggestions: resolve one you have fixed, dismiss one you do not care about, or prune the old inactive ones.
Step 1: Mark suggestion 1 as resolved because you acted on it
ai-monitor suggestions --resolve 1
Note
Write operation: requires a prior `online-auth` login, otherwise it exits with 'Authentication required. Please authenticate using online-auth first'. The ID comes from `ai-monitor suggestions`.
Step 2: Dismiss suggestion 2 without claiming you fixed anything
ai-monitor suggestions --dismiss 2
Note
Write operation: requires a prior `online-auth` login.
Step 3: Delete old inactive suggestions from the database
ai-monitor suggestions --cleanup
Note
Write operation: requires a prior `online-auth` login. Irreversible: the pruned rows are deleted from the local database.
Step 4: Review the optimization suggestions before acting on them
ai-monitor suggestions --category optimization
Step 5: Review the recovery suggestions
ai-monitor suggestions --category recovery
Environment Variables
| Variable | Description | Default | Values |
|---|---|---|---|
NO_COLOR |
Disable all colored output when set | unset | 1|true|yes (any value disables color) |
Exit Codes
| Code | Description |
|---|---|
| 2 | Invalid arguments |
| 1 | General error |
| 0 | Success |
| 3 | Permission denied |
| 4 | Network error |
| 5 | File not found |