Conversation
|
@josevalim per our conversation. |
|
I've fleshed this out very nicely in I wanted a good way to distribute and work on this in a way taht doesn't rely on users updating hex, and I wanted to be able to play w/ packages and formats etc. CleanShot_2025-07-17_at_15.12.21.mp4 |
We can add support for "application/vnd.hex+erlang", to hexdocs, that uses erlang binary term format https://github.com/hexpm/hex/blob/main/lib/hex/api.ex#L6. If we have elixir expose it's terminal markdown renderer (IO.ANSI.Docs) as public API we can even pretty print it.
I think the caller should handle errors. |
| @@ -0,0 +1,130 @@ | |||
| defmodule Mix.Tasks.Hex.Docs.Search do | |||
There was a problem hiding this comment.
Would this task fit better under the existing mix hex.seach task? Less pollution of the task namespace.
|
@zachdaniel we now have the new mix hex.search: #1094 My suggestion is to add something like |
Hey folks! This is an initial foray into defininga mix task for searching hex docs. It does the bare minimum right now, but gives us a starting point for discussion. Things to discuss likely include:
This task would be useful for agentic tools in addition to just human use, assuming that we format it as a human readable output. Right now it just dumps the raw JSON (which is fine for agents but bad for humans).
Open to thoughts/critiques, or happy to have this PR closed if this doesn't seem like something we want, or isn't in the place we want it.