# ClawGuard                                                                                                                      
                                                                                                                                        
Local PII redaction server for [OpenClaw](https://openclaw.ai). Runs entirely on-device using [`nvidia/gliner-PII`](https://huggingface.co/nvidia/gliner-PII) — no data leaves your machine.                                           
                                                                                                                                        
Designed for use with the [pii-redactor](https://clawhub.com/skills/pii-redactor) OpenClaw skill.                                    
                                                                                                                                        
## Requirements                                                                                                                        
                                                                                                                                        
- Python 3.10+                                                                                                                         
                                                                                                                                        
## Install                                                                                                                             
                                                                                                                                        
```bash                                                                                                                                
  pip install clawguard                                                                                                                  
```                                                                                                                                      
                                                                                                                                        
## Quickstart                                                                                                                               
                                                                                                                                        
1. Generate a token:                                                                                                                     
                                                                                                                                        
```bash                                                                                                                                  
  python3 -c "import secrets; print(secrets.token_hex(32))"                                                                              
```                                                                                                                                      
                                                                                                                                        
2. Start the server:                                                                                                                     
                                                                                                                                        
```bash                                                                                                                                  
  CLAWGUARD_TOKEN=<your-token> clawguard serve                                                                                           
```                                                                                                                                      
                                                                                                                                        
3. Set env vars in your agent:                                                                                                           
                                                                                                                                        
```                                                                                                                                      
  CLAWGUARD_URL=http://localhost:8000                                                                                                    
  CLAWGUARD_TOKEN=<your-token>                                                                                                           
```                                                                                                                                                                                                                                                            
## Supported Entity Types                                                                                                                   
`nvidia/gliner-PII` was fine-tuned to extract the following entity types:

* email
* phone_number
* ssn
* credit_card_number
* bank_account_number
* ip_address
* password
* api_key
* user_name
* date_of_birth
* drivers_license_number
* passport_number
* address
* medical_record_number
* health_insurance_id                                             
                                 
                                                                                                                                        
**License: Apache 2.0**