Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Ain is a terminal API client (github.com/jonaslu)
18 points by jonaslu on Aug 17, 2021 | hide | past | favorite | 8 comments



Posted here because I'd like feedback on it.

The backstory is: Ain was born out of the frustration of working with many API-endpoints in GUI clients. While pretty, I could't use any shell-scripts or commands such as `uuidgen` as input to the endpoints without copy pasting from a terminal. And I had to copy-paste the resulting output back into the terminal to further slice and dice it.

I had become a human pipe and my ctrl+c, ctrl+v fingers were hurting.

It's done in go and uses curl and or httpie for making the actual calls.


I think the example is inadequate.

What is "asuslaptop" for example? It is confusing.

Use standard commands in demos, not scripts or aliases.


Oh, so that's the hostname in my bash prompt.

I've gotten so used to it that it didn't even occur to me that it could be confusing.


It's a HTTP API client. There are other things than HTTP out there :-)

Also, don't shell out to curl, that's weak sauce. Use libcurl, it has Go bindings.


Right, while theoretically possible to do other things than HTTP with the curl backend the other sections do not make sense and it's purpose is HTTP. I'll stress the HTTP in the future, thanks!

What would be the benefits of using libcurl instead of shelling out? Would that work without pain on windows?


I think the point is that API isn't just used for HTTP and your title assumes HTTP API


exactly what i have been looking for, can it read it from a text log file and pipe into python or go script if so how?


Great :)

I don't understand what you mean, what do you want to read from a text-file?

Piping it into python or go: Sure. Just read from STDIN in your python or go binary. Or use temp-file redirection if you need to the results from a file.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: