Support for pkldoc generation via CLI
The same problem exists for Java and Kotlin code generation. Gradle users can use the Gradle plugin.
If I see it correctly, a module for doc gen already exist. The pkl-doc module.
I thought we can simply use this in the pkl-cli module 🤔 can we?
While checking this, I stumbled over the differences how the Gradle plugin declares dependencies compared to how the cli declare dependencies.
While the Gradle plugin uses the pkl-tools fatJar, the cli declares all its dependencies "normally".
~I don't know what the rationale behind this is, but I ask myself if the cli should also declare a dependency like the Gradle plugin or vice versa or... Keep everything like it is? Maybe someone can explain this?! 🙃~ nvmd. The cli can't depend on tools as tools depends on cli...
If we support this, we'd probably publish these as standalone tools. For now, you can use pkl-tools as the "standalone CLI" (see comment here: https://github.com/apple/pkl/discussions/272#discussioncomment-8636479).
I think the goal should be for tools to communicate with Pkl over the binary protocol. Then each tool can have its own, small native executable.