README: add quick start

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YShymaPrXmc3KYRUg2HMSs
This commit is contained in:
ariandClaude Sonnet 5.5 committed 2026-10-16 10:54:13 -04:00
1 parent a7f1288bd1
commit dbe8a8d4e0
1 file changed
+22
+22
View File
@@ -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