proto-distro / hermit-packages
AGENTS.md0 starsChanged 17 days agoApache-2.0View on GitHub
This directory contains custom Hermit package definitions for tools not available in the official Hermit registry. Hermit is a tool manager that provides consistent, reproducible tool versions across development environments. Follow these steps to create a new Hermit package for tools that publish binaries to GitHub releases: Create a new .hcl file named after the tool (e.g., mytool.hcl) with this structure: CRITICAL: When initially creating the package file: - The sha256sums field must be present but empty: sha256sums = {}…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bin/hermit-packages/CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
22 rules. About 0 are common, 14 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Follow these steps to create a new Hermit package for tools that publish binaries to GitHub releases:
- Very specific: line 15
Create a new .hcl file named after the tool (e.g., mytool.hcl) with this structure:
- Distinctive: line 54
CRITICAL: When initially creating the package file:
- Distinctive: line 56
Do NOT add comments inside the braces
- Distinctive: line 57
Do NOT manually add any checksums
- Distinctive: line 62
Run this command to automatically download the binaries and add their checksums:
- Distinctive: line 71
Update the HCL file with the correct checksums
- Distinctive: line 83
All required fields are present
- Very specific: line 209
Ensure you ran hermit manifest add-digests
- Distinctive: line 210
Check that all platform URLs are accessible
- Very specific: line 213
Verify the binaries array matches actual binary names
- Very specific: line 214
Check if strip level is correct for the archive structure
- Distinctive: line 217
Verify the GitHub release exists
- Distinctive: line 218
Check URL pattern matches actual release assets
- Distinctive: line 219
Ensure version number is correct
- Very specific: line 222
Use hermit info to see detected platform
- Distinctive: line 223
Ensure platform blocks match: "darwin"/"linux" and "amd64"/"arm64"
- Very specific: line 227
Always use ${version} variable in source URLs for maintainability
- Very specific: line 229
Use auto-version with github-release for automatic updates
- Distinctive: line 230
Keep descriptions concise but informative
- Distinctive: line 231
Test on all supported platforms when possible
- Very specific: line 232
Use meaningful variable names when using vars
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file provides guidance to AI coding assistants when working with Hermit packages in this repository.
Hermit Package Management Overview
This directory contains custom Hermit package definitions for tools not available in the official Hermit registry. Hermit is a tool manager that provides consistent, reproducible tool versions across development environments.
Creating New Hermit Packages
Follow these steps to create a new Hermit package for tools that publish binaries to GitHub releases:
1. Create the Package HCL File
Create a new .hcl file named after the tool (e.g., mytool.hcl) with this structure:
homepage = "https://github.com/owner/repo"
description = "Brief description of the tool"
binaries = ["binary-name"] # List of binaries in the archive
test = "binary-name --version" # Command to test installation
strip = 1 # Number of directory levels to strip from archive (optional)
# Define platform-specific download URLs
platform "darwin" "amd64" {
source = "https://github.com/owner/repo/releases/download/v${version}/tool-macos-x64.tar.gz"
}
platform "darwin" "arm64" {
source = "https://github.com/owner/repo/releases/download/v${version}/tool-macos-arm64.tar.gz"
}
platform "linux" "amd64" {
source = "https://github.com/owner/repo/releases/download/v${version}/tool-linux-x64.tar.gz"
}
platform "linux" "arm64" {
source = "https://github.com/owner/repo/releases/download/v${version}/tool-linux-arm64.tar.gz"
}
# Version with auto-update from GitHub releases
version "X.Y.Z" {
auto-version {
github-release = "owner/repo"
}
}
# IMPORTANT: Leave sha256sums empty - they will be added automatically
sha256sums = {}2. Important Notes on sha256sums
CRITICAL: When initially creating the package file:
- The
sha256sumsfield must be present but empty:sha256sums = {} - Do NOT add comments inside the braces
- Do NOT manually add any checksums
- The checksums will be added automatically in the next step
3. Add SHA256 Checksums
Run this command to automatically download the binaries and add their checksums:
hermit manifest add-digests bin/hermit-packages/mytool.hclThis will:
- Download each platform-specific binary
- Calculate SHA256 checksums
- Update the HCL file with the correct checksums
4. Validate the Package
From the project root directory, validate the manifest:
hermit manifest validateThis ensures:
- Package syntax is correct
- All required fields are present
- URLs are properly formatted
- Checksums match the expected format
5. Test Installation
Install the package to verify it works:
# From project root
source bin/activate-hermit
hermit install mytool@X.Y.Z
# Test the tool
mytool --versionHermit Built-in Variables
Hermit provides several built-in variables that automatically map to platform values:
Architecture Variables
| Variable | darwin/amd64 | darwin/arm64 | linux/amd64 | linux/arm64 |
${arch} | amd64 | arm64 | amd64 | arm64 |
${xarch} | x86_64 | aarch64 | x86_64 | aarch64 |
Operating System Variables
| Variable | darwin | linux |
${os} | darwin | linux |
${xos} | darwin | linux |
Usage Examples
# Using built-in xarch (extended architecture names)
source = "https://github.com/owner/repo/releases/download/v${version}/tool-${xarch}-${os}.tar.gz"
# Results in: tool-x86_64-darwin.tar.gz, tool-aarch64-linux.tar.gz, etc.
# Using built-in arch (standard names)
source = "https://github.com/owner/repo/releases/download/v${version}/tool-${os}-${arch}.tar.gz"
# Results in: tool-darwin-amd64.tar.gz, tool-linux-arm64.tar.gz, etc.Common Patterns for GitHub Releases
Pattern 1: Simple platform-specific archives with built-ins
# When release uses x86_64/aarch64 naming
source = "https://github.com/owner/repo/releases/download/v${version}/tool-${xarch}-${os}.tar.gz"
# No custom vars needed!Pattern 2: Custom variables for non-standard naming
# When release naming doesn't match Hermit's built-ins
platform "arm64" {
vars = { "arch_": "aarch64" }
}
platform "amd64" {
vars = { "arch_": "x86_64" }
}
platform "darwin" {
vars = { "os_": "apple-darwin" }
}
platform "linux" {
vars = { "os_": "unknown-linux-musl" }
}
source = "https://github.com/owner/repo/releases/download/v${version}/tool-v${version}-${arch_}-${os_}.tar.gz"Pattern 3: Overriding for specific platforms
# Use built-ins as default
source = "https://github.com/owner/repo/releases/download/v${version}/tool-${xarch}-${os}.tar.gz"
# Override for specific platform with different naming
platform "darwin" {
source = "https://github.com/owner/repo/releases/download/v${version}/tool-macos-universal.tar.gz"
}Pattern 4: Mixed built-ins and custom vars
# Define custom var for OS naming, use built-in for arch
platform "darwin" {
vars = { "os_name": "macos" }
}
platform "linux" {
vars = { "os_name": "linux" }
}
source = "https://github.com/owner/repo/releases/download/v${version}/tool-${os_name}-${xarch}.tar.gz"
# Results in: tool-macos-x86_64.tar.gz, tool-linux-aarch64.tar.gz, etc.Package Fields Reference
Required Fields
homepage: Project homepage URLdescription: Brief description of the toolbinaries: Array of binary names in the archivesourceor platform-specificsource: Download URL templateversion: Version block with version numbersha256sums: Checksum mapping (empty initially, filled by add-digests)
Optional Fields
test: Command to verify installation (recommended)strip: Number of directory levels to strip from archiveenv: Environment variables to setauto-version: Auto-update configuration for GitHub releasesvars: Platform-specific variable substitutions
Troubleshooting
Common Issues
- "Missing checksums" error
- Ensure you ran
hermit manifest add-digests - Check that all platform URLs are accessible
- Ensure you ran
- "Binary not found" after installation
- Verify the
binariesarray matches actual binary names - Check if
striplevel is correct for the archive structure
- Verify the
- "404 Not Found" during add-digests
- Verify the GitHub release exists
- Check URL pattern matches actual release assets
- Ensure version number is correct
- Platform detection issues
- Use
hermit infoto see detected platform - Ensure platform blocks match: "darwin"/"linux" and "amd64"/"arm64"
- Use
Best Practices
- Always use
${version}variable in source URLs for maintainability - Include a
testcommand to verify successful installation - Use
auto-versionwithgithub-releasefor automatic updates - Keep descriptions concise but informative
- Test on all supported platforms when possible
- Use meaningful variable names when using
vars
Examples in This Repository
See these existing packages for reference:
probe-rs.hcl: Multi-binary tool with platform-specific namingtypos.hcl: Simple tool with variable-based platform detectionclang.hcl: Complex package with development headersuv.hcl: Package with many versions and auto-update
Integration with CI
Hermit packages are automatically validated in CI through GitHub Actions. Ensure your package passes local validation before pushing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

