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.

Ask HN: Is there an easy way to release a CLI program for all major platforms?

4 pointsby rlueabout 4 years ago
I just wrote a small CLI program[0] (actually a wrapper for a collection of shell scripts, similar to git) and would like to package it for easy installation on Debian&#x2F;Ubuntu, Red Hat&#x2F;Fedora, Arch, macOS, and hopefully even Windows (via WSL?).<p>Is there a tool or service for making this easy? So far, I&#x27;ve found fpm[1]. I haven&#x27;t dug into it enough to know whether it&#x27;s the solution I&#x27;m looking for, but I also wanted to solicit the community for alternatives in case I&#x27;m missing something even better.<p>The dependencies are minimal (just Ruby stdlib). Here are options I&#x27;ve considered and opted against:<p>• rubygems: I&#x27;m not a huge fan of using a language&#x27;s package manager for end-user software. What happens when the system upgrades its version of Ruby? Does the user have a ruby version manager like rvm or rbenv installed? and so on.<p>• docker: a couple weeks back, an article entitled &quot;Run More Stuff in Docker&quot; was trending here[2]. I like the idea, but the approach is a minor hobby unto itself and way too burdensome to ask of general-audience, potentially not-very-technical end-users.<p>My program is simple enough that I hope it could be used as an introduction to CLI concepts&#x2F;UNIX&#x2F;shell pipes for the uninitiated; someone should not have to be a developer to use it or understand how it works. Assuming a very limited familiarity with the command line, I want to offer install instructions that make no assumptions about the user&#x27;s system and should always just work; e.g., `brew install cram` &#x2F; `sudo dpkg -i cram.deb` &#x2F; etc.<p>[0]: https:&#x2F;&#x2F;github.com&#x2F;rlue&#x2F;cram<p>[1]: https:&#x2F;&#x2F;github.com&#x2F;jordansissel&#x2F;fpm<p>[2]: https:&#x2F;&#x2F;jonathan.bergknoff.com&#x2F;journal&#x2F;run-more-stuff-in-docker&#x2F;

1 comment

matheistabout 4 years ago
Very timely question, considering &#x27;jart&#x27;s work has been at the top of HN in the last couple days[+]. Take a look at <a href="https:&#x2F;&#x2F;justine.lol&#x2F;ape.html" rel="nofollow">https:&#x2F;&#x2F;justine.lol&#x2F;ape.html</a> especially the portable Javascript interpreter. If you go that route you&#x27;d want to adapt it to Ruby. That&#x27;d be some nontrivial work, most likely, but it&#x27;d definitely be pretty neat.<p>[+] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26273960" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26273960</a>