Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

According to the source code (https://github.com/gleitz/howdoi/blob/master/howdoi/howdoi.p...), the answers come from Stack Overflow, searched using Google site search. Howdoi scrapes and prints the first code block in the top answer, or the full text of the top answer if it contains no code block.


Precisely! You can pass the "-a" flag to print the entire answer or "-l" to get the link itself. "-p2" will give the second answer.

I find myself using the following command quite a bit:

open `howdoi print stack trace python -l`


-p2 gives the second search result's answer, not the second answer from the first result. Or so it seems from other replies.


Although not user facing, there is also a DuckDuckGo search endpoint if you don't want to use Google for one reason or another.


That is exactly what I would have guessed. It's basically "I'm feeling lucky" for coding questions.


It should probably use symbolhound.com instead, which does exact symbol queries on stackoverflow content. Google, alas, thinks we are all terrible people for wanting our precious bytes.


That's a nice search tool. I found that the relevance is not quite as good as Google (for example "howdoi get referrer url php") but this could be used when you enter a query that contains symbols.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: