Created by Jordane Gengo (Titus)
From Hive Helsinki
Highly inspired by macreport (clem)
macinfo client is a lightweight Go agent for macOS that periodically collects detailed system information using osquery and securely syncs it to a remote API. It is designed for fleet management, asset inventory, and compliance monitoring in organizations, but is also useful for individuals who want deep insight into their Mac.
- Collects rich system data: hostname, active user, UUID, USB devices, uptime, last reboot, temperature sensors, OS version
- Uses osquery for robust, extensible data collection
- Sends data as JSON to a configurable API endpoint
- Handles API token management and updates
- Sentry integration for error monitoring
- Configurable sync interval
- Runs as a background service (launchd compatible)
- Simple YAML configuration
- macOS 10.13+
- osquery installed and running (default socket:
/var/osquery/osquery.em) - Go 1.20+ (for development/building)
- Clone the repository:
git clone https://github.com/jgengo/macinfo-client.git cd macinfo-client - Build the binary:
make build # or go build -o macinfo ./cmd/macinfo - Copy the config file:
cp configs/config.yml /etc/macinfo.yml # Or to another location of your choice
The client is configured via a YAML file. Example:
osquery_sock: /var/osquery/osquery.em
api_url: http://localhost:3000
api_token: your_api_token_here
sync_interval: 1 # minutes
sentry_dsn: "your_sentry_dsn"Field explanations:
osquery_sock: Path to the osquery extension manager socketapi_url: Base URL of the API server to sync data toapi_token: API token for authentication (will be updated if server issues a new one)sync_interval: How often (in minutes) to sync datasentry_dsn: (Optional) Sentry DSN for error tracking
You can specify a custom config path at runtime:
./macinfo -cfg /opt/path/you/want/macinfo.ymlRun the client manually:
./macinfoOr with a custom config:
./macinfo -cfg /path/to/macinfo.ymlA sample launchd plist is provided for running MacInfo Client as a background service:
- Copy the plist:
sudo cp configs/fi.hive.macinfo.plist /Library/LaunchDaemons/fi.hive.macinfo.plist
- Edit the
ProgramArgumentsin the plist if your binary/config path differs. - Load the service:
sudo launchctl load /Library/LaunchDaemons/fi.hive.macinfo.plist sudo launchctl start fi.hive.macinfo
The client collects and sends data like:
{
"token": "...",
"hostname": "my-macbook",
"active_user": "johndoe",
"uuid": "C02XXXXXXX",
"usb_devices": [
{ "vendor": "Apple Inc.", "model": "Apple Keyboard" }
],
"uptime": 123456,
"last_reboot": ["Sun Apr 19 11:41"],
"sensors": [
{ "name": "CPU Proximity", "celsius": 54.0 }
],
"os_version": { "version": "13.6.0", "build": "22G120" }
}- Standard Go project layout
- Main entrypoint:
cmd/macinfo/main.go - Core logic:
internal/ - Config:
configs/config.yml - Build with
make buildorgo build
- Created by Jordane Gengo (Titus) @ Hive Helsinki
- Highly inspired by macreport (clem)
MIT License. See LICENSE.