diff --git a/README.md b/README.md index 6a2b64d..fc331b0 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,28 @@ A small, read-only monitor for a single Linux host. One binary, `slinuxm`, serve Data sources are systemd (D-Bus), the journal (libsystemd) and the Docker Engine API (unix socket). Nothing here can start, stop or modify anything. +## Quick start + +Try it on your own machine in a minute. It needs no root and no install, and it keeps its token database in a temp directory. + +```sh +devenv shell && cargo build --release # or just: cargo build --release with the prerequisites below +export SKYG_AUTH__DB_PATH=/tmp/slinuxm-demo/db.sqlite +BIN=target/release/slinuxm + +TOKEN=$($BIN token create demo) # printed once, never stored in plaintext +$BIN serve & # http://127.0.0.1:9109, loopback only + +curl -s http://127.0.0.1:9109/healthz # public +curl -s -H "Authorization: Bearer $TOKEN" 'http://127.0.0.1:9109/api/v1/systemd/units?state=failed' +curl -s -H "Authorization: Bearer $TOKEN" 'http://127.0.0.1:9109/api/v1/journal?priority=err&lines=20' +curl -s -H "Authorization: Bearer $TOKEN" http://127.0.0.1:9109/api/v1/docker/ps # 503 if Docker is not running +``` + +Point an MCP client at `http://127.0.0.1:9109/mcp` with the same bearer header (see [MCP](#mcp)). Stop the server with `kill %1`. + +The service listens on loopback by default. To reach it from another machine set `server.bind`, keep auth on, and use [TLS](#tls). For a permanent install as a systemd service, see [Install](#install) and [Tokens](#tokens). + ## Build ```sh