4 ms·
Show HN: Ain is a terminal API client
- jonaslu 5y agoPosted 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.
- noloblo 5y agoexactly 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?
- jonaslu 5y agoGreat :) 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.
- the_biot 5y agoIt'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.
- jonaslu 5y agoRight, 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?
- somidscr21 5y agoI think the point is that API isn't just used for HTTP and your title assumes HTTP API
- 29athrowaway 5y agoI think the example is inadequate. What is "asuslaptop" for example? It is confusing. Use standard commands in demos, not scripts or aliases.
- jonaslu 5y agoOh, 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.