# Recipes

> See which tools a machine has, install the ones it’s missing, and keep its agent CLIs up to date.

A machine needs a few tools before it’s useful: git, Node.js, an agent CLI, maybe Docker. Muxin knows how to look for each one, and how to install it. Each tool it knows is a **component**. A **recipe** is the list of components you want on a machine.

Each machine’s page shows which components it has, and installs the ones you pick. You can save your picks as a recipe, and apply it to the next machine. The same works from a terminal and through your AI agents.

## How it works

1. **You pick the tools**: On the machine’s page, or by id in a terminal. What they need comes along.
2. **Muxin checks**: One short script says what’s there and what’s missing. It changes nothing.
3. **It installs what’s missing**: In order, so Node.js goes in before Claude Code.
4. **It checks again**: A tool counts as installed only when its check passes.

*A recipe only adds. What’s already there is left alone, so applying twice changes nothing.*

## On a machine’s page

Open a machine and find **Components**, under Git. Muxin checks the machine when the page first shows.

- **A check mark** means the tool is there.
- **A box** means it’s missing. Tick the ones you want.
- **Install** installs what you ticked. What those tools need is installed first.
- **Update** shows once an agent CLI is there. It brings the agent CLIs to their newest versions.
- **The refresh button** checks again. The card also checks again by itself after an install or an update.

Install and Update open the Activity page (`⌘J`), where you watch the log. While something else is changing the machine, both buttons are off.

The card lists only the tools Muxin can install on that machine’s system. A Windows machine’s card says Muxin has no components for it yet.

## Saved recipes

Setting up machines the same way? Save your picks once, and apply them to the next machine.

- **Save as recipe…** shows once you’ve ticked something. Give the recipe a name, like “Agents”.
- A recipe holds the tools you ticked. What they need comes along when it’s applied.
- **Saved recipes**, under the grid, lists them on every Linux and Mac machine’s card.
- **Apply** installs a recipe on that machine. Only what’s missing there is installed.
- The pencil renames a recipe. The bin deletes it, and asks first. Neither changes any machine.
- To change what a recipe holds, save a new one and delete the old one.

Recipes are kept in `recipes.json`, beside `config.toml`. If you edit it by hand and it no longer reads, saving a recipe keeps your file beside it as `recipes.json.broken` (then `.broken-2`, and so on) before writing a new one.

> **Tip:** You can only tick tools a machine is missing. So save a recipe from a machine that doesn’t have those tools yet.

## From the command palette

Press `⇧⌘P` and type “recipe”, “install”, “tools” or a tool’s name.

- **Apply recipe: Agents** installs that saved recipe on the machine on screen: its page, its desktop, its logs, its services or one of its sessions.
- **Components on Beelink** scrolls the machine’s page to its Components card.
- **Update agent CLIs on Beelink** does what the card’s Update does. It shows once the card has found an agent CLI there.
- With no machine on screen, **Apply recipe: Agents…** and **Components on a machine…** ask which machine first. Only Linux and Mac machines that are online are listed.

Typing never installs anything. A recipe is applied only when you pick it, and you watch it in Activity, as with the card’s buttons.

## When you add a machine

Once you’ve saved a recipe, the Add machine dialog (`⌘N`) has a **Recipe** row. Pick one, and Muxin applies it as soon as the new machine answers.

- It starts when the machine’s first check finds it online. You can watch it in Activity.
- If the machine doesn’t answer within 10 minutes, nothing is installed. Activity shows a failed entry that says so. Apply the recipe from the machine’s page once it’s up.
- **None** adds the machine and installs nothing.

## The components

Muxin has 22 components. Use the id in commands.

| Id | What it is | Works on | Root on Linux |
|---|---|---|---|
| `git` | git | Linux, Mac | Yes |
| `docker` | Docker | Linux | Yes |
| `gh` | The GitHub CLI | Linux, Mac | Yes |
| `node` | Node.js 22 or later, with npm | Linux, Mac | Yes |
| `uv` | uv, for Python projects | Linux, Mac | No |
| `python` | Python 3 with pip and venv | Linux | Yes |
| `go` | Go, the latest release | Linux | Yes |
| `rust` | Rust, with rustup | Linux, Mac | No |
| `php` | PHP with Composer | Linux | Yes |
| `ruby` | Ruby | Linux | Yes |
| `java` | Java (a JDK) with Maven | Linux | Yes |
| `unzip` | unzip | Linux, Mac | Yes |
| `bun` | Bun | Linux, Mac | No |
| `deno` | Deno | Linux, Mac | No |
| `dotnet` | The .NET SDK | Linux | Yes |
| `claude` | Claude Code | Linux, Mac | When Node.js is the system’s |
| `codex` | Codex | Linux, Mac | When Node.js is the system’s |
| `gemini` | Gemini CLI | Linux, Mac | When Node.js is the system’s |
| `opencode` | OpenCode | Linux, Mac | When Node.js is the system’s |
| `amp` | Amp | Linux, Mac | When Node.js is the system’s |
| `pi` | Pi | Linux, Mac | When Node.js is the system’s |
| `tailscale` | Tailscale | Linux | Yes |

- **Some tools need others.** The agent CLIs need Node.js. Python brings uv. Bun and Deno need unzip. Muxin adds those for you.
- **Node.js counts from version 22**, which the agent CLIs need. An older one counts as missing.
- **Tailscale is only installed.** Joining your tailnet is a separate step, with a key or your approval.
- **Docker** also adds you to the `docker` group. On Alpine and Arch it’s installed but not started.

## Check from a terminal

Run `muxin recipe check` with a machine and the tools you care about:

```
$ muxin recipe check beacon git gh claude
beacon (linux)
  git           present
  GitHub CLI    missing
  Node.js       present
  Claude Code   present
```

Each tool gets one of three answers:

| Answer | Means |
|---|---|
| `present` | It’s on the machine. |
| `missing` | It isn’t there. Applying installs it. |
| `unsupported` | Muxin has no way to install it on that system. |

- Leave the tools out to check all of them: `muxin recipe check beacon`.
- What a tool needs is checked too. Asking about Claude Code also answers for Node.js.
- It looks the way your terminals do, in your login shell. Tools from Homebrew, mise, nvm or `~/.local/bin` count.
- It only looks. It doesn’t use the network, and nothing on the machine changes.

## Install from a terminal

Run `muxin recipe apply` with a machine and the tools you want there:

```
$ muxin recipe apply beacon gh claude
  ▸ Checking what Beacon has
  ▸ Installing GitHub CLI
  As root (sudo -n)
  …
  ✓ GitHub CLI is installed
  ✓ Node.js was already there
  ✓ Claude Code was already there
✓ Apply gh, node, claude to Beacon (operation 1)
  GitHub CLI    installed
  Node.js       already
  Claude Code   already
```

Its log prints as it goes, and the command waits until everything is done. At the end, each tool has a result:

| Result | Means |
|---|---|
| `already` | It was there. Nothing was done. |
| `installed` | It was missing, and now its check passes. |
| `failed` | Its install went wrong, or finished while its check still fails. The log says why. |
| `skipped` | Muxin didn’t try it. It says why, and often what to do. |
| `unsupported` | Muxin has no way to install it on that system. |
| `current` | With `--update`: it’s there, and nothing newer is out. |
| `updated` | With `--update`: it was behind, and now it’s up to date. |

- **Only what’s missing is installed.** A tool that’s already there is left as it is.
- **What a tool needs goes first.** Claude Code needs Node.js, so Node.js is installed before it. Otherwise tools go in the order you gave.
- **Nothing is removed**, and nothing is rolled back. If one tool fails, the ones installed before it stay.
- **The command fails when a tool failed or was skipped.** The other tools are still installed. Fix what it says, then apply again.

> **Warning:** Applying installs software on a real machine, some of it as root. Check first, and name only the tools you want there.

A skipped tool looks like this. Here sudo asks for a password on Vault, so Node.js can’t be installed, and Claude Code needs it:

```
$ muxin recipe apply vault claude
  ▸ Checking what Vault has
  ! Node.js skipped: It needs root, and sudo asks for a password on Vault.
  ! Claude Code skipped: It needs Node.js, which wasn’t installed.
error: Node.js, Claude Code didn’t install.
hint: Allow passwordless sudo for your user on Vault, or install Node.js there yourself.
```

## Update the agent CLIs

Agent CLIs get new versions often. On a machine’s page, that’s the **Update** button. In a terminal, add `--update`, and apply also updates the ones that are behind:

```
$ muxin recipe apply forge claude codex --update
  ▸ Checking what Forge has
  ▸ Looking for updates
  ✓ Node.js was already there
  ▸ Updating Claude Code
  …
  ✓ Claude Code is updated
  ✓ Codex is up to date
✓ Apply and update node, claude, codex on Forge (operation 1)
  Node.js       already
  Claude Code   updated
  Codex         current
```

- It updates Claude Code, Codex, Gemini CLI, OpenCode, Amp and Pi. Other tools stay as they are.
- Muxin asks npm whether a newer version is out. A tool that’s up to date is left alone.
- A tool that’s missing is installed, at its latest version.
- After an update, Muxin looks again. A tool that’s still behind comes back `failed`, not `updated`.
- Without `--update`, nothing is updated. Nothing updates by itself either.

## Root and sudo

Some tools install for the whole machine, and on Linux that takes root. Muxin uses `sudo` for those, and only when sudo needs no password. It never asks for your password to install a tool.

- **When sudo asks for a password**, that tool is skipped, and nothing of it runs. So is any tool that needs it. The rest still install.
- **To fix it**, allow sudo without a password for your user on that machine. Or install that one tool yourself. Then apply again.
- **Agent CLIs** install with npm. When the folder they go in is yours (a Node.js from mise, nvm or Homebrew), they install as you, with no sudo. When it’s the system’s, they install as root. An update goes where the copy you run already is.
- **Rust, uv, Bun and Deno** live in your home folder. They never need root.
- **On a Mac**, every tool installs as you.

Cloud machines and VMs that Muxin makes already allow sudo without a password.

## Linux, Mac and Windows

- **Linux:** the steps are tested on Ubuntu, Debian, Fedora, Alpine and Arch. Packages come from the system’s own package manager: apt, dnf, apk or pacman.
- **Some tools come from their makers** instead: Go, Rust, uv, Bun and Deno, and on most systems Docker and Tailscale. On Ubuntu and Debian, the GitHub CLI comes from GitHub’s own repository, and Node.js 22 from NodeSource.
- **.NET** is version 8 where the system still has it, and version 10 elsewhere.
- **Alpine:** Deno and Amp have no build for it. They come back failed, and the log says so.
- **Arch:** when its package lists are old, Muxin doesn’t upgrade the whole system to install one tool. The tool comes back failed, and the log asks you to run `sudo pacman -Syu` first.
- **A Mac:** git, the GitHub CLI, Node.js and unzip come from Homebrew, so Homebrew has to be there. Docker, Tailscale, Python, Go, PHP, Ruby, Java and .NET answer `unsupported`. Install those yourself on a Mac.
- **Windows:** every tool answers `unsupported`, and nothing runs there.

## New cloud machines and VMs

A [cloud machine](https://muxin.dev/docs/cloud.md) or a Linux [VM](https://muxin.dev/docs/vms.md) can come with tools. You pick them when you make it, and Muxin installs your picks as a recipe.

- Muxin waits until the new machine answers ssh. Then it applies your picks, as part of making the machine.
- A tool that doesn’t install doesn’t stop the rest. The machine is still ready.
- The log then has a line that starts with `!`. It names what didn’t install, and gives the command that tries again.
- Windows VMs don’t get a recipe.

## Good to know

- **Present means installed, not set up.** Docker may not be running, Tailscale may not have joined, and an agent CLI still needs you to sign in.
- **On a Mac**, Apple’s own git counts only once the developer tools are installed.
- **Rust, uv, Bun and Deno** join your PATH at your next login. A new terminal or session finds them; one that was already open may not.
- **An id Muxin doesn’t know** is refused before anything runs, with the list of ids it knows.

## From a terminal and from agents

```
muxin recipe check beacon                        # every component
muxin recipe check beacon claude                 # Node.js, then Claude Code
muxin recipe check beacon --json                 # the same, as JSON
muxin recipe apply beacon gh claude              # install what’s missing
muxin recipe apply beacon claude codex --update  # and update the ones that are behind
```

Agents use `recipe_check` and `recipe_apply`. Checking is read-only, so an agent may do it any time. Applying changes your machine, so an agent does it only when you asked for exactly that. Otherwise it says what it would install, and asks first. Saved recipes belong to the app: in a terminal and for agents, name the tools by id. See [The command line](https://muxin.dev/docs/cli.md) and [MCP for your agents](https://muxin.dev/docs/agents.md).
