pkg toggle: pkg <name>... now auto-detects whether each package is installed and installs or removes it accordingly. Force install (-i) and force uninstall (-u) flags added for when you want to skip detection. Shows help when called with no arguments.
sudo-toggle: New system function that toggles sudo password enforcement on/off by writing/clearing a NOPASSWD rule in /etc/sudoers.d/nofail-toggle. Useful for temporarily bypassing FIDO key prompts during batch admin tasks.
README: Both functions documented in their respective sections.
Manual Verification
Run pkg ripgrep on a machine where ripgrep is not installed — confirm it installs via paru/yay.
Run pkg ripgrep again (now installed) — confirm it removes the package (-Rns).
Run pkg -i ripgrep when already installed — confirm it force-installs without removing.
Run pkg -u ripgrep when installed — confirm it force-uninstalls.
Run sudo-toggle once — confirm it prints 🔓 Sudo security: DISABLED and sudo works without a password prompt.
Run sudo-toggle again — confirm it prints 🔒 Sudo security: ENABLED and sudo requires authentication.
## Summary
- **`pkg` toggle**: `pkg <name>...` now auto-detects whether each package is installed and installs or removes it accordingly. Force install (`-i`) and force uninstall (`-u`) flags added for when you want to skip detection. Shows help when called with no arguments.
- **`sudo-toggle`**: New system function that toggles sudo password enforcement on/off by writing/clearing a `NOPASSWD` rule in `/etc/sudoers.d/nofail-toggle`. Useful for temporarily bypassing FIDO key prompts during batch admin tasks.
- **README**: Both functions documented in their respective sections.
## Manual Verification
- [x] Run `pkg ripgrep` on a machine where ripgrep is **not** installed — confirm it installs via paru/yay.
- [x] Run `pkg ripgrep` again (now installed) — confirm it removes the package (`-Rns`).
- [x] Run `pkg -i ripgrep` when already installed — confirm it force-installs without removing.
- [x] Run `pkg -u ripgrep` when installed — confirm it force-uninstalls.
- [x] Run `sudo-toggle` once — confirm it prints `🔓 Sudo security: DISABLED` and `sudo` works without a password prompt.
- [x] Run `sudo-toggle` again — confirm it prints `🔒 Sudo security: ENABLED` and `sudo` requires authentication.
pkg now auto-detects whether each package is installed and
installs or removes accordingly. Explicit -i/--install and
-u/--uninstall flags override the auto-detection. Adds help
output when invoked without arguments.
Toggles sudo password enforcement on/off by writing or
truncating a NOPASSWD rule in /etc/sudoers.d/nofail-toggle.
Useful for temporarily bypassing FIDO key prompts during
batch admin tasks without permanently weakening sudoers.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
pkgtoggle:pkg <name>...now auto-detects whether each package is installed and installs or removes it accordingly. Force install (-i) and force uninstall (-u) flags added for when you want to skip detection. Shows help when called with no arguments.sudo-toggle: New system function that toggles sudo password enforcement on/off by writing/clearing aNOPASSWDrule in/etc/sudoers.d/nofail-toggle. Useful for temporarily bypassing FIDO key prompts during batch admin tasks.Manual Verification
pkg ripgrepon a machine where ripgrep is not installed — confirm it installs via paru/yay.pkg ripgrepagain (now installed) — confirm it removes the package (-Rns).pkg -i ripgrepwhen already installed — confirm it force-installs without removing.pkg -u ripgrepwhen installed — confirm it force-uninstalls.sudo-toggleonce — confirm it prints🔓 Sudo security: DISABLEDandsudoworks without a password prompt.sudo-toggleagain — confirm it prints🔒 Sudo security: ENABLEDandsudorequires authentication.