Skip to content

hk read ​

  • Usage: hk read
  • Effect: read-only

Serve hk's Pkl modules to pkl as an external module reader

pkl starts this command to read hk: modules, so a config can amends "hk:/Config.pkl" and import "hk:/Builtins.pkl" and get the modules of the installed hk instead of a pinned package. It speaks Pkl's external reader protocol on stdin and stdout and is not meant to be run by hand. Register it in a PklProject:

evaluatorSettings {
  externalModuleReaders {
    ["hk"] { executable = "hk"; arguments { "read" } }
  }
}

or pass --external-module-reader hk='hk read' to pkl eval.

Flags ​

  • -h --help — Print help

Examples ​

Let pkl read hk: modules from the installed hk. pkl starts this command itself.

sh
pkl eval --external-module-reader 'hk=hk read' hk.pkl

Learn more ​

Getting started · Troubleshooting · All commands

MIT LicenseCopyright © 2026jdx.dev