Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By broisneesv1.0.0MITIn 1 marketplace
A sudo mode for Claude Code: skip permission prompts and let sudo authenticate from a password held in the OS keyring, with a policy guard and an audit log.
You run one by typing its /name in Claude Code.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
1 critical · 3 cautions to review before installing
A hook runs before every tool call and can block or approve it
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
A command runs shell commands (! syntax) when you invoke it
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A sudo mode for Claude Code. While it is armed:
sudo inside a tool call just works — no hanging password prompt, no password
in the transcript, no NOPASSWD line in /etc/sudoers.sudo gets it
directly from an askpass helper.Off by default. Armed per session, expires on its own, and never outlives the session that armed it.
Shift+Tab → ⏵⏵ bypass permissions sudo
> install ripgrep system-wide
● sudo pacman -S --noconfirm ripgrep (no prompt, no password question)
curl -fsSL https://raw.githubusercontent.com/broisnischal/claude-sudo/main/install.sh | bash
Pick whichever fits how you work — the installer asks once, and you can change your mind at any time.
claude-sudo autoarm on | Every new session starts in sudo mode. No keystroke, no command. |
Shift+Tab → ⏵⏵ bypass permissions | Arms that session; cycling out of the mode disarms it. |
/sudo on | Arms the current session explicitly, until it expires or ends. |
csudo | Starts Claude Code already armed. |
Auto-arm is off until you choose it, because it means every new session skips
permission prompts from its first message. When it is on, the session also tells
Claude that sudo authenticates from the keyring — so it stops asking you for a
password or offering to edit /etc/sudoers.
Claude Code's permission modes are a compiled-in set —
default, plan, acceptEdits, auto, bypassPermissions, dontAsk — so a
seventh entry called "sudo" cannot be added to the cycle. Instead claude-sudo
becomes one of them.
Every hook payload carries permission_mode, so cycling into bypass
permissions arms sudo mode, and cycling out of it disarms again. Shift+Tab is
the switch, and the status line says sudo while it is live.
That entry is also the honest place for it: it is already the "don't ask me"
mode. Riding on it makes it safer than bare bypass, because the policy below
still applies — Claude Code consults hooks before the permission system in every
mode, and a hook deny is returned unchanged.
One wrinkle worth knowing: a hook ask is not honoured in a mode that never
prompts — it degrades to allow. So in bypass permissions the ask tier is
escalated to a refusal that tells you to Shift+Tab back to a mode that prompts.
Set ask-in-bypass to allow if you would rather have the old behaviour.
claude-sudo modes show # which modes arm sudo mode
claude-sudo modes set dontAsk # use a different entry
claude-sudo modes off # no coupling; arm only with /sudo on
A Bash tool call runs as a child of claude. It has no terminal of its own, but
it does inherit the controlling terminal, so sudo decides it can prompt —
and writes [sudo] password for you: to a terminal Claude cannot read and you
cannot see. The command sits there until it times out.
claude-sudo fixes that the way sudo intends: sudo -A, with SUDO_ASKPASS
pointing at a helper that answers from the keyring.
curl -fsSL https://raw.githubusercontent.com/broisnischal/claude-sudo/main/install.sh | bash
Needs bash 4+, jq, sudo, and one secret store: libsecret
(secret-tool, i.e. gnome-keyring or KWallet), the macOS keychain, pass,
or gnupg as a fallback.
The one-liner clones into ~/.local/share/claude-sudo and keeps it a git
checkout, so claude-sudo update pulls later versions. To work from your own
clone instead:
git clone https://github.com/broisnischal/claude-sudo ~/src/claude-sudo
cd ~/src/claude-sudo && ./install.sh --in-place
It links claude-sudo and csudo into ~/.local/bin, wires three hooks into
~/.claude/settings.json (backing it up first, keeping the last five backups),
installs the /sudo command and the sudo status line badge, asks for your sudo
password once — in your own terminal, never inside a Claude session — and
asks whether to arm every session automatically.
The status line is a wrapper: whatever renderer you already had is recorded and
runs inside it, so your existing status line keeps working untouched.
claude-sudo statusline uninstall puts the original back.
Want to store the password later? ./install.sh --no-password, then
claude-sudo passwd. Any install prefix works — nothing depends on the
directory being named claude-sudo.
As a Claude Code plugin instead:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub broisnees/claude-sudo --plugin claude-sudoPlugins from other owners that cover similar ground