Ruby: A great language for shell scripts

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. truffleruby

    A high performance implementation of the Ruby programming language, built on GraalVM.

    It's not quite what you're describing, but TruffleRuby is Ruby on GraalVM:

    https://github.com/oracle/truffleruby

    Unlike GraalVM Java, as far as I can tell TruffleRuby doesn't provide a bundler that can create a single executable out of everything.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. Ammonite-Ops

    Scala Scripting

    for Scala there's Ammonite which can do this https://ammonite.io/#MagicImports

  4. Nuitka

    Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4-3.13. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.

    You could try Nuitka [1], but I don't have enough experience with it to say if it's any less brittle than PyInstaller.

    [1]: https://nuitka.net/

  5. buildpacks

    Heroku Cloud Native Buildpacks (by heroku)

    Bootstrapping and different behavior for different versions and not being able to use the dependency ecosystem really make it a lot more difficult than people realize if you’re trying to “script” at scale.

    I’ve used rust for this task but people get mad that I’m calling it a “script”. “That’s not a script that’s a program” which…sure. But so maybe we need another term for it? “Production-scripts” or something.

    My experience is rewriting Ruby and bash buildpacks for the open spec CNCF Cloud Native Buildpack project (CNB) https://github.com/heroku/buildpacks

    I agree that Ruby is easier to start and grow complexity, that would be a good place to start.

  6. scriptisto

    A language-agnostic "shebang interpreter" that enables you to write scripts in compiled languages.

    Scriptisto is an underrated tool: https://github.com/igor-petruk/scriptisto

    It can do the Python venv stuff behind the scenes for you and it just looks like a single Python file.

  7. pants

    The Pants Build System

    You actually can distribute a whole executable, python and all, with .pex tools: https://docs.pex-tool.org/

    You have to mind your dependency packages and build options if you want cross-platform, but you can also "cross compile" to make distributions for a platform.

    Pants is in some ways even better for building .pex files, managing options, dependencies, and lockfiles, at the expense of a bit of more complexity (understanding pants options): https://www.pantsbuild.org/

  8. pex

    A tool for generating .pex (Python EXecutable) files, lock files and venvs.

    You actually can distribute a whole executable, python and all, with .pex tools: https://docs.pex-tool.org/

    You have to mind your dependency packages and build options if you want cross-platform, but you can also "cross compile" to make distributions for a platform.

    Pants is in some ways even better for building .pex files, managing options, dependencies, and lockfiles, at the expense of a bit of more complexity (understanding pants options): https://www.pantsbuild.org/

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. direnv

    unclutter your .profile

    There are plenty of ways to have the venv automatically activate (and de-activate) when you enter/leave the directory for the project. direnv [0], mise [1], or various shell hooks.

    There are useful libraries, I’m not saying there aren’t. I just dislike it when people include one as a dependency when they really didn’t need it.

    [0]: https://github.com/direnv/direnv

    [1]: https://github.com/jdx/mise

  11. mise

    dev tools, env vars, task runner

    There are plenty of ways to have the venv automatically activate (and de-activate) when you enter/leave the directory for the project. direnv [0], mise [1], or various shell hooks.

    There are useful libraries, I’m not saying there aren’t. I just dislike it when people include one as a dependency when they really didn’t need it.

    [0]: https://github.com/direnv/direnv

    [1]: https://github.com/jdx/mise

  12. open3

    Open3 gives you access to stdin, stdout, and stderr when running other programs.

  13. ruby-linux-initrd

    linux image with ruby utils and shell

    I've been working (intermittently) on a project to do exactly this: https://github.com/0mWh/ruby-linux-initrd

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ask HN: What Open Source Projects Need Help?

    46 projects | news.ycombinator.com | 16 Nov 2024
  • Open source development

    4 projects | dev.to | 2 Sep 2024
  • Pyenv – lets you easily switch between multiple versions of Python

    20 projects | news.ycombinator.com | 25 Mar 2024
  • Ask HN: What side projects landed you a job?

    62 projects | news.ycombinator.com | 3 Dec 2023
  • As if there weren't enough packaging tools already: mitsuhiko/rye: an experimental alternative to poetry/pip/pipenv/venv/virtualenv/pdm/hatch/…

    14 projects | /r/Python | 23 Apr 2023

Did you know that Ruby is
the 12th most popular programming language
based on number of references?