TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Hk, The new Heroku Client written in Go

106 pointsby fyskijover 11 years ago

8 comments

bgentryover 11 years ago
Hi everyone, I&#x27;m the new maintainer of hk. It&#x27;s actually not very new :) You can see that Keith Rarick did most of the work on it over a year ago, along with some other major contributors: <a href="https://github.com/heroku/hk/graphs/contributors" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;heroku&#x2F;hk&#x2F;graphs&#x2F;contributors</a><p>What is new is that I moved it to the Heroku org this week and will be spending a lot of my time turning it into a proper replacement for the Heroku Toolbelt &amp; gem.<p>It&#x27;s still very early stage software, though. There isn&#x27;t currently a supported installation method, and it&#x27;s very far from having all of the necessary features to fully replace the old client. Also, the UX will probably change frequently and things may break, eat your data, etc. So don&#x27;t rely on it just yet :)<p>That being said, I&#x27;m really excited to see where we can take this in the next few months. Hk is already a great starting point. Go is very fast and lightweight, and offers some nice advantages over Ruby on the distribution &amp; installation fronts.<p>Hopefully we&#x27;ll have something exciting to show in a couple months!
pearkesover 11 years ago
I use the two Heroku tools `foreman` and `heroku` regularly. I&#x27;ve recently switched to their Go alternatives, and for one thing, the speed has improved[1].<p>However, the Heroku client is mostly network bound (communicating with their API), and on an average connection this speedup hardly matters.<p>I wonder what the other benefits will be?<p>[1]<p><pre><code> $ time heroku help real 0m0.409s user 0m0.146s sys 0m0.036s $ time hk help real 0m0.008s user 0m0.003s sys 0m0.004s $ time foreman run echo hello real 0m2.062s user 0m0.199s sys 0m0.100s $ time forego run echo hello real 0m0.886s user 0m0.205s sys 0m0.097s</code></pre>
评论 #6598246 未加载
fderpover 11 years ago
Using the heroku client every day, I noticed this new client does not namespace any of the commands. Subcommands of hk are:<p><pre><code> hk create # create app hk destroy # destroy app hk apps # list apps hk set # set config var hk unset #unset config var </code></pre> Compare to heroku&#x27;s (preferable, imho) commands:<p><pre><code> heroku apps:create # create app heroku apps:destroy # destroy app heroku apps # list apps heroku config:set # set config var heroku config:unset # unset config var </code></pre> The command &#x27;hk set&#x27; doesn&#x27;t tell you any semantic information at all about what it&#x27;s doing - I prefer the original syntax for its convention of being explicit.<p>Other than that minor complaint, seems like a really cool project, going to look through the source later.
评论 #6599519 未加载
zimbatmover 11 years ago
Heroku is going to loose Solaris and a couple of other secondary target OSes if they go down that route. Golang can cross-compile to Linux, Darwin, Windows and a couple of BSDs.<p>EDIT: It really seems that they are going down that route. They are also working on a Go implementation of Foreman here: <a href="https://github.com/ddollar/forego" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ddollar&#x2F;forego</a>
评论 #6598572 未加载
评论 #6598059 未加载
评论 #6598274 未加载
评论 #6598909 未加载
评论 #6610860 未加载
miloshadzicover 11 years ago
This is the kind of thing that Go shines at.
neyaover 11 years ago
On a side note, I would like someone with experience here to tell me how you can actually create command line commands? In this case, they seem to use:<p><pre><code> hk &lt;insert command here&gt; </code></pre> I would like to do something like:<p><pre><code> abc &lt;some command&gt; </code></pre> Basically something like a Rails scaffold generator. How difficult&#x2F;easy is this? Googling didn&#x27;t help much..<p>Note: It doesn&#x27;t have to be built with Golang..<p>Thanks<p>Edit: Thanks for the replies :)<p>Note: It doesn&#x27;t have to be just Go, I&#x27;m just asking in general..<p>I would basically like to create a scaffold generator. So, when I do<p><pre><code> abc generate test </code></pre> I would like a file named test.html (or something) generated..<p>Thanks again..
评论 #6597894 未加载
评论 #6597860 未加载
评论 #6597932 未加载
评论 #6597858 未加载
评论 #6600502 未加载
FLUX-YOUover 11 years ago
<p><pre><code> $ hk 47 Statement: Greetings, meatbag</code></pre>
knocteover 11 years ago
Last time I looked at heroku, I had to install some non-open-source command-line tools to interact with it.<p>So I&#x27;m wondering, is this alternative opensource now?
评论 #6597938 未加载
评论 #6597844 未加载