Skip to content

Gazman-Dev/sheriffclaw

Repository files navigation

Project Status

Pre Alpha - Don't install yet ;)

Sheriff Claw 🤠

The Secure Way to Use Autonomous AI Agents

Sheriff Claw is a security layer that sits between your AI agent and your sensitive data. It allows you to use powerful AI tools without giving them access to your passwords or API keys.

🚀 Quick Install (macOS)

Copy and paste this one line into your terminal and hit Enter:

curl -fsSL https://raw.githubusercontent.com/Gazman-Dev/sheriffclaw/main/install.sh | bash

This script downloads Sheriff Claw, installs it, and guides you through the setup.


Here are the two updated sections for your README:

🔒 How It Works: The Two Channels

Sheriff Claw uses two separate Telegram channels to keep your digital life safe.

  1. The Sheriff Channel (Secure Control): This is a private line between you and the Sheriff, a secure computer program running on your machine. The Sheriff is not an AI; it is a strict security guard that manages your secrets and permissions.

  2. The AI Channel (The Worker): This is where you chat with your AI Agent. You can ask it to do amazing things like:

    • "Research the latest tech news and write a summary."
    • "Check my calendar and book a meeting."
    • "Write code to fix a bug in my website."

The AI is smart and capable, but because it lives in a separate channel, it cannot access the secrets in the Sheriff's vault.

🔑 The Secure Workflow

Here is exactly how you can let the AI manage your accounts without ever giving it your password. Let's say you want the AI to post a daily tweet about trending news:

  1. You ask the AI: "Please check the news and tweet the top story every morning."
  2. The AI checks its tools: It realizes it needs an X (Twitter) Token to post on your behalf, but it doesn't have it.
  3. The Sheriff alerts you: The AI asks the Sheriff for help. The Sheriff immediately messages you on the Secure Sheriff Channel: "The AI needs an X Token to proceed. Please provide it."
  4. You provide the secret: You paste the token directly into the secure chat with the Sheriff.
  5. The Sheriff locks it away: The Sheriff encrypts the token in its vault and tells the AI, "I have the token. You may proceed."
  6. The AI works safely: The AI generates the tweet and sends the text to the Sheriff. The Sheriff takes the token from the vault, signs the message, and posts it to X.

The Result: The tweet is posted, but the AI never saw your token. It simply used the Sheriff to get the job done safely.

🛡️ Why This is Safer

  • Immune to Trickery: Since the Sheriff is a rigid program and not an AI, it cannot be tricked into revealing your secrets by a malicious website or a clever prompt.
  • Encrypted Storage: Your secrets are not saved in plain text files that the AI can read. They are encrypted with a Master Password that only you know.
  • Total Separation: Because the AI and the Sheriff live in different channels, the AI has no physical way to access the raw data inside the Sheriff's vault.

📚 Wiki Docs

🖥️ Terminal Channel (new)

After install, start an interactive terminal channel:

sheriff-ctl chat

Routing rules:

  • messages starting with / go to Sheriff
  • any other text goes to the AI bot

Examples:

  • /status → Sheriff
  • / yes I agree → Sheriff
  • what / do? → AI bot

Configure Codex auth (outside Sheriff channel, stored in encrypted vault):

sheriff-ctl configure-llm --provider openai-codex --api-key <OPENAI_API_KEY> --master-password <MASTER_PASSWORD>

Optional test bot route:

sheriff-ctl chat --model-ref test/default

Deterministic scenario simulator (for testing permissions + secrets):

sheriff-ctl chat --model-ref scenario/default

Run scripted E2E simulation locally:

./scripts/e2e_cli_simulation.sh

Run install-path E2E check (fresh ~/.sheriffclaw install + chat flow):

./scripts/e2e_installation_check.sh

Run Linux validation in Docker (unit + CLI E2E + installer E2E + reinstall idempotency):

./scripts/test_linux_docker.sh

Run reinstall idempotency check locally:

./scripts/e2e_reinstall_idempotency.sh

🏁 Getting Started

  1. Run the install command above.
  2. Set your Master Password: This is used to encrypt your local vault.
  3. Connect the Channels: The setup script will help you link the Sheriff Program and the AI Agent to Telegram.
  4. Start Working: Send your keys to the Sheriff, and give tasks to the AI.

Stay Safe, Partner! 🤠