explaingit

moritzheiber/mitamae-plugin-resource-alternatives

Analysis updated 2026-07-09 · repo last pushed 2018-11-17

1RubyAudience · ops devopsComplexity · 2/5DormantSetup · moderate

TLDR

A plugin for MItamae that manages Linux 'alternatives,' letting you choose which program runs when multiple programs share the same command name, like making 'vim' launch Neovim.

Mindmap

mindmap
  root((repo))
    What it does
      Manages Linux alternatives
      Picks default program
      Works with MItamae
    Use cases
      Point vim to Neovim
      Set default pinentry
      Choose Python version
    Audience
      Sysadmins
      MItamae users
    Tech stack
      Ruby
      MItamae
    Setup
      Needs MItamae knowledge
      Ported from Itamae
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Make the 'vim' command launch Neovim instead of traditional Vim across all your servers.

USE CASE 2

Set 'pinentry' to automatically resolve to the system-recommended program during provisioning.

USE CASE 3

Control which version of 'python' runs by default when multiple versions are installed.

What is it built with?

RubyMItamae

How does it compare?

moritzheiber/mitamae-plugin-resource-alternativesgargron/pgherojoshuakgoldberg/mastodon
Stars11
LanguageRubyRubyRuby
Last pushed2018-11-172019-02-072024-05-11
MaintenanceDormantDormantDormant
Setup difficultymoderateeasyhard
Complexity2/52/54/5
Audienceops devopsdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires familiarity with MItamae and how Linux alternatives work under the hood.

In plain English

This plugin lets you manage "alternatives" on Linux systems, a built-in mechanism where multiple programs can claim the same command name, and you pick which one actually runs. For example, if you have both traditional Vim and Neovim installed, you can tell the system that typing vim should launch Neovim instead. The tool is designed to work with MItamae, a configuration management tool that lets you define your server setup in code. Without this plugin, MItamae doesn't know how to configure alternatives on its own. With it, you can write a few lines of Ruby to set which program wins a given command slot, like making pinentry automatically resolve to whatever the system recommends. The people who'd use this are developers or sysadmins who already use MItamae to provision servers and need to control which program backs a shared command like vim, python, or pinentry. A concrete scenario: you're setting up a new machine, you install Neovim, and you want vim to point to it without manually running update-alternatives commands on every server. The project is essentially a port of an older plugin written for Itamae (MItamae's predecessor), adapted to keep working as people migrated to the newer tool. The README doesn't go into much detail beyond the two usage examples, so you'd need some familiarity with how Linux alternatives work under the hood to get the most out of it.

Copy-paste prompts

Prompt 1
Help me write a MItamae recipe that uses the alternatives resource to make the 'vim' command point to Neovim.
Prompt 2
Show me how to configure the 'pinentry' alternative to auto-resolve using this MItamae plugin in my server provisioning code.
Prompt 3
I have both Python 2 and Python 3 installed. How do I use this mitamae-plugin-resource-alternatives to set Python 3 as the default 'python' command?

Frequently asked questions

What is mitamae-plugin-resource-alternatives?

A plugin for MItamae that manages Linux 'alternatives,' letting you choose which program runs when multiple programs share the same command name, like making 'vim' launch Neovim.

What language is mitamae-plugin-resource-alternatives written in?

Mainly Ruby. The stack also includes Ruby, MItamae.

Is mitamae-plugin-resource-alternatives actively maintained?

Dormant — no commits in 2+ years (last push 2018-11-17).

How hard is mitamae-plugin-resource-alternatives to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is mitamae-plugin-resource-alternatives for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.