News for hackers. Stuff that matters.
Re:Show HN: Interact with the terminal in plain English usin... by quartz on Friday January 27, 2023 @01:26PM (#34549733)
This looks really cool. The number of times I've had to google things like "delete all files that were created before a certain date but not if they have certain characters or are a certain extension" is uncountable.

Kind of wish the command was just "genie" though. Suppose I could ask it how to change the name.

Re:Show HN: Interact with the terminal in plain English usin... by bamboozled on Friday January 27, 2023 @01:35PM (#34549863)
Looks cool? Won’t be that cool when it decides to delete random shit off your computer.
Re:Show HN: Interact with the terminal in plain English usin... by kris_wayton on Friday January 27, 2023 @01:44PM (#34549973)
I suppose you would have to know to run "list all files that..." prior to "delete all files that...".
Re:Show HN: Interact with the terminal in plain English usin... by jacquesm on Friday January 27, 2023 @01:49PM (#34550037)
That's just asking for it. A nice little model reload in the middle of those two statements, or maybe the difference between 'delete' and 'list' is enough to enable 'evil mode' which then does something entirely different.

I'd list the files to a file and then process that file after checking for errors in a way that doesn't allow for new errors to be introduced. Better still I'd ask it to generate a command which lists the files, look it over, execute it and if that lists the right files manually change the 'ls' to 'rm'. Otherwise you're at the mercy of the gods. Who are like sysops: subtle and quick to anger.

Re:Show HN: Interact with the terminal in plain English usin... by dylanjcastillo on Friday January 27, 2023 @01:51PM (#34550068)
It won’t run any command unless you explicitly tell it to do so.

But yes I’d also like to provide some sort of warning if a certain command “looks dangerous”. I’ve been thinking about what's the best approach.

Re:Show HN: Interact with the terminal in plain English usin... by woolcap on Friday January 27, 2023 @02:57PM (#34550960)
Ask GPT-3 for its opinion, "does this command look potentially dangerous?"
Re:Show HN: Interact with the terminal in plain English usin... by dylanjcastillo on Friday January 27, 2023 @01:47PM (#34550014)
Thanks! I thought of using a shorter name but the ones I liked were already used in pypi.

You can always add `alias genie=shell-genie` to your .bashrc or .zshrc file :)

Re:Show HN: Interact with the terminal in plain English usin... by jacquesm on Friday January 27, 2023 @01:49PM (#34550047)
Suggest renaming it to 'please'.
Re:Show HN: Interact with the terminal in plain English usin... by phonescreen_man on Friday January 27, 2023 @02:24PM (#34550526)
Kind of wish the command was just "genie" though

Rename the binary? Or create an alias in your shell profile