Package Registry
The HIL Package Registry is an npm-style registry for LISP libraries, hardware drivers, and IoT integrations. It provides package discovery, distribution, and version management (npm, 2024).
Registry Architecture
API Reference
List Packages
# Get package count and registry info
curl http://localhost:3002/api
# Response:
{
"name": "HIL Package Registry",
"version": "1.0.0",
"packages": 133
}
Search Packages
# Search all packages
curl http://localhost:3002/api/search?q=
# Search by keyword
curl http://localhost:3002/api/search?q=sensor
# Search by category
curl http://localhost:3002/api/search?q=&category=sensors
# Response:
{
"packages": [
{
"name": "dht11-humidity",
"version": "1.0.0",
"description": "DHT11 humidity and temperature sensor driver",
"category": "sensors"
}
],
"total": 21
}
Get Package Info
# Get detailed package info
curl http://localhost:3002/api/packages/dht11-humidity
# Response includes: name, version, description, author, category,
# files, dependencies, hil.json, README
Download Package
# Download package tarball
curl http://localhost:3002/api/packages/dht11-humidity/download -o dht11-humidity.tar.gz
Package Categories
| Category | Count | Description |
|---|---|---|
sensors | 21 | Environmental, motion, distance sensors |
communication | 11 | UART, SPI, I2C, WiFi drivers |
displays | 10 | LCD, OLED, LED matrix drivers |
utilities | 8 | Math, string, array helpers |
control-systems | 7 | PID, state machines, filters |
iot | 6 | MQTT, cloud, connectivity |
storage | 5 | EEPROM, SD card, flash memory |
data-science | 5 | Statistics, signal processing |
development-tools | 5 | Debugging, testing, logging |
graphics | 4 | Primitives, animations |
audio | 4 | Tone, melody, buzzer |
robotics | 4 | Motor control, odometry |
gaming | 4 | Random, dice, scoring |
home-automation | 4 | Thermostat, lighting, security |
power-management | 4 | Battery, sleep modes |
safety-security | 4 | Watchdog, encryption |
networking | 4 | Protocols, discovery |
education | 4 | Learning, experiments |
examples-advanced | 3 | Advanced usage patterns |
community-templates | 3 | Project templates |
sensors-specialized | 4 | Precision and specialty sensors |
Package Structure
Each package follows a standard layout:
package-name/
├── hil.json # Package metadata
├── metadata.json # Registry metadata
├── README.md # Documentation
├── lib/
│ └── main.hil # Main library code
├── examples/
│ └── demo.hil # Usage examples
└── tests/
└── test.hil # Tests
hil.json Format
{
"name": "dht11-humidity",
"version": "1.0.0",
"description": "DHT11 humidity and temperature sensor driver",
"author": "HIL Community",
"category": "sensors",
"files": ["lib/main.hil"],
"dependencies": {}
}
Publishing Packages
# Publish a package to the registry
hilp publish ./my-package
# Publish with authentication
hilp publish ./my-package --token YOUR_TOKEN
References
npm, Inc. (2024). npm documentation. https://docs.npmjs.com