safe-chains 0.133.0

Auto-allow safe, read-only bash commands in agentic coding tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Usage

## Claude Code (hook mode)

With the hook configured, safe-chains reads JSON from stdin and responds with a permission decision. No arguments needed.

## CLI mode

Pass a command as a positional argument. Exit code 0 means safe, exit code 1 means unsafe.

```bash
safe-chains "ls -la | head -5"    # exit 0 = safe
safe-chains "rm -rf /"            # exit 1 = unsafe
```

Commands containing shell operators (`&&`, `|`, `;`) are split into segments. Each segment is validated independently.