Hacker News new | ask | show | jobs
by mfi 1274 days ago
That's a really neat idea!

I built askai (https://github.com/maxvfischer/askai) during the last week to scratch a similar itch of mine. I wanted to be able to quickly get CLI commands that I didn't have on top of mind, by being able to ask questions like "How do you remove a conda environment?" or "How do you get the MX record of a domain using the terminal?".

The CLI I built is a direct integration with GPT3, so it's also possible to ask it other types of questions.

2 comments

Here's the one I built:

Get an OpenAI API key. Then `npm i -g askleo` and set env var OPENAI_API_KEY

`> askleo how large is the average dog`

`> runleo list files in reverse date order`

Note that runleo just executes it without confirmation.

"runleo just executes it without confirmation"

I'm feeling lucky!

This is one step beyond `curl | sh`. Bold move.

It's very unlikely to randomly delete your hard disk, and it's easy to set up a VM or container for development..also it may be a command that you use all the time but can't remember the syntax, and it's just retrieving information.

There are a lot of cases where displaying the command first and asking for a confirmation is just an unnecessary step.

There is also this [1] that shows the links to the sources of its knowledge in the same page

[1]: https://beta.sayhello.so/