Skip to content

Repository files navigation

hillm — Hardware Interface LLM

AI Cost Tracking

PyPIVersionPythonLicenseAI CostHuman TimeModel

  • 🤖 LLM usage: $0.7734 (14 commits)
  • 👤 Human dev: ~$1208 (12.1h @ $100/h, 30min dedup)

Generated on 2026-07-07 using openrouter/qwen/qwen3-coder-next


Control platform hardware through a unified registry and transport layer:

  • Displays / HDMIxrandr, wlr-randr
  • Cameras — V4L (/dev/video*)
  • Audio — microphones / speakers via PulseAudio
  • Input — keyboard / mouse discovery (/dev/input)
  • USBlsusb enumeration
  • Serial / RS232 / RS485pyserial
  • Modbus RTU/TCPpymodbus
  • MQTT / HTTP — network device gateways

Pairs with:

PackageRole
gillmGUI / IDE keyboard injection
tillmShell LLM clients (aider, codex, …)
hillmPhysical devices and field interfaces

Install

cd /home/tom/github/semcod/hillm
make install-dev # uv sync + control layer (recommended)
cp examples/env.example .env # HILLM_DRY_RUN=1 for safe local dev
make install-transports # + serial/modbus/mqtt
make help# all targets

Or manually:

uv sync --all-packages --extra dev # recommended (workspace + dev tools)# pip fallback:
pip install -e ".[dev]"
bash packages/install-dev.sh # editable *2hillm adapters
pip install -e ".[serial,modbus,mqtt]"# optional transports

CLI

hillm devices
hillm scan
hillm read --device camera-usb --dry-run
hillm write --device actuator-relay --value 1 --register coil:0 --dry-run
hillm actuate --device display-primary --action on
hillm status --ecosystem

DSL / integrations

# DSL — hardware verbs dry-run by default
dsl2hillm HEALTH
dsl2hillm 'READ DEVICE sensor-temp'# URI — dry-run by default; --live for real hardware
uri2hillm HEALTH
uri2hillm 'READ DEVICE sensor-temp'
uri2hillm 'hillm://cmd/READ?device=camera-usb&dry_run=true'# NLP — --apply is dry-run by default
nlp2hillm "read temperature from serial"
nlp2hillm "read temperature from serial" --apply
nlp2hillm "read temperature from serial" --apply --live
# REST (port 8218)
rest2hillm --port 8218
curl -X POST http://127.0.0.1:8218/v1/dsl -d HEALTH
# nlp2uri: pip install nlp2uri[hillm]
uri2hillm 'hillm://cmd/HEALTH'

Dry-run policy per adapter: docs/control-layer.md.

Architecture

hillm (core)
registry.py — device catalog + aliases + suggest_device_ids()
resolve.py — NL keywords → device id (shared by nlp2hillm)
project_env.py — .env bootstrap + apply_execution_policy()
controller.py — read / write / actuate / connect
transports/ — serial, modbus, mqtt, display, v4l, audio, usb, …
compat.py — Koru backend + tool registry exports
packages/
dsl2hillm — CQRS bus (single mutation point)
uri2hillm — hillm:// URI + DSL shorthand
nlp2hillm — NL → DSL (--apply dry-run default)
cli2hillm — shell passthrough
mcp2hillm — MCP tools
rest2hillm — REST API (:8218)

Examples

Runnable smoke scripts in examples/ — full index: examples/README.md.

bash packages/install-dev.sh
cp examples/env.example .env # optional
bash examples/run-all-dry-run.sh
make test-examples
CategoryScripts
CLIdevices · scan · read dry-run · status ecosystem · status mouse
DSLsmoke · read sensor-temp · devices usb
NLPtemperature · mouse port PL · apply live temp · check serial
URIdispatch · shorthand read · decode
Devicesdisplay · camera · mouse live · sensor temp · serial resolve

Tests

make test# core + control layer (70+ tests)
make test-examples # examples/**/*.sh smoke (40+ scripts)
make examples # bash examples/run-all-dry-run.sh

Documentation

DocContent
docs/README.mdDocumentation index
docs/configuration.mdEnv vars, install profiles, ports
docs/control-layer.md*2hillm adapters (DSL, URI, REST, MCP)
packages/README.mdControl layer package matrix
examples/README.mdRunnable smoke scripts
CHANGELOG.mdRelease history
TODO.mdRoadmap and open items

Environment

VariablePurpose
HILLM_DRY_RUNForce dry-run transport globally
OPENROUTER_API_KEYEnable LLM mapping in nlp2hillm (via litellm)
LLM_MODELOpenRouter model (default: openrouter/qwen/qwen3-coder-next)
HILLM_MODBUS_HOSTDefault Modbus TCP host
HILLM_MQTT_URLDefault MQTT broker URL
HILLM_<DEVICE>_ADDRESSPer-device address override

License

Licensed under Apache-2.0.

About

Hardware Interface LLM — control displays, cameras, audio, USB, serial, Modbus, and more.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages