errorlens 0.1.0__tar.gz → 0.1.2__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.

Potentially problematic release.


This version of errorlens might be problematic. Click here for more details.

Files changed (23) hide show
  1. errorlens-0.1.2/LICENSE +21 -0
  2. {errorlens-0.1.0 → errorlens-0.1.2}/PKG-INFO +105 -103
  3. {errorlens-0.1.0 → errorlens-0.1.2}/README.md +100 -100
  4. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens.egg-info/PKG-INFO +105 -103
  5. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens.egg-info/SOURCES.txt +1 -0
  6. {errorlens-0.1.0 → errorlens-0.1.2}/pyproject.toml +3 -3
  7. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/__init__.py +0 -0
  8. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/cli.py +0 -0
  9. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/core/__init__.py +0 -0
  10. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/core/analyzer.py +0 -0
  11. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/core/config.py +0 -0
  12. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/providers/__init__.py +0 -0
  13. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/providers/anthropic_provider.py +0 -0
  14. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/providers/groq_provider.py +0 -0
  15. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/providers/mistral_provider.py +0 -0
  16. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/providers/mock_provider.py +0 -0
  17. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens/tui.py +0 -0
  18. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens.egg-info/dependency_links.txt +0 -0
  19. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens.egg-info/entry_points.txt +0 -0
  20. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens.egg-info/requires.txt +0 -0
  21. {errorlens-0.1.0 → errorlens-0.1.2}/errorlens.egg-info/top_level.txt +0 -0
  22. {errorlens-0.1.0 → errorlens-0.1.2}/setup.cfg +0 -0
  23. {errorlens-0.1.0 → errorlens-0.1.2}/setup.py +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 coder11125
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: errorlens
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: AI-powered CLI tool for finding bugs and security issues in codebases
5
- Author-email: ErrorLens <info@errorlens.io>
5
+ Author-email: Shashvath Puppala <shashvathpuppala.21cmis0265@meruinternationalschool.com>
6
6
  License: MIT
7
7
  Keywords: security,static-analysis,ai,bugs,code-review
8
- Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Development Status :: 4 - Beta
9
9
  Classifier: Intended Audience :: Developers
10
10
  Classifier: Topic :: Security
11
11
  Classifier: Topic :: Software Development :: Quality Assurance
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Requires-Python: >=3.8
20
20
  Description-Content-Type: text/markdown
21
+ License-File: LICENSE
21
22
  Requires-Dist: textual>=0.50.0
22
23
  Requires-Dist: click>=8.0.0
23
24
  Requires-Dist: requests>=2.25.0
@@ -25,6 +26,7 @@ Requires-Dist: python-dotenv>=0.19.0
25
26
  Requires-Dist: anthropic>=0.20.0
26
27
  Requires-Dist: mistralai>=0.1.0
27
28
  Requires-Dist: groq>=0.4.0
29
+ Dynamic: license-file
28
30
 
29
31
  # ErrorLens
30
32
 
@@ -44,21 +46,29 @@ A CLI and TUI tool that analyzes codebases for bugs and security issues using mu
44
46
 
45
47
  ## Installation
46
48
 
47
- **Requirements:** Python 3.8+
49
+ ### From PyPI (recommended)
50
+
51
+ ```bash
52
+ pip install errorlens
53
+ ```
54
+
55
+ That's it. The `errorlens` command is now available globally.
56
+
57
+ ### From source
48
58
 
49
59
  ```bash
50
- # Clone the repo
51
60
  git clone https://github.com/your-repo/errorlens.git
52
61
  cd errorlens
62
+ pip install .
63
+ ```
53
64
 
54
- # Create and activate a virtual environment
65
+ ### For development
66
+
67
+ ```bash
68
+ git clone https://github.com/your-repo/errorlens.git
69
+ cd errorlens
55
70
  python -m venv venv
56
71
  source venv/bin/activate # Windows: venv\Scripts\activate
57
-
58
- # Install dependencies
59
- pip install -r requirements.txt
60
-
61
- # Install the package (gives you the `errorlens` command)
62
72
  pip install -e .
63
73
  ```
64
74
 
@@ -66,101 +76,34 @@ pip install -e .
66
76
 
67
77
  ## Configuration
68
78
 
69
- Create a `.env` file in the project root:
79
+ Create a `.env` file in your working directory (or export the variables in your shell):
70
80
 
71
81
  ```bash
72
- cat > .env << 'EOF'
73
82
  ANTHROPIC_API_KEY="your-anthropic-api-key"
74
83
  MISTRAL_API_KEY="your-mistral-api-key"
75
84
  GROQ_API_KEY="your-groq-api-key"
76
- EOF
77
85
  ```
78
86
 
79
87
  You only need keys for the providers you plan to use.
80
88
 
81
- | Provider | Model | Notes |
82
- |-----------|------------------------|------------------------|
83
- | Anthropic | claude-3-opus-20240229 | Real API call |
84
- | Groq | llama3-70b-8192 | Real API call |
85
- | Mistral | mistral-large-latest | Pattern-based (mock) |
89
+ | Provider | Model | Get a key |
90
+ |-----------|------------------------|----------------------------------|
91
+ | Anthropic | claude-3-opus-20240229 | console.anthropic.com |
92
+ | Groq | llama3-70b-8192 | console.groq.com |
93
+ | Mistral | mistral-large-latest | console.mistral.ai |
86
94
 
87
95
  ---
88
96
 
89
- ## CLI Usage
90
-
91
- ```bash
92
- # Analyze a single file (all providers)
93
- python main.py path/to/file.py
94
-
95
- # Analyze a directory
96
- python main.py path/to/project/
97
-
98
- # Choose a specific provider
99
- python main.py file.py --provider anthropic
100
- python main.py file.py --provider groq
101
- python main.py file.py --provider mistral
102
-
103
- # Change output format
104
- python main.py file.py --output json
105
- python main.py file.py --output markdown
106
-
107
- # Verbose logging
108
- python main.py file.py --verbose
109
-
110
- # If installed via pip install -e .
111
- errorlens file.py --provider anthropic
112
- ```
113
-
114
- ### CLI Options
115
-
116
- | Flag | Values | Default |
117
- |--------------|-------------------------------------|----------|
118
- | `--provider` | `anthropic`, `mistral`, `groq`, `all` | `all` |
119
- | `--output` | `console`, `json`, `markdown` | `console`|
120
- | `--verbose` | — | off |
121
- | `--config` | path to JSON config file | — |
122
-
123
- ### Example console output
124
-
125
- ```
126
- ErrorLens
127
- Analyzing: example_test.py
128
- Provider: groq
129
-
130
- ==================================================
131
- ERRORLENS ANALYSIS RESULTS
132
- ==================================================
133
-
134
- File: example_test.py
135
- Language: python
136
- Status: SUCCESS
137
-
138
- --- GROQ ANALYSIS ---
139
- Security Issues:
140
- - Hardcoded credentials found in DB_PASSWORD and API_KEY variables
141
- - SQL injection vulnerability in login() function
142
- - Insecure deserialization using pickle.loads()
143
- Potential Bugs:
144
- - Division by zero possible in complex_calculation()
145
- Code Quality Issues:
146
- - Unused function detected
147
- Suggestions:
148
- - Use environment variables for credentials
149
- - Use parameterized queries
150
- ```
151
-
152
- ---
97
+ ## Usage
153
98
 
154
- ## TUI Usage
99
+ ### TUI (default)
155
100
 
156
101
  Launch the interactive terminal interface:
157
102
 
158
103
  ```bash
159
- python tui.py
104
+ errorlens
160
105
  ```
161
106
 
162
- ### Layout
163
-
164
107
  ```
165
108
  ┌─────────────────────────────────────────────────────────┐
166
109
  │ ErrorLens 12:00:00 │
@@ -184,7 +127,7 @@ python tui.py
184
127
  └─────────────────────────────────────────────────────────┘
185
128
  ```
186
129
 
187
- ### Keybindings
130
+ **Keybindings**
188
131
 
189
132
  | Key | Action |
190
133
  |-----|---------------|
@@ -196,7 +139,62 @@ Results are color-coded:
196
139
  - **Red** — Security issues
197
140
  - **Yellow** — Potential bugs
198
141
  - **Cyan** — Code quality issues
199
- - **Green** — Suggestions
142
+ - **Green** — Suggestions / no issues found
143
+
144
+ ### CLI (non-interactive)
145
+
146
+ ```bash
147
+ # Analyze a file or directory
148
+ errorlens-cli path/to/file.py
149
+ errorlens-cli path/to/project/
150
+
151
+ # Choose a specific provider
152
+ errorlens-cli file.py --provider anthropic
153
+ errorlens-cli file.py --provider groq
154
+ errorlens-cli file.py --provider mistral
155
+
156
+ # Change output format
157
+ errorlens-cli file.py --output json
158
+ errorlens-cli file.py --output markdown
159
+
160
+ # Verbose logging
161
+ errorlens-cli file.py --verbose
162
+ ```
163
+
164
+ **CLI options**
165
+
166
+ | Flag | Values | Default |
167
+ |--------------|-------------------------------------------|-----------|
168
+ | `--provider` | `anthropic`, `mistral`, `groq`, `mock`, `all` | `all` |
169
+ | `--output` | `console`, `json`, `markdown` | `console` |
170
+ | `--verbose` | — | off |
171
+ | `--config` | path to JSON config file | — |
172
+
173
+ **Example output**
174
+
175
+ ```
176
+ ErrorLens — analyzing: example_test.py provider: groq
177
+
178
+ ==================================================
179
+ ERRORLENS ANALYSIS RESULTS
180
+ ==================================================
181
+
182
+ File: example_test.py
183
+ Language: python
184
+
185
+ --- GROQ ---
186
+ Security Issues:
187
+ - Hardcoded credentials found in DB_PASSWORD and API_KEY variables
188
+ - SQL injection vulnerability in login() function
189
+ - Insecure deserialization using pickle.loads()
190
+ Potential Bugs:
191
+ - Division by zero possible in complex_calculation()
192
+ Code Quality:
193
+ - Unused function detected
194
+ Suggestions:
195
+ - Use environment variables for credentials
196
+ - Use parameterized queries
197
+ ```
200
198
 
201
199
  ---
202
200
 
@@ -223,20 +221,23 @@ Results are color-coded:
223
221
 
224
222
  ```
225
223
  errorlens/
226
- ├── main.py # CLI entry point
227
- ├── tui.py # TUI entry point
228
- ├── requirements.txt
224
+ ├── pyproject.toml
229
225
  ├── setup.py
230
- ├── .env # API keys (not committed)
231
- ├── example_test.py # Sample file with intentional issues
232
- ├── core/
233
- │ ├── analyzer.py # File discovery and analysis orchestration
234
- │ └── config.py # Configuration and env loading
235
- └── providers/
236
- ├── anthropic_provider.py # Anthropic Claude integration
237
- ├── groq_provider.py # Groq Llama 3 integration
238
- ├── mistral_provider.py # Mistral integration
239
- └── mock_provider.py # Offline mock for testing
226
+ ├── requirements.txt
227
+ ├── .env.example
228
+ ├── example_test.py
229
+ └── errorlens/ # installable package
230
+ ├── __init__.py
231
+ ├── tui.py # `errorlens` command — Textual TUI
232
+ ├── cli.py # `errorlens-cli` command — non-interactive
233
+ ├── core/
234
+ │ ├── analyzer.py # file discovery and analysis orchestration
235
+ │ └── config.py # configuration and env loading
236
+ └── providers/
237
+ ├── anthropic_provider.py # Anthropic Claude integration
238
+ ├── groq_provider.py # Groq Llama 3 integration
239
+ ├── mistral_provider.py # Mistral integration
240
+ └── mock_provider.py # offline mock for testing
240
241
  ```
241
242
 
242
243
  ---
@@ -246,7 +247,8 @@ errorlens/
246
247
  `example_test.py` is bundled with intentional security flaws and bugs — use it to verify your setup:
247
248
 
248
249
  ```bash
249
- python main.py example_test.py --provider groq
250
+ errorlens-cli example_test.py --provider mock # no API key needed
251
+ errorlens-cli example_test.py --provider groq
250
252
  ```
251
253
 
252
254
  ---
@@ -16,21 +16,29 @@ A CLI and TUI tool that analyzes codebases for bugs and security issues using mu
16
16
 
17
17
  ## Installation
18
18
 
19
- **Requirements:** Python 3.8+
19
+ ### From PyPI (recommended)
20
+
21
+ ```bash
22
+ pip install errorlens
23
+ ```
24
+
25
+ That's it. The `errorlens` command is now available globally.
26
+
27
+ ### From source
20
28
 
21
29
  ```bash
22
- # Clone the repo
23
30
  git clone https://github.com/your-repo/errorlens.git
24
31
  cd errorlens
32
+ pip install .
33
+ ```
25
34
 
26
- # Create and activate a virtual environment
35
+ ### For development
36
+
37
+ ```bash
38
+ git clone https://github.com/your-repo/errorlens.git
39
+ cd errorlens
27
40
  python -m venv venv
28
41
  source venv/bin/activate # Windows: venv\Scripts\activate
29
-
30
- # Install dependencies
31
- pip install -r requirements.txt
32
-
33
- # Install the package (gives you the `errorlens` command)
34
42
  pip install -e .
35
43
  ```
36
44
 
@@ -38,101 +46,34 @@ pip install -e .
38
46
 
39
47
  ## Configuration
40
48
 
41
- Create a `.env` file in the project root:
49
+ Create a `.env` file in your working directory (or export the variables in your shell):
42
50
 
43
51
  ```bash
44
- cat > .env << 'EOF'
45
52
  ANTHROPIC_API_KEY="your-anthropic-api-key"
46
53
  MISTRAL_API_KEY="your-mistral-api-key"
47
54
  GROQ_API_KEY="your-groq-api-key"
48
- EOF
49
55
  ```
50
56
 
51
57
  You only need keys for the providers you plan to use.
52
58
 
53
- | Provider | Model | Notes |
54
- |-----------|------------------------|------------------------|
55
- | Anthropic | claude-3-opus-20240229 | Real API call |
56
- | Groq | llama3-70b-8192 | Real API call |
57
- | Mistral | mistral-large-latest | Pattern-based (mock) |
59
+ | Provider | Model | Get a key |
60
+ |-----------|------------------------|----------------------------------|
61
+ | Anthropic | claude-3-opus-20240229 | console.anthropic.com |
62
+ | Groq | llama3-70b-8192 | console.groq.com |
63
+ | Mistral | mistral-large-latest | console.mistral.ai |
58
64
 
59
65
  ---
60
66
 
61
- ## CLI Usage
62
-
63
- ```bash
64
- # Analyze a single file (all providers)
65
- python main.py path/to/file.py
66
-
67
- # Analyze a directory
68
- python main.py path/to/project/
69
-
70
- # Choose a specific provider
71
- python main.py file.py --provider anthropic
72
- python main.py file.py --provider groq
73
- python main.py file.py --provider mistral
74
-
75
- # Change output format
76
- python main.py file.py --output json
77
- python main.py file.py --output markdown
78
-
79
- # Verbose logging
80
- python main.py file.py --verbose
81
-
82
- # If installed via pip install -e .
83
- errorlens file.py --provider anthropic
84
- ```
85
-
86
- ### CLI Options
87
-
88
- | Flag | Values | Default |
89
- |--------------|-------------------------------------|----------|
90
- | `--provider` | `anthropic`, `mistral`, `groq`, `all` | `all` |
91
- | `--output` | `console`, `json`, `markdown` | `console`|
92
- | `--verbose` | — | off |
93
- | `--config` | path to JSON config file | — |
94
-
95
- ### Example console output
96
-
97
- ```
98
- ErrorLens
99
- Analyzing: example_test.py
100
- Provider: groq
101
-
102
- ==================================================
103
- ERRORLENS ANALYSIS RESULTS
104
- ==================================================
105
-
106
- File: example_test.py
107
- Language: python
108
- Status: SUCCESS
109
-
110
- --- GROQ ANALYSIS ---
111
- Security Issues:
112
- - Hardcoded credentials found in DB_PASSWORD and API_KEY variables
113
- - SQL injection vulnerability in login() function
114
- - Insecure deserialization using pickle.loads()
115
- Potential Bugs:
116
- - Division by zero possible in complex_calculation()
117
- Code Quality Issues:
118
- - Unused function detected
119
- Suggestions:
120
- - Use environment variables for credentials
121
- - Use parameterized queries
122
- ```
123
-
124
- ---
67
+ ## Usage
125
68
 
126
- ## TUI Usage
69
+ ### TUI (default)
127
70
 
128
71
  Launch the interactive terminal interface:
129
72
 
130
73
  ```bash
131
- python tui.py
74
+ errorlens
132
75
  ```
133
76
 
134
- ### Layout
135
-
136
77
  ```
137
78
  ┌─────────────────────────────────────────────────────────┐
138
79
  │ ErrorLens 12:00:00 │
@@ -156,7 +97,7 @@ python tui.py
156
97
  └─────────────────────────────────────────────────────────┘
157
98
  ```
158
99
 
159
- ### Keybindings
100
+ **Keybindings**
160
101
 
161
102
  | Key | Action |
162
103
  |-----|---------------|
@@ -168,7 +109,62 @@ Results are color-coded:
168
109
  - **Red** — Security issues
169
110
  - **Yellow** — Potential bugs
170
111
  - **Cyan** — Code quality issues
171
- - **Green** — Suggestions
112
+ - **Green** — Suggestions / no issues found
113
+
114
+ ### CLI (non-interactive)
115
+
116
+ ```bash
117
+ # Analyze a file or directory
118
+ errorlens-cli path/to/file.py
119
+ errorlens-cli path/to/project/
120
+
121
+ # Choose a specific provider
122
+ errorlens-cli file.py --provider anthropic
123
+ errorlens-cli file.py --provider groq
124
+ errorlens-cli file.py --provider mistral
125
+
126
+ # Change output format
127
+ errorlens-cli file.py --output json
128
+ errorlens-cli file.py --output markdown
129
+
130
+ # Verbose logging
131
+ errorlens-cli file.py --verbose
132
+ ```
133
+
134
+ **CLI options**
135
+
136
+ | Flag | Values | Default |
137
+ |--------------|-------------------------------------------|-----------|
138
+ | `--provider` | `anthropic`, `mistral`, `groq`, `mock`, `all` | `all` |
139
+ | `--output` | `console`, `json`, `markdown` | `console` |
140
+ | `--verbose` | — | off |
141
+ | `--config` | path to JSON config file | — |
142
+
143
+ **Example output**
144
+
145
+ ```
146
+ ErrorLens — analyzing: example_test.py provider: groq
147
+
148
+ ==================================================
149
+ ERRORLENS ANALYSIS RESULTS
150
+ ==================================================
151
+
152
+ File: example_test.py
153
+ Language: python
154
+
155
+ --- GROQ ---
156
+ Security Issues:
157
+ - Hardcoded credentials found in DB_PASSWORD and API_KEY variables
158
+ - SQL injection vulnerability in login() function
159
+ - Insecure deserialization using pickle.loads()
160
+ Potential Bugs:
161
+ - Division by zero possible in complex_calculation()
162
+ Code Quality:
163
+ - Unused function detected
164
+ Suggestions:
165
+ - Use environment variables for credentials
166
+ - Use parameterized queries
167
+ ```
172
168
 
173
169
  ---
174
170
 
@@ -195,20 +191,23 @@ Results are color-coded:
195
191
 
196
192
  ```
197
193
  errorlens/
198
- ├── main.py # CLI entry point
199
- ├── tui.py # TUI entry point
200
- ├── requirements.txt
194
+ ├── pyproject.toml
201
195
  ├── setup.py
202
- ├── .env # API keys (not committed)
203
- ├── example_test.py # Sample file with intentional issues
204
- ├── core/
205
- │ ├── analyzer.py # File discovery and analysis orchestration
206
- │ └── config.py # Configuration and env loading
207
- └── providers/
208
- ├── anthropic_provider.py # Anthropic Claude integration
209
- ├── groq_provider.py # Groq Llama 3 integration
210
- ├── mistral_provider.py # Mistral integration
211
- └── mock_provider.py # Offline mock for testing
196
+ ├── requirements.txt
197
+ ├── .env.example
198
+ ├── example_test.py
199
+ └── errorlens/ # installable package
200
+ ├── __init__.py
201
+ ├── tui.py # `errorlens` command — Textual TUI
202
+ ├── cli.py # `errorlens-cli` command — non-interactive
203
+ ├── core/
204
+ │ ├── analyzer.py # file discovery and analysis orchestration
205
+ │ └── config.py # configuration and env loading
206
+ └── providers/
207
+ ├── anthropic_provider.py # Anthropic Claude integration
208
+ ├── groq_provider.py # Groq Llama 3 integration
209
+ ├── mistral_provider.py # Mistral integration
210
+ └── mock_provider.py # offline mock for testing
212
211
  ```
213
212
 
214
213
  ---
@@ -218,7 +217,8 @@ errorlens/
218
217
  `example_test.py` is bundled with intentional security flaws and bugs — use it to verify your setup:
219
218
 
220
219
  ```bash
221
- python main.py example_test.py --provider groq
220
+ errorlens-cli example_test.py --provider mock # no API key needed
221
+ errorlens-cli example_test.py --provider groq
222
222
  ```
223
223
 
224
224
  ---
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: errorlens
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: AI-powered CLI tool for finding bugs and security issues in codebases
5
- Author-email: ErrorLens <info@errorlens.io>
5
+ Author-email: Shashvath Puppala <shashvathpuppala.21cmis0265@meruinternationalschool.com>
6
6
  License: MIT
7
7
  Keywords: security,static-analysis,ai,bugs,code-review
8
- Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Development Status :: 4 - Beta
9
9
  Classifier: Intended Audience :: Developers
10
10
  Classifier: Topic :: Security
11
11
  Classifier: Topic :: Software Development :: Quality Assurance
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Requires-Python: >=3.8
20
20
  Description-Content-Type: text/markdown
21
+ License-File: LICENSE
21
22
  Requires-Dist: textual>=0.50.0
22
23
  Requires-Dist: click>=8.0.0
23
24
  Requires-Dist: requests>=2.25.0
@@ -25,6 +26,7 @@ Requires-Dist: python-dotenv>=0.19.0
25
26
  Requires-Dist: anthropic>=0.20.0
26
27
  Requires-Dist: mistralai>=0.1.0
27
28
  Requires-Dist: groq>=0.4.0
29
+ Dynamic: license-file
28
30
 
29
31
  # ErrorLens
30
32
 
@@ -44,21 +46,29 @@ A CLI and TUI tool that analyzes codebases for bugs and security issues using mu
44
46
 
45
47
  ## Installation
46
48
 
47
- **Requirements:** Python 3.8+
49
+ ### From PyPI (recommended)
50
+
51
+ ```bash
52
+ pip install errorlens
53
+ ```
54
+
55
+ That's it. The `errorlens` command is now available globally.
56
+
57
+ ### From source
48
58
 
49
59
  ```bash
50
- # Clone the repo
51
60
  git clone https://github.com/your-repo/errorlens.git
52
61
  cd errorlens
62
+ pip install .
63
+ ```
53
64
 
54
- # Create and activate a virtual environment
65
+ ### For development
66
+
67
+ ```bash
68
+ git clone https://github.com/your-repo/errorlens.git
69
+ cd errorlens
55
70
  python -m venv venv
56
71
  source venv/bin/activate # Windows: venv\Scripts\activate
57
-
58
- # Install dependencies
59
- pip install -r requirements.txt
60
-
61
- # Install the package (gives you the `errorlens` command)
62
72
  pip install -e .
63
73
  ```
64
74
 
@@ -66,101 +76,34 @@ pip install -e .
66
76
 
67
77
  ## Configuration
68
78
 
69
- Create a `.env` file in the project root:
79
+ Create a `.env` file in your working directory (or export the variables in your shell):
70
80
 
71
81
  ```bash
72
- cat > .env << 'EOF'
73
82
  ANTHROPIC_API_KEY="your-anthropic-api-key"
74
83
  MISTRAL_API_KEY="your-mistral-api-key"
75
84
  GROQ_API_KEY="your-groq-api-key"
76
- EOF
77
85
  ```
78
86
 
79
87
  You only need keys for the providers you plan to use.
80
88
 
81
- | Provider | Model | Notes |
82
- |-----------|------------------------|------------------------|
83
- | Anthropic | claude-3-opus-20240229 | Real API call |
84
- | Groq | llama3-70b-8192 | Real API call |
85
- | Mistral | mistral-large-latest | Pattern-based (mock) |
89
+ | Provider | Model | Get a key |
90
+ |-----------|------------------------|----------------------------------|
91
+ | Anthropic | claude-3-opus-20240229 | console.anthropic.com |
92
+ | Groq | llama3-70b-8192 | console.groq.com |
93
+ | Mistral | mistral-large-latest | console.mistral.ai |
86
94
 
87
95
  ---
88
96
 
89
- ## CLI Usage
90
-
91
- ```bash
92
- # Analyze a single file (all providers)
93
- python main.py path/to/file.py
94
-
95
- # Analyze a directory
96
- python main.py path/to/project/
97
-
98
- # Choose a specific provider
99
- python main.py file.py --provider anthropic
100
- python main.py file.py --provider groq
101
- python main.py file.py --provider mistral
102
-
103
- # Change output format
104
- python main.py file.py --output json
105
- python main.py file.py --output markdown
106
-
107
- # Verbose logging
108
- python main.py file.py --verbose
109
-
110
- # If installed via pip install -e .
111
- errorlens file.py --provider anthropic
112
- ```
113
-
114
- ### CLI Options
115
-
116
- | Flag | Values | Default |
117
- |--------------|-------------------------------------|----------|
118
- | `--provider` | `anthropic`, `mistral`, `groq`, `all` | `all` |
119
- | `--output` | `console`, `json`, `markdown` | `console`|
120
- | `--verbose` | — | off |
121
- | `--config` | path to JSON config file | — |
122
-
123
- ### Example console output
124
-
125
- ```
126
- ErrorLens
127
- Analyzing: example_test.py
128
- Provider: groq
129
-
130
- ==================================================
131
- ERRORLENS ANALYSIS RESULTS
132
- ==================================================
133
-
134
- File: example_test.py
135
- Language: python
136
- Status: SUCCESS
137
-
138
- --- GROQ ANALYSIS ---
139
- Security Issues:
140
- - Hardcoded credentials found in DB_PASSWORD and API_KEY variables
141
- - SQL injection vulnerability in login() function
142
- - Insecure deserialization using pickle.loads()
143
- Potential Bugs:
144
- - Division by zero possible in complex_calculation()
145
- Code Quality Issues:
146
- - Unused function detected
147
- Suggestions:
148
- - Use environment variables for credentials
149
- - Use parameterized queries
150
- ```
151
-
152
- ---
97
+ ## Usage
153
98
 
154
- ## TUI Usage
99
+ ### TUI (default)
155
100
 
156
101
  Launch the interactive terminal interface:
157
102
 
158
103
  ```bash
159
- python tui.py
104
+ errorlens
160
105
  ```
161
106
 
162
- ### Layout
163
-
164
107
  ```
165
108
  ┌─────────────────────────────────────────────────────────┐
166
109
  │ ErrorLens 12:00:00 │
@@ -184,7 +127,7 @@ python tui.py
184
127
  └─────────────────────────────────────────────────────────┘
185
128
  ```
186
129
 
187
- ### Keybindings
130
+ **Keybindings**
188
131
 
189
132
  | Key | Action |
190
133
  |-----|---------------|
@@ -196,7 +139,62 @@ Results are color-coded:
196
139
  - **Red** — Security issues
197
140
  - **Yellow** — Potential bugs
198
141
  - **Cyan** — Code quality issues
199
- - **Green** — Suggestions
142
+ - **Green** — Suggestions / no issues found
143
+
144
+ ### CLI (non-interactive)
145
+
146
+ ```bash
147
+ # Analyze a file or directory
148
+ errorlens-cli path/to/file.py
149
+ errorlens-cli path/to/project/
150
+
151
+ # Choose a specific provider
152
+ errorlens-cli file.py --provider anthropic
153
+ errorlens-cli file.py --provider groq
154
+ errorlens-cli file.py --provider mistral
155
+
156
+ # Change output format
157
+ errorlens-cli file.py --output json
158
+ errorlens-cli file.py --output markdown
159
+
160
+ # Verbose logging
161
+ errorlens-cli file.py --verbose
162
+ ```
163
+
164
+ **CLI options**
165
+
166
+ | Flag | Values | Default |
167
+ |--------------|-------------------------------------------|-----------|
168
+ | `--provider` | `anthropic`, `mistral`, `groq`, `mock`, `all` | `all` |
169
+ | `--output` | `console`, `json`, `markdown` | `console` |
170
+ | `--verbose` | — | off |
171
+ | `--config` | path to JSON config file | — |
172
+
173
+ **Example output**
174
+
175
+ ```
176
+ ErrorLens — analyzing: example_test.py provider: groq
177
+
178
+ ==================================================
179
+ ERRORLENS ANALYSIS RESULTS
180
+ ==================================================
181
+
182
+ File: example_test.py
183
+ Language: python
184
+
185
+ --- GROQ ---
186
+ Security Issues:
187
+ - Hardcoded credentials found in DB_PASSWORD and API_KEY variables
188
+ - SQL injection vulnerability in login() function
189
+ - Insecure deserialization using pickle.loads()
190
+ Potential Bugs:
191
+ - Division by zero possible in complex_calculation()
192
+ Code Quality:
193
+ - Unused function detected
194
+ Suggestions:
195
+ - Use environment variables for credentials
196
+ - Use parameterized queries
197
+ ```
200
198
 
201
199
  ---
202
200
 
@@ -223,20 +221,23 @@ Results are color-coded:
223
221
 
224
222
  ```
225
223
  errorlens/
226
- ├── main.py # CLI entry point
227
- ├── tui.py # TUI entry point
228
- ├── requirements.txt
224
+ ├── pyproject.toml
229
225
  ├── setup.py
230
- ├── .env # API keys (not committed)
231
- ├── example_test.py # Sample file with intentional issues
232
- ├── core/
233
- │ ├── analyzer.py # File discovery and analysis orchestration
234
- │ └── config.py # Configuration and env loading
235
- └── providers/
236
- ├── anthropic_provider.py # Anthropic Claude integration
237
- ├── groq_provider.py # Groq Llama 3 integration
238
- ├── mistral_provider.py # Mistral integration
239
- └── mock_provider.py # Offline mock for testing
226
+ ├── requirements.txt
227
+ ├── .env.example
228
+ ├── example_test.py
229
+ └── errorlens/ # installable package
230
+ ├── __init__.py
231
+ ├── tui.py # `errorlens` command — Textual TUI
232
+ ├── cli.py # `errorlens-cli` command — non-interactive
233
+ ├── core/
234
+ │ ├── analyzer.py # file discovery and analysis orchestration
235
+ │ └── config.py # configuration and env loading
236
+ └── providers/
237
+ ├── anthropic_provider.py # Anthropic Claude integration
238
+ ├── groq_provider.py # Groq Llama 3 integration
239
+ ├── mistral_provider.py # Mistral integration
240
+ └── mock_provider.py # offline mock for testing
240
241
  ```
241
242
 
242
243
  ---
@@ -246,7 +247,8 @@ errorlens/
246
247
  `example_test.py` is bundled with intentional security flaws and bugs — use it to verify your setup:
247
248
 
248
249
  ```bash
249
- python main.py example_test.py --provider groq
250
+ errorlens-cli example_test.py --provider mock # no API key needed
251
+ errorlens-cli example_test.py --provider groq
250
252
  ```
251
253
 
252
254
  ---
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  pyproject.toml
3
4
  setup.py
@@ -4,17 +4,17 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "errorlens"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  description = "AI-powered CLI tool for finding bugs and security issues in codebases"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
11
11
  license = {text = "MIT"}
12
12
  authors = [
13
- {name = "ErrorLens", email = "info@errorlens.io"}
13
+ {name = "Shashvath Puppala", email = "shashvathpuppala.21cmis0265@meruinternationalschool.com"}
14
14
  ]
15
15
  keywords = ["security", "static-analysis", "ai", "bugs", "code-review"]
16
16
  classifiers = [
17
- "Development Status :: 3 - Alpha",
17
+ "Development Status :: 4 - Beta",
18
18
  "Intended Audience :: Developers",
19
19
  "Topic :: Security",
20
20
  "Topic :: Software Development :: Quality Assurance",
File without changes
File without changes
File without changes
File without changes