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.
bedouin add
Section titled “bedouin add”bedouin add apt:ripgrepbedouin add cargo:zellij@0.40.1bedouin add brew:fd --no-applyAppends to packages: and applies. The version is written quoted, so 1.80
stays 1.80 rather than becoming the float 1.8.
bedouin remove
Section titled “bedouin remove”bedouin remove zellijbedouin remove rust --languageDrops 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.
bedouin alias and bedouin completions
Section titled “bedouin alias and bedouin completions”Discovering that a tool you already have ships a completion generator should not mean opening a file to write four lines.
bedouin alias gs='git status' # globalbedouin alias z=zellij --package zellij # scoped to a packagebedouin completions kubectl -- kubectl completion '{{ shell.name }}'The same options ride along on add, so a new package arrives complete:
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.
bedouin sync
Section titled “bedouin sync”bedouin syncPulls the config repository and applies what changed:
- Refuses a dirty tree. Uncommitted edits are yours; sync will not decide what happens to them.
git pull --ff-only— a divergence is your call, not a merge Bedouin invents.- Re-plans and shows it. The plan is the diff.
- Asks before applying.
No credential handling: it uses whatever git setup you already have.