Skip to main content

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​

CategoryCountDescription
sensors21Environmental, motion, distance sensors
communication11UART, SPI, I2C, WiFi drivers
displays10LCD, OLED, LED matrix drivers
utilities8Math, string, array helpers
control-systems7PID, state machines, filters
iot6MQTT, cloud, connectivity
storage5EEPROM, SD card, flash memory
data-science5Statistics, signal processing
development-tools5Debugging, testing, logging
graphics4Primitives, animations
audio4Tone, melody, buzzer
robotics4Motor control, odometry
gaming4Random, dice, scoring
home-automation4Thermostat, lighting, security
power-management4Battery, sleep modes
safety-security4Watchdog, encryption
networking4Protocols, discovery
education4Learning, experiments
examples-advanced3Advanced usage patterns
community-templates3Project templates
sensors-specialized4Precision 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