Metadata-Version: 2.5
Name: asiri-guard
Version: 0.1.0
Summary: Keep secrets out of AI chats: scan text before it is sent to an LLM.
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: keyring>=24
Description-Content-Type: text/markdown

# asiri (àṣírí)

*àṣírí* is Yoruba for "secret." asiri keeps secrets out of AI chats.

It scans text for secret-looking values before a prompt is sent, and it stores named secrets in your OS keychain so you can refer to them by name instead of pasting them.

> Status: early version. Claude Code only, macOS-tested.

## Install

```
uv tool install asiri-guard
asiri install claude
```

`asiri install claude` adds a `UserPromptSubmit` hook to `~/.claude/settings.json`. It makes a timestamped backup first, and `asiri uninstall claude` removes only asiri's entries.

## Use

```
asiri set stripe-test        # value is prompted, never echoed
asiri list                   # names only
asiri check stripe-test      # confirms a name exists, never prints the value
asiri rm stripe-test
asiri scan notes.md          # scan a file or stdin for secret-looking values
```

If you paste a live key into Claude Code, the hook blocks the prompt and tells you to store the value with `asiri set`.

## What it detects

Stripe live keys, Anthropic and OpenAI keys, GitHub tokens, AWS access keys, Slack tokens, Google API keys, private key headers, and `api_key = "..."`-style assignments. Stripe test keys (`sk_test_`) are allowed on purpose.

## Limits

- Pattern matching only catches known formats. A custom key with no recognizable shape can get through.
- The hook covers messages typed into Claude Code. It can't see text in other apps, and it can't remove anything already sent.
- Anything a tool can read from your environment can still be read by that tool.

## Development

```
uv venv .venv && uv pip install -e .
PYTHONPATH=src .venv/bin/python -m unittest discover -s tests -v
```

## License

MIT.
