Skip to content

Commit 9c9d908

Browse files
Sid MohanSid Mohan
authored andcommitted
fixed readme
1 parent 3c609d7 commit 9c9d908

File tree

1 file changed

+112
-4
lines changed

1 file changed

+112
-4
lines changed

README.md

Lines changed: 112 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<a href="https://github.com/datafog/datafog-python/issues"><img src="https://img.shields.io/github/issues/datafog/datafog-python.svg?style=flat-square" alt="GitHub Issues"></a>
1818
</p>
1919

20-
## Overview
21-
22-
DataFog is an open-source DevSecOps platform that lets you scan and redact Personally Identifiable Information (PII) out of your Generative AI applications.
23-
2420
## Installation
2521

2622
DataFog can be installed via pip:
@@ -29,6 +25,118 @@ DataFog can be installed via pip:
2925
pip install datafog
3026
```
3127

28+
For v4 we're introducing a CLI! see more details below.
29+
30+
# DataFog CLI Usage
31+
32+
> **🚀 Beta Release: v4.0.0-beta**
33+
>
34+
> This is a beta release of DataFog v4. Please report any issues or feedback to our [GitHub repository](https://github.com/datafog/datafog-python).
35+
36+
---
37+
38+
## 📚 Quick Reference
39+
40+
| Command | Description |
41+
| ------------------- | ------------------------------------ |
42+
| `scan-text` | Analyze text for PII |
43+
| `scan-image` | Extract and analyze text from images |
44+
| `health` | Check service status |
45+
| `show-config` | Display current settings |
46+
| `download-model` | Get a specific spaCy model |
47+
| `list-spacy-models` | Show available models |
48+
| `list-entities` | View supported PII entities |
49+
50+
---
51+
52+
## 🔍 Detailed Usage
53+
54+
### Scanning Text
55+
56+
To scan and annotate text for PII entities:
57+
58+
```bash
59+
datafog scan-text "Your text here"
60+
```
61+
62+
**Example:**
63+
64+
```bash
65+
datafog scan-text "Tim Cook is the CEO of Apple and is based out of Cupertino, California"
66+
```
67+
68+
### Scanning Images
69+
70+
To extract text from images and optionally perform PII annotation:
71+
72+
```bash
73+
datafog scan-image "path/to/image.png" --operations extract_text
74+
```
75+
76+
**Example:**
77+
78+
```bash
79+
datafog scan-image "nokia-statement.png" --operations extract_text
80+
```
81+
82+
To extract text and annotate PII:
83+
84+
```bash
85+
datafog scan-image "nokia-statement.png" --operations annotate_pii
86+
```
87+
88+
### Utility Commands
89+
90+
#### 🏥 Health Check
91+
92+
```bash
93+
datafog health
94+
```
95+
96+
#### ⚙️ Show Configuration
97+
98+
```bash
99+
datafog show-config
100+
```
101+
102+
#### 📥 Download Model
103+
104+
```bash
105+
datafog download-model en_core_web_sm
106+
```
107+
108+
#### 📂 Show Model Directory
109+
110+
```bash
111+
datafog show-spacy-model-directory en_core_web_sm
112+
```
113+
114+
#### 📋 List Models
115+
116+
```bash
117+
datafog list-spacy-models
118+
```
119+
120+
#### 🏷️ List Entities
121+
122+
```bash
123+
datafog list-entities
124+
```
125+
126+
---
127+
128+
## ⚠️ Important Notes
129+
130+
- For `scan-image` and `scan-text` commands, use `--operations` to specify different operations. Default is `annotate_pii`.
131+
- Process multiple images or text strings in a single command by providing multiple arguments.
132+
- Ensure proper permissions and configuration of the DataFog service before running commands.
133+
134+
---
135+
136+
💡 **Tip:** For more detailed information on each command, use the `--help` option, e.g., `datafog scan-text --help`.
137+
138+
# TODO: Reorganize below
139+
32140
## Getting Started
33141

34142
To use DataFog, you'll need to create a DataFog client with the desired operations. Here's a basic setup:

0 commit comments

Comments
 (0)