claudeguard


Nameclaudeguard JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryClaude Code security guard - an alternative Claude Code permission framework
upload_time2025-08-20 10:28:13
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords ai-tools claude-code cli hook pattern-matching permissions security
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # claudeguard

**claudeguard** enhances Claude Code with automated security decisions using pattern matching and team-shareable profiles.

## Why claudeguard?

Claude Code's permission prompts are great for security but repetitive for routine tasks. claudeguard automates common decisions while keeping you in control of sensitive operations.

## How it works

**claudeguard** uses the `PreToolUse` Claude Code hook to intercept tool calls and override Claude Code's builtin permission logic

## Features

- **Pattern matching**: `Edit(src/**)`, `Bash(/git status/)`, `Bash(rm -rf*)`
- **Team sharing**: Profiles stored in `.claudeguard/profiles/`
- **Zero config**: Works immediately with sensible rules

## Quick Start

```bash
# Install
uv tool install claudeguard

# Setup in your project
cd your-claude-code-project
claudeguard install

# Use Claude Code normally
claude
```

## How It Works

claudeguard matches tool calls against rules in `.claudeguard/profiles/default.yaml`:

```yaml
rules:
  - pattern: "Read(*)"
    action: allow
  - pattern: "Edit(*.md)"
    action: allow
  - pattern: "Bash(/git (status|diff)/)"
    action: allow
  - pattern: "Edit(src/**)"
    action: ask
  - pattern: "Bash(rm -rf*)"
    action: deny
  - pattern: "*"
    action: ask
```

First matching rule wins. Actions: `allow`, `ask`, `deny`.

## Commands

- `claudeguard install` - Setup in current project
- `claudeguard status` - Show configuration
- `claudeguard create-profile` - Create new profile
- `claudeguard list-profiles` - List profiles
- `claudeguard switch-profile` - Switch profile
- `claudeguard delete-profile` - Delete profile
- `claudeguard uninstall` - Remove from project

## Pattern Examples

| Pattern | Matches | Action |
|---------|---------|--------|
| `Read(*)` | All file reads | `allow` |
| `Edit(*.md)` | Markdown files | `allow` |
| `Bash(/git (status\|diff)/)` | Safe git commands | `allow` |
| `Edit(src/**)` | Code files | `ask` |
| `Bash(rm -rf*)` | Destructive commands | `deny` |

## Custom Profiles

Create profiles for different security levels:

```yaml
# .claudeguard/profiles/strict.yaml
name: "strict-policy"
description: "Strict security for production"
rules:
  - pattern: "Read(*)"
    action: allow
  - pattern: "Edit(docs/**)"
    action: allow
  - pattern: "Edit(*)"
    action: ask
  - pattern: "Bash(/git (status|diff|log)/)"
    action: allow
  - pattern: "Bash(*)"
    action: deny
  - pattern: "*"
    action: deny
```

## Development

```bash
git clone https://github.com/tarovard/claudeguard
cd claudeguard
uv sync                   # Install dependencies
uv run pre-commit install # Setup git hooks

# Test and lint
uv run pytest            # Run tests
uv run mypy src tests     # Type checking
uv run ruff check --fix . # Format and lint
```

## License

MIT - see [LICENSE](LICENSE) file.

## Contributing

Bug reports and feature requests welcome at [GitHub Issues](https://github.com/tarovard/claudeguard/issues).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "claudeguard",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "ai-tools, claude-code, cli, hook, pattern-matching, permissions, security",
    "author": null,
    "author_email": "claudeguard contributors <tarovard@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/19/4a/ead1275bb80dd40bce615f8ee15c38ddba49678d5ade7c4f16cd57f29b91/claudeguard-0.1.3.tar.gz",
    "platform": null,
    "description": "# claudeguard\n\n**claudeguard** enhances Claude Code with automated security decisions using pattern matching and team-shareable profiles.\n\n## Why claudeguard?\n\nClaude Code's permission prompts are great for security but repetitive for routine tasks. claudeguard automates common decisions while keeping you in control of sensitive operations.\n\n## How it works\n\n**claudeguard** uses the `PreToolUse` Claude Code hook to intercept tool calls and override Claude Code's builtin permission logic\n\n## Features\n\n- **Pattern matching**: `Edit(src/**)`, `Bash(/git status/)`, `Bash(rm -rf*)`\n- **Team sharing**: Profiles stored in `.claudeguard/profiles/`\n- **Zero config**: Works immediately with sensible rules\n\n## Quick Start\n\n```bash\n# Install\nuv tool install claudeguard\n\n# Setup in your project\ncd your-claude-code-project\nclaudeguard install\n\n# Use Claude Code normally\nclaude\n```\n\n## How It Works\n\nclaudeguard matches tool calls against rules in `.claudeguard/profiles/default.yaml`:\n\n```yaml\nrules:\n  - pattern: \"Read(*)\"\n    action: allow\n  - pattern: \"Edit(*.md)\"\n    action: allow\n  - pattern: \"Bash(/git (status|diff)/)\"\n    action: allow\n  - pattern: \"Edit(src/**)\"\n    action: ask\n  - pattern: \"Bash(rm -rf*)\"\n    action: deny\n  - pattern: \"*\"\n    action: ask\n```\n\nFirst matching rule wins. Actions: `allow`, `ask`, `deny`.\n\n## Commands\n\n- `claudeguard install` - Setup in current project\n- `claudeguard status` - Show configuration\n- `claudeguard create-profile` - Create new profile\n- `claudeguard list-profiles` - List profiles\n- `claudeguard switch-profile` - Switch profile\n- `claudeguard delete-profile` - Delete profile\n- `claudeguard uninstall` - Remove from project\n\n## Pattern Examples\n\n| Pattern | Matches | Action |\n|---------|---------|--------|\n| `Read(*)` | All file reads | `allow` |\n| `Edit(*.md)` | Markdown files | `allow` |\n| `Bash(/git (status\\|diff)/)` | Safe git commands | `allow` |\n| `Edit(src/**)` | Code files | `ask` |\n| `Bash(rm -rf*)` | Destructive commands | `deny` |\n\n## Custom Profiles\n\nCreate profiles for different security levels:\n\n```yaml\n# .claudeguard/profiles/strict.yaml\nname: \"strict-policy\"\ndescription: \"Strict security for production\"\nrules:\n  - pattern: \"Read(*)\"\n    action: allow\n  - pattern: \"Edit(docs/**)\"\n    action: allow\n  - pattern: \"Edit(*)\"\n    action: ask\n  - pattern: \"Bash(/git (status|diff|log)/)\"\n    action: allow\n  - pattern: \"Bash(*)\"\n    action: deny\n  - pattern: \"*\"\n    action: deny\n```\n\n## Development\n\n```bash\ngit clone https://github.com/tarovard/claudeguard\ncd claudeguard\nuv sync                   # Install dependencies\nuv run pre-commit install # Setup git hooks\n\n# Test and lint\nuv run pytest            # Run tests\nuv run mypy src tests     # Type checking\nuv run ruff check --fix . # Format and lint\n```\n\n## License\n\nMIT - see [LICENSE](LICENSE) file.\n\n## Contributing\n\nBug reports and feature requests welcome at [GitHub Issues](https://github.com/tarovard/claudeguard/issues).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Claude Code security guard - an alternative Claude Code permission framework",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/tarovard/claudeguard",
        "Issues": "https://github.com/tarovard/claudeguard/issues",
        "Repository": "https://github.com/tarovard/claudeguard.git"
    },
    "split_keywords": [
        "ai-tools",
        " claude-code",
        " cli",
        " hook",
        " pattern-matching",
        " permissions",
        " security"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "39daf69bd8cbff2b1cb182a553c32e76ae7c362a067ef0131325601f660a3d9a",
                "md5": "f6d99503ba8e437765c1199dd429ea3e",
                "sha256": "78cddc5a60322d375d9a294c4c5680c04df1a9c32a1d7792712338ee4a4fcf06"
            },
            "downloads": -1,
            "filename": "claudeguard-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f6d99503ba8e437765c1199dd429ea3e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 19417,
            "upload_time": "2025-08-20T10:28:11",
            "upload_time_iso_8601": "2025-08-20T10:28:11.652742Z",
            "url": "https://files.pythonhosted.org/packages/39/da/f69bd8cbff2b1cb182a553c32e76ae7c362a067ef0131325601f660a3d9a/claudeguard-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "194aead1275bb80dd40bce615f8ee15c38ddba49678d5ade7c4f16cd57f29b91",
                "md5": "b5a725e5228e22dd2eb1df419a198a2b",
                "sha256": "452df09a98479741f857e2dd3c910e1b49b4e55ce98d62acbf1d0aff70172958"
            },
            "downloads": -1,
            "filename": "claudeguard-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b5a725e5228e22dd2eb1df419a198a2b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 138471,
            "upload_time": "2025-08-20T10:28:13",
            "upload_time_iso_8601": "2025-08-20T10:28:13.445408Z",
            "url": "https://files.pythonhosted.org/packages/19/4a/ead1275bb80dd40bce615f8ee15c38ddba49678d5ade7c4f16cd57f29b91/claudeguard-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-20 10:28:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tarovard",
    "github_project": "claudeguard",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "claudeguard"
}
        
Elapsed time: 0.86478s