Your 'Systant. A system daemon on Linux that communicates via MQTT to get diagnostic info from, and send commands to, a Linux computer. Written in Elixir because fuck you, and written mostly by Claude because fuck everything.
Go to file
ryan 4a928b7067 Update CLAUDE.md and fix final Tortoise handler return value
- Add dashboard development commands (just dashboard, mix phx.server)
- Document Dashboard.Application and Dashboard.MqttSubscriber components
- Add comprehensive dashboard section with MQTT configuration details
- Include critical implementation notes for Tortoise handler return values
- Fix handle_message to return {:ok, state} instead of [] to prevent crashes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 19:44:41 -07:00
dashboard Update CLAUDE.md and fix final Tortoise handler return value 2025-08-03 19:44:41 -07:00
nix Fix COOKIE issue by setting RELEASE_COOKIE environment variable 2025-08-02 20:14:24 -07:00
server Clean up stale directories and fix monorepo structure 2025-08-02 21:53:53 -07:00
.envrc Fix flake.nix by removing non-existent pytest-homeassistant-custom-component package 2025-08-02 21:08:44 -07:00
.gitignore Add Home Assistant development environment to flake 2025-08-02 21:00:07 -07:00
CLAUDE.md Update CLAUDE.md and fix final Tortoise handler return value 2025-08-03 19:44:41 -07:00
flake.lock Clean up Nix configuration and remove old files 2025-08-02 19:41:40 -07:00
flake.nix Fix dashboard MQTT connection and remove simulation code 2025-08-03 19:39:59 -07:00
README.md Rename project from system-stats-daemon to systant 2025-08-02 17:06:03 -07:00

Systant

An Elixir application that runs as a systemd daemon to:

  1. Publish system stats to MQTT every 30 seconds
  2. Listen for commands over MQTT and log them to syslog

Configuration

Edit config/config.exs to configure MQTT connection:

config :systant, Systant.MqttClient,
  host: "localhost",
  port: 1883,
  client_id: "systant",
  username: nil,
  password: nil,
  stats_topic: "system/stats",
  command_topic: "system/commands",
  publish_interval: 30_000

Building

mix deps.get
mix compile

Running

# Development
mix run --no-halt

# Production release
MIX_ENV=prod mix release
_build/prod/rel/systant/bin/systant start

Systemd Installation

  1. Build production release
  2. Copy binary to /usr/local/bin/
  3. Copy systant.service to /etc/systemd/system/
  4. Enable and start:
sudo systemctl enable systant
sudo systemctl start systant

Features

  • Publishes "Hello from systant" stats every 30 seconds to system/stats topic
  • Listens on system/commands topic and logs received messages
  • Configurable MQTT connection settings
  • Runs as systemd daemon with auto-restart
  • Logs to system journal