docdrift 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,230 @@
1
+ Metadata-Version: 2.4
2
+ Name: docdrift
3
+ Version: 2.0.0
4
+ Summary: Finds stale documentation and fixes it automatically using AI
5
+ Home-page: https://github.com/ayush698800/docwatcher
6
+ Author: ayush698800
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: click>=8.0
13
+ Requires-Dist: gitpython>=3.1
14
+ Requires-Dist: rich>=13.0
15
+ Requires-Dist: tree-sitter>=0.21
16
+ Requires-Dist: tree-sitter-python>=0.21
17
+ Requires-Dist: tree-sitter-javascript>=0.21
18
+ Requires-Dist: chromadb>=0.4
19
+ Requires-Dist: sentence-transformers>=2.2
20
+ Requires-Dist: groq>=0.4
21
+ Requires-Dist: requests>=2.28
22
+ Dynamic: author
23
+ Dynamic: classifier
24
+ Dynamic: description
25
+ Dynamic: description-content-type
26
+ Dynamic: home-page
27
+ Dynamic: requires-dist
28
+ Dynamic: requires-python
29
+ Dynamic: summary
30
+
31
+ # DocDrift
32
+
33
+ > Finds stale documentation and fixes it automatically
34
+
35
+ You change a function. DocDrift finds every doc section that is now
36
+ lying because of that change — and fixes it with one keypress.
37
+
38
+ No more merging PRs with outdated documentation. No more new developers
39
+ wasting hours following instructions that stopped being true months ago.
40
+
41
+ ---
42
+
43
+ ## The problem
44
+
45
+ You change a function. You forget to update the docs.
46
+ Now your README is lying. A new developer follows it and wastes 3 hours.
47
+ This happens everywhere, all the time. Nobody has a good solution.
48
+
49
+ Until now.
50
+
51
+ ---
52
+
53
+ ## Demo
54
+ ```
55
+ $ git add .
56
+ $ ./docdrift commit
57
+
58
+ DocDrift scanning before commit...
59
+ Found 1 errors · 0 warnings · 2 undocumented
60
+
61
+ ERROR validate_token
62
+ README.md line 7
63
+ Function now raises NotImplementedError but docs say it returns True/False
64
+
65
+ Fix this? (y/n): y
66
+ Generating fix...
67
+
68
+ Suggested:
69
+ The validate_token function validates a token and scope.
70
+ Raises NotImplementedError if validation has been removed.
71
+ Use AuthService.login() instead.
72
+
73
+ Apply? (y/n/e to edit): y
74
+ Fixed
75
+
76
+ 2 undocumented symbols found
77
+ Auto-document all in README? (y/n): y
78
+ Generated docs for refresh_token
79
+ Generated docs for AuthService
80
+ Added 2 new sections to README
81
+
82
+ Commit now? (y/n): y
83
+ Commit message: refactor auth flow
84
+ Committed
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Install
90
+ ```bash
91
+ git clone https://github.com/ayush698800/docwatcher.git
92
+ cd docwatcher
93
+ pip install -r requirements.txt
94
+ bash install-hook.sh
95
+ ```
96
+
97
+ Set your free Groq API key for cloud AI:
98
+ ```bash
99
+ export GROQ_API_KEY="your_key_here"
100
+ ```
101
+
102
+ Get a free key at groq.com — takes 2 minutes.
103
+
104
+ Or use LM Studio or Ollama for fully local, private AI — no API key needed.
105
+
106
+ ---
107
+
108
+ ## Usage
109
+
110
+ ### Smart commit — the main command
111
+ ```bash
112
+ git add .
113
+ ./docdrift commit
114
+ ```
115
+
116
+ DocDrift will:
117
+ - Scan all changed functions and classes
118
+ - Find documentation that is now stale or wrong
119
+ - Show each finding with exact file and line number
120
+ - Ask if you want to fix it — AI generates the updated doc
121
+ - Auto-document any new undocumented functions
122
+ - Commit everything when you approve
123
+
124
+ ### Check only — no commit
125
+ ```bash
126
+ ./docdrift check
127
+ ```
128
+
129
+ ### Rebuild doc index
130
+ ```bash
131
+ ./docdrift index
132
+ ```
133
+
134
+ ---
135
+
136
+ ## GitHub Actions — automatic PR checks
137
+
138
+ Add `.github/workflows/docdrift.yml` to any repo:
139
+ ```yaml
140
+ name: DocDrift
141
+ on:
142
+ pull_request:
143
+ branches: [main, master]
144
+ workflow_dispatch:
145
+
146
+ jobs:
147
+ check-docs:
148
+ runs-on: ubuntu-latest
149
+ steps:
150
+ - uses: actions/checkout@v3
151
+ with:
152
+ fetch-depth: 2
153
+
154
+ - name: DocDrift
155
+ uses: ayush698800/docwatcher@v2.0.0
156
+ with:
157
+ groq_api_key: ${{ secrets.GROQ_API_KEY }}
158
+ ```
159
+
160
+ Add `GROQ_API_KEY` to your repo secrets once.
161
+ Now every PR gets automatically checked for stale docs and posts findings as a comment.
162
+
163
+ ---
164
+
165
+ ## Pre-commit hook
166
+
167
+ DocDrift installs as a git hook that runs automatically before every commit:
168
+ ```bash
169
+ bash install-hook.sh
170
+ ```
171
+
172
+ Now every time you commit a Python or JS file, DocDrift checks automatically.
173
+ Blocks commits with ERROR-level stale docs.
174
+ Allows commits with warnings so you are never fully blocked.
175
+
176
+ Skip when needed:
177
+ ```bash
178
+ git commit --no-verify -m "your message"
179
+ ```
180
+
181
+ ---
182
+
183
+ ## How it works
184
+ ```
185
+ git diff → changed functions and classes detected via Tree-sitter
186
+ ↓
187
+ semantic search → finds related documentation sections
188
+ ↓
189
+ LLM check → is this doc still accurate after the code change?
190
+ ↓
191
+ if stale → generates fix → asks permission → applies to file
192
+ ↓
193
+ if undocumented → generates new docs → appends to README
194
+ ```
195
+
196
+ ---
197
+
198
+ ## What it finds
199
+
200
+ - Functions that changed signature but docs describe the old one
201
+ - Functions that now raise exceptions but docs say they return values
202
+ - New parameters that are not mentioned anywhere in docs
203
+ - Completely undocumented new functions and classes
204
+ - Removed functionality still described as available
205
+
206
+ ---
207
+
208
+ ## Works with
209
+
210
+ - Python and JavaScript codebases
211
+ - Markdown and RST documentation
212
+ - README files, /docs folders, inline comments
213
+ - GitHub Actions for automatic team-wide PR checks
214
+ - LM Studio and Ollama — fully local and private
215
+ - Groq — free cloud AI, instant responses
216
+
217
+ ---
218
+
219
+ ## Built with
220
+
221
+ - Tree-sitter — code parsing across languages
222
+ - sentence-transformers — semantic documentation search
223
+ - ChromaDB — local vector index
224
+ - Groq / LM Studio / Ollama — LLM verdicts and fixes
225
+
226
+ ---
227
+
228
+ ## License
229
+
230
+ MIT
@@ -0,0 +1,200 @@
1
+ # DocDrift
2
+
3
+ > Finds stale documentation and fixes it automatically
4
+
5
+ You change a function. DocDrift finds every doc section that is now
6
+ lying because of that change — and fixes it with one keypress.
7
+
8
+ No more merging PRs with outdated documentation. No more new developers
9
+ wasting hours following instructions that stopped being true months ago.
10
+
11
+ ---
12
+
13
+ ## The problem
14
+
15
+ You change a function. You forget to update the docs.
16
+ Now your README is lying. A new developer follows it and wastes 3 hours.
17
+ This happens everywhere, all the time. Nobody has a good solution.
18
+
19
+ Until now.
20
+
21
+ ---
22
+
23
+ ## Demo
24
+ ```
25
+ $ git add .
26
+ $ ./docdrift commit
27
+
28
+ DocDrift scanning before commit...
29
+ Found 1 errors · 0 warnings · 2 undocumented
30
+
31
+ ERROR validate_token
32
+ README.md line 7
33
+ Function now raises NotImplementedError but docs say it returns True/False
34
+
35
+ Fix this? (y/n): y
36
+ Generating fix...
37
+
38
+ Suggested:
39
+ The validate_token function validates a token and scope.
40
+ Raises NotImplementedError if validation has been removed.
41
+ Use AuthService.login() instead.
42
+
43
+ Apply? (y/n/e to edit): y
44
+ Fixed
45
+
46
+ 2 undocumented symbols found
47
+ Auto-document all in README? (y/n): y
48
+ Generated docs for refresh_token
49
+ Generated docs for AuthService
50
+ Added 2 new sections to README
51
+
52
+ Commit now? (y/n): y
53
+ Commit message: refactor auth flow
54
+ Committed
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Install
60
+ ```bash
61
+ git clone https://github.com/ayush698800/docwatcher.git
62
+ cd docwatcher
63
+ pip install -r requirements.txt
64
+ bash install-hook.sh
65
+ ```
66
+
67
+ Set your free Groq API key for cloud AI:
68
+ ```bash
69
+ export GROQ_API_KEY="your_key_here"
70
+ ```
71
+
72
+ Get a free key at groq.com — takes 2 minutes.
73
+
74
+ Or use LM Studio or Ollama for fully local, private AI — no API key needed.
75
+
76
+ ---
77
+
78
+ ## Usage
79
+
80
+ ### Smart commit — the main command
81
+ ```bash
82
+ git add .
83
+ ./docdrift commit
84
+ ```
85
+
86
+ DocDrift will:
87
+ - Scan all changed functions and classes
88
+ - Find documentation that is now stale or wrong
89
+ - Show each finding with exact file and line number
90
+ - Ask if you want to fix it — AI generates the updated doc
91
+ - Auto-document any new undocumented functions
92
+ - Commit everything when you approve
93
+
94
+ ### Check only — no commit
95
+ ```bash
96
+ ./docdrift check
97
+ ```
98
+
99
+ ### Rebuild doc index
100
+ ```bash
101
+ ./docdrift index
102
+ ```
103
+
104
+ ---
105
+
106
+ ## GitHub Actions — automatic PR checks
107
+
108
+ Add `.github/workflows/docdrift.yml` to any repo:
109
+ ```yaml
110
+ name: DocDrift
111
+ on:
112
+ pull_request:
113
+ branches: [main, master]
114
+ workflow_dispatch:
115
+
116
+ jobs:
117
+ check-docs:
118
+ runs-on: ubuntu-latest
119
+ steps:
120
+ - uses: actions/checkout@v3
121
+ with:
122
+ fetch-depth: 2
123
+
124
+ - name: DocDrift
125
+ uses: ayush698800/docwatcher@v2.0.0
126
+ with:
127
+ groq_api_key: ${{ secrets.GROQ_API_KEY }}
128
+ ```
129
+
130
+ Add `GROQ_API_KEY` to your repo secrets once.
131
+ Now every PR gets automatically checked for stale docs and posts findings as a comment.
132
+
133
+ ---
134
+
135
+ ## Pre-commit hook
136
+
137
+ DocDrift installs as a git hook that runs automatically before every commit:
138
+ ```bash
139
+ bash install-hook.sh
140
+ ```
141
+
142
+ Now every time you commit a Python or JS file, DocDrift checks automatically.
143
+ Blocks commits with ERROR-level stale docs.
144
+ Allows commits with warnings so you are never fully blocked.
145
+
146
+ Skip when needed:
147
+ ```bash
148
+ git commit --no-verify -m "your message"
149
+ ```
150
+
151
+ ---
152
+
153
+ ## How it works
154
+ ```
155
+ git diff → changed functions and classes detected via Tree-sitter
156
+
157
+ semantic search → finds related documentation sections
158
+
159
+ LLM check → is this doc still accurate after the code change?
160
+
161
+ if stale → generates fix → asks permission → applies to file
162
+
163
+ if undocumented → generates new docs → appends to README
164
+ ```
165
+
166
+ ---
167
+
168
+ ## What it finds
169
+
170
+ - Functions that changed signature but docs describe the old one
171
+ - Functions that now raise exceptions but docs say they return values
172
+ - New parameters that are not mentioned anywhere in docs
173
+ - Completely undocumented new functions and classes
174
+ - Removed functionality still described as available
175
+
176
+ ---
177
+
178
+ ## Works with
179
+
180
+ - Python and JavaScript codebases
181
+ - Markdown and RST documentation
182
+ - README files, /docs folders, inline comments
183
+ - GitHub Actions for automatic team-wide PR checks
184
+ - LM Studio and Ollama — fully local and private
185
+ - Groq — free cloud AI, instant responses
186
+
187
+ ---
188
+
189
+ ## Built with
190
+
191
+ - Tree-sitter — code parsing across languages
192
+ - sentence-transformers — semantic documentation search
193
+ - ChromaDB — local vector index
194
+ - Groq / LM Studio / Ollama — LLM verdicts and fixes
195
+
196
+ ---
197
+
198
+ ## License
199
+
200
+ MIT
@@ -0,0 +1,230 @@
1
+ Metadata-Version: 2.4
2
+ Name: docdrift
3
+ Version: 2.0.0
4
+ Summary: Finds stale documentation and fixes it automatically using AI
5
+ Home-page: https://github.com/ayush698800/docwatcher
6
+ Author: ayush698800
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: click>=8.0
13
+ Requires-Dist: gitpython>=3.1
14
+ Requires-Dist: rich>=13.0
15
+ Requires-Dist: tree-sitter>=0.21
16
+ Requires-Dist: tree-sitter-python>=0.21
17
+ Requires-Dist: tree-sitter-javascript>=0.21
18
+ Requires-Dist: chromadb>=0.4
19
+ Requires-Dist: sentence-transformers>=2.2
20
+ Requires-Dist: groq>=0.4
21
+ Requires-Dist: requests>=2.28
22
+ Dynamic: author
23
+ Dynamic: classifier
24
+ Dynamic: description
25
+ Dynamic: description-content-type
26
+ Dynamic: home-page
27
+ Dynamic: requires-dist
28
+ Dynamic: requires-python
29
+ Dynamic: summary
30
+
31
+ # DocDrift
32
+
33
+ > Finds stale documentation and fixes it automatically
34
+
35
+ You change a function. DocDrift finds every doc section that is now
36
+ lying because of that change — and fixes it with one keypress.
37
+
38
+ No more merging PRs with outdated documentation. No more new developers
39
+ wasting hours following instructions that stopped being true months ago.
40
+
41
+ ---
42
+
43
+ ## The problem
44
+
45
+ You change a function. You forget to update the docs.
46
+ Now your README is lying. A new developer follows it and wastes 3 hours.
47
+ This happens everywhere, all the time. Nobody has a good solution.
48
+
49
+ Until now.
50
+
51
+ ---
52
+
53
+ ## Demo
54
+ ```
55
+ $ git add .
56
+ $ ./docdrift commit
57
+
58
+ DocDrift scanning before commit...
59
+ Found 1 errors · 0 warnings · 2 undocumented
60
+
61
+ ERROR validate_token
62
+ README.md line 7
63
+ Function now raises NotImplementedError but docs say it returns True/False
64
+
65
+ Fix this? (y/n): y
66
+ Generating fix...
67
+
68
+ Suggested:
69
+ The validate_token function validates a token and scope.
70
+ Raises NotImplementedError if validation has been removed.
71
+ Use AuthService.login() instead.
72
+
73
+ Apply? (y/n/e to edit): y
74
+ Fixed
75
+
76
+ 2 undocumented symbols found
77
+ Auto-document all in README? (y/n): y
78
+ Generated docs for refresh_token
79
+ Generated docs for AuthService
80
+ Added 2 new sections to README
81
+
82
+ Commit now? (y/n): y
83
+ Commit message: refactor auth flow
84
+ Committed
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Install
90
+ ```bash
91
+ git clone https://github.com/ayush698800/docwatcher.git
92
+ cd docwatcher
93
+ pip install -r requirements.txt
94
+ bash install-hook.sh
95
+ ```
96
+
97
+ Set your free Groq API key for cloud AI:
98
+ ```bash
99
+ export GROQ_API_KEY="your_key_here"
100
+ ```
101
+
102
+ Get a free key at groq.com — takes 2 minutes.
103
+
104
+ Or use LM Studio or Ollama for fully local, private AI — no API key needed.
105
+
106
+ ---
107
+
108
+ ## Usage
109
+
110
+ ### Smart commit — the main command
111
+ ```bash
112
+ git add .
113
+ ./docdrift commit
114
+ ```
115
+
116
+ DocDrift will:
117
+ - Scan all changed functions and classes
118
+ - Find documentation that is now stale or wrong
119
+ - Show each finding with exact file and line number
120
+ - Ask if you want to fix it — AI generates the updated doc
121
+ - Auto-document any new undocumented functions
122
+ - Commit everything when you approve
123
+
124
+ ### Check only — no commit
125
+ ```bash
126
+ ./docdrift check
127
+ ```
128
+
129
+ ### Rebuild doc index
130
+ ```bash
131
+ ./docdrift index
132
+ ```
133
+
134
+ ---
135
+
136
+ ## GitHub Actions — automatic PR checks
137
+
138
+ Add `.github/workflows/docdrift.yml` to any repo:
139
+ ```yaml
140
+ name: DocDrift
141
+ on:
142
+ pull_request:
143
+ branches: [main, master]
144
+ workflow_dispatch:
145
+
146
+ jobs:
147
+ check-docs:
148
+ runs-on: ubuntu-latest
149
+ steps:
150
+ - uses: actions/checkout@v3
151
+ with:
152
+ fetch-depth: 2
153
+
154
+ - name: DocDrift
155
+ uses: ayush698800/docwatcher@v2.0.0
156
+ with:
157
+ groq_api_key: ${{ secrets.GROQ_API_KEY }}
158
+ ```
159
+
160
+ Add `GROQ_API_KEY` to your repo secrets once.
161
+ Now every PR gets automatically checked for stale docs and posts findings as a comment.
162
+
163
+ ---
164
+
165
+ ## Pre-commit hook
166
+
167
+ DocDrift installs as a git hook that runs automatically before every commit:
168
+ ```bash
169
+ bash install-hook.sh
170
+ ```
171
+
172
+ Now every time you commit a Python or JS file, DocDrift checks automatically.
173
+ Blocks commits with ERROR-level stale docs.
174
+ Allows commits with warnings so you are never fully blocked.
175
+
176
+ Skip when needed:
177
+ ```bash
178
+ git commit --no-verify -m "your message"
179
+ ```
180
+
181
+ ---
182
+
183
+ ## How it works
184
+ ```
185
+ git diff → changed functions and classes detected via Tree-sitter
186
+ ↓
187
+ semantic search → finds related documentation sections
188
+ ↓
189
+ LLM check → is this doc still accurate after the code change?
190
+ ↓
191
+ if stale → generates fix → asks permission → applies to file
192
+ ↓
193
+ if undocumented → generates new docs → appends to README
194
+ ```
195
+
196
+ ---
197
+
198
+ ## What it finds
199
+
200
+ - Functions that changed signature but docs describe the old one
201
+ - Functions that now raise exceptions but docs say they return values
202
+ - New parameters that are not mentioned anywhere in docs
203
+ - Completely undocumented new functions and classes
204
+ - Removed functionality still described as available
205
+
206
+ ---
207
+
208
+ ## Works with
209
+
210
+ - Python and JavaScript codebases
211
+ - Markdown and RST documentation
212
+ - README files, /docs folders, inline comments
213
+ - GitHub Actions for automatic team-wide PR checks
214
+ - LM Studio and Ollama — fully local and private
215
+ - Groq — free cloud AI, instant responses
216
+
217
+ ---
218
+
219
+ ## Built with
220
+
221
+ - Tree-sitter — code parsing across languages
222
+ - sentence-transformers — semantic documentation search
223
+ - ChromaDB — local vector index
224
+ - Groq / LM Studio / Ollama — LLM verdicts and fixes
225
+
226
+ ---
227
+
228
+ ## License
229
+
230
+ MIT
@@ -0,0 +1,21 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.py
4
+ docdrift.egg-info/PKG-INFO
5
+ docdrift.egg-info/SOURCES.txt
6
+ docdrift.egg-info/dependency_links.txt
7
+ docdrift.egg-info/entry_points.txt
8
+ docdrift.egg-info/requires.txt
9
+ docdrift.egg-info/top_level.txt
10
+ docwatcher/__init__.py
11
+ docwatcher/cli.py
12
+ docwatcher/config.py
13
+ docwatcher/diff_parser.py
14
+ docwatcher/doc_scanner.py
15
+ docwatcher/embeddings.py
16
+ docwatcher/fixer.py
17
+ docwatcher/llm_checker.py
18
+ docwatcher/sample.py
19
+ docwatcher/symbol_extractor.py
20
+ docwatcher/utils.py
21
+ tests/__init__.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ docdrift = docwatcher.cli:cli
@@ -0,0 +1,10 @@
1
+ click>=8.0
2
+ gitpython>=3.1
3
+ rich>=13.0
4
+ tree-sitter>=0.21
5
+ tree-sitter-python>=0.21
6
+ tree-sitter-javascript>=0.21
7
+ chromadb>=0.4
8
+ sentence-transformers>=2.2
9
+ groq>=0.4
10
+ requests>=2.28
@@ -0,0 +1,2 @@
1
+ docwatcher
2
+ tests
File without changes