Non-interactive query
i-am-the-slime opened this issue · 4 comments
Is it possible to issue a request to the CLI without starting an interactive session?
@i-am-the-slime this should work, but it's maybe not the best since I suspect we mix logging to stderr and stdout:
echo "Aff" | spago search
Another improvement for this could be to have a flag to return the results in JSON
@i-am-the-slime, as @f-f pointed out, you could just write your query to stdin and kill the process after receiving output. Could you please describe how your intended use case differs from that?
Thanks for the suggestion @f-f and @klntsky ! I just realised that docs search builds the project first and doesn't work in the face of errors. I was hoping to use it during development as a fallback to provide results when typed holes only find unsafeCoerce and friends. But that state by definition does not build. I think this is too far from the intended use case of docs-search. I'll close this for now.