Lelu

Lelu-ai@lelu-auth

Lelu guard for OpenClaw: blocks dangerous tool calls (rm -rf ~, disk wipes) and asks you before risky ones (sudo, force-push, sending email, publishing).

Readme

Lelu

Lelu for OpenClaw

Stops your OpenClaw agent from doing something you can't undo.
One install. No account, no API key, no network calls.

npm version MIT license

Your agent runs shell commands and edits files on your machine. One bad step, from a confused model or a prompt-injected web page, can wipe a folder, force-push over your work, or send your SSH key somewhere. Lelu checks every tool call before it runs:

  • πŸ›‘ Blocks calls that are almost never what you meant: rm -rf ~, formatting a disk, a fork bomb.
  • βœ‹ Asks you first before risky ones: sudo, git push --force, DROP TABLE, sending email, npm publish, curl … | bash, editing ~/.ssh. OpenClaw pauses the run and you approve or deny it in chat.
  • βœ… Lets everything else through, with no delay and no prompts.

Install

bash
openclaw plugins install lelu-openclaw

This installs it from ClawHub, where it's scanned and listed (openclaw plugins search lelu finds it). The plugin is on as soon as it's installed, including in a Gateway that's already running. Check that it loaded:

bash
openclaw plugins inspect lelu --runtime

You can also install it straight from npm with openclaw plugins install npm:lelu-openclaw. OpenClaw then warns that the package is outside ClawHub review and asks you to confirm; in a script, add --force.

Try it

Ask your agent to run sudo ls. OpenClaw pauses and asks you:

Lelu: Runs a command as administrator (sudo) exec: sudo ls Rule lelu.sudo. Approve only if you expected the agent to do this.

Now ask it to run rm -rf ~. It never runs, and the agent is told why:

Blocked by Lelu (lelu.rm-home-or-root): Recursively deletes the whole disk or home folder. To allow it, add "lelu.rm-home-or-root" to disableRules in the lelu plugin config.

What it checks

RuleWhat happensExample
lelu.rm-home-or-rootBlockedrm -rf ~, sudo rm -rf /
lelu.disk-wipeBlockedmkfs.ext4 /dev/sda1, dd of=/dev/sda
lelu.fork-bombBlocked:(){ :|:& };:
lelu.chmod-rootBlockedchmod -R 777 /
lelu.pipe-to-shellAsks youcurl … | bash
lelu.sudoAsks yousudo apt install …
lelu.rm-recursiveAsks yourm -rf node_modules
lelu.powerAsks youreboot, shutdown
lelu.git-destructiveAsks yougit push --force, git reset --hard
lelu.database-destructiveAsks youDROP TABLE, DELETE FROM x; with no WHERE
lelu.publishAsks younpm publish, docker push
lelu.send-emailAsks youmail, himalaya … send
lelu.paymentsAsks youstripe refunds create
lelu.secret-exfiltrationAsks youcurl -F key=@~/.ssh/id_ed25519 …
lelu.openclaw-config-shellAsks youopenclaw plugins install …, clawhub install …
lelu.sensitive-file-writeAsks youWriting ~/.ssh/*, .env, ~/.bashrc, /etc/*, git hooks, openclaw.json
lelu.plugin-changesAsks youThe agent installing or removing plugins
lelu.gateway-changesAsks youThe agent changing or restarting the Gateway

The command checks cover exec, process, terminal, code_execution, bash, shell and gateway_process. The file checks cover write, edit and apply_patch.

Configure

Settings go in openclaw.json under plugins.entries.lelu.config:

json5
{
  plugins: {
    entries: {
      lelu: {
        enabled: true,
        config: {
          // Turn off built-in rules you don't want.
          disableRules: ["lelu.rm-recursive"],
          // Add your own. `command` and `path` are case-insensitive regexes.
          rules: [
            {
              id: "no-prod-db",
              tools: ["exec"],
              verdict: "deny", // or "review" to ask you first
              reason: "Touches the production database",
              command: "prod-db\\.internal",
            },
          ],
          // How long an approval waits before it counts as denied (10–3600).
          approvalTimeoutSeconds: 120,
        },
      },
    },
  },
}

If a rule matches, a block beats a request for approval. A block message names the rule, so you know what to put in disableRules.

What it is and isn't

Lelu looks for known dangerous patterns in what the agent is about to run. It's a safety net that catches the common, costly mistakes, including ones caused by prompt injection. It's not a sandbox. A command written to avoid the patterns can still get through. For untrusted work, run OpenClaw in its sandbox too.

If the plugin hits an error while checking a call, it blocks the call rather than letting it through.

Coming next

  • Connect to Lelu Cloud or a self-hosted Lelu engine for team policies, Slack approvals and a signed, searchable audit log of every decision.

Issues and ideas: https://github.com/Lelu-ai/lelu/issues

MIT licensed.