Skip to content

add, remove & sync

All three edit or reload the file you keep in git, so all three treat it carefully: text surgery rather than re-serialising, verified by re-parsing, and restored untouched if the result would not load.

Terminal window
bedouin add apt:ripgrep
bedouin add cargo:zellij@0.40.1
bedouin add brew:fd --no-apply

Appends to packages: and applies. The version is written quoted, so 1.80 stays 1.80 rather than becoming the float 1.8.

Terminal window
bedouin remove zellij
bedouin remove rust --language

Drops the entry, then applies — which undoes it on this machine: the package is uninstalled the way it went in, its rc blocks come out, its PATH entries go, and any file it displaced is given back.

Your comments survive. add followed by remove returns the file byte-for-byte — there is a test for exactly that, because a tool that reflows your config is one you stop trusting.

Discovering that a tool you already have ships a completion generator should not mean opening a file to write four lines.

Terminal window
bedouin alias gs='git status' # global
bedouin alias z=zellij --package zellij # scoped to a package
bedouin completions kubectl -- kubectl completion '{{ shell.name }}'

The same options ride along on add, so a new package arrives complete:

Terminal window
bedouin add cargo:zellij@0.40.1 \
--alias z=zellij --alias za='zellij attach' \
--path '{{ home }}/.cargo/bin' \
--completions 'zellij setup --dump-completion {{ shell.name }}'

add’s extras are applied to one text before any of it is written, so a bad --alias leaves nothing half-added.

Terminal window
bedouin sync

Pulls the config repository and applies what changed:

  1. Refuses a dirty tree. Uncommitted edits are yours; sync will not decide what happens to them.
  2. git pull --ff-only — a divergence is your call, not a merge Bedouin invents.
  3. Re-plans and shows it. The plan is the diff.
  4. Asks before applying.

No credential handling: it uses whatever git setup you already have.