1
- # devseeker
1
+ # DevSeeker
2
2
3
3
[ ![ PyPI version] ( https://img.shields.io/pypi/v/devseeker )] ( https://pypi.org/project/devseeker )
4
4
5
- ** devseeker is an CLI coding agent for generating and improving code through prompts**
5
+ ** DevSeeker is a an NLP to code ai agent**
6
+
7
+
8
+
9
+ ## Table of Contents
10
+
11
+ - [ Installation] ( #installation )
12
+ - [ Configuration] ( #configuration )
13
+ - [ Basic Usage] ( #basic-usage )
14
+ - [ Operational Modes] ( #operational-modes )
15
+ - [ CLI Options Reference] ( #cli-options-reference )
16
+ - [ Environment Variables] ( #environment-variables )
17
+ - [ Using Alternative Models] ( #using-alternative-models )
18
+ - [ Project Configuration] ( #project-configuration )
19
+ - [ File Selection] ( #file-selection )
20
+ - [ Troubleshooting] ( #troubleshooting )
21
+ - [ Windows-Specific Instructions] ( #windows-specific-instructions )
22
+ - [ Contributing] ( #contributing )
23
+ - [ License] ( #license )
6
24
7
25
## Installation
8
26
9
- ### Stable release
27
+ ### Via pip (Recommended)
10
28
11
29
``` sh
12
30
pip install devseeker
13
31
```
14
32
15
- ### Development installation
33
+ ### Development Installation
16
34
17
35
``` sh
18
36
git clone https://github.com/iBz-04/devseeker.git
@@ -23,53 +41,294 @@ poetry shell
23
41
24
42
## Configuration
25
43
26
- devseeker requires an OpenAI API key. Set it as an environment variable or in a ` .env ` file:
44
+ DevSeeker requires an OpenAI API key. You can set it in three ways:
45
+
46
+ ### 1. Environment variable
27
47
28
48
``` sh
29
49
export OPENAI_API_KEY=your_api_key
30
50
```
31
51
32
- or create a ` .env ` file:
52
+ ### 2. .env file
53
+
54
+ Create a ` .env ` file in your project directory:
33
55
34
56
```
35
57
OPENAI_API_KEY=your_api_key
36
58
```
37
59
38
- ## Usage
60
+ ### 3. Custom configuration
39
61
40
- ### Creating a new project
62
+ For advanced configuration, create a ` devseeker.toml ` file in your project:
41
63
42
- 1 . Create an empty directory for your project.
43
- 2 . Inside the directory, create a file named ` prompt ` containing your instructions.
44
- 3 . Run:
64
+ ``` toml
65
+ [run ]
66
+ build = " npm run build"
67
+ test = " npm run test"
68
+ lint = " quick-lint-js"
69
+
70
+ [paths ]
71
+ base = " ./src" # base directory to operate in
72
+ ```
73
+
74
+ ## Basic Usage
75
+
76
+ ### Creating a New Project
77
+
78
+ 1 . Create an empty directory for your project
79
+ 2 . Inside the directory, create a file named ` prompt ` containing your instructions
80
+ 3 . Run DevSeeker:
45
81
46
82
``` sh
47
83
devseeker projects/my-new-project
48
84
```
49
85
50
- ### Improving existing code
86
+ When you run this command, DevSeeker will:
87
+ - Present a welcome interface
88
+ - Read your prompt (or ask for one if not found)
89
+ - Generate code files based on your description
90
+ - Create an entrypoint file for running the project
91
+ - Ask if you want to execute the generated code
92
+
93
+ ### Improving Existing Code
51
94
52
95
``` sh
53
96
devseeker projects/my-existing-project -i
54
97
```
55
98
56
- ### Benchmarking AI agents
99
+ When you run DevSeeker in improve mode with the ` -i ` flag, it provides an interactive terminal UI that allows you to:
100
+
101
+ 1 . Describe how you want to improve your application through natural language prompts
102
+ 2 . Select which files should be modified (through an interactive file selection interface)
103
+ 3 . Review proposed changes in a diff view (showing what will be added/removed)
104
+ 4 . Accept or reject the changes before they're applied to your codebase
105
+
106
+ You can also use the ` --skip-file-selection ` or ` -s ` flag to bypass the interactive file selection:
107
+
108
+ ``` sh
109
+ devseeker projects/my-existing-project -i -s
110
+ ```
111
+
112
+ ## Operational Modes
113
+
114
+ DevSeeker supports several operational modes that change how it processes your prompts and generates code:
115
+
116
+ ### Standard Mode (Default)
117
+
118
+ Generates complete projects following your prompt.
119
+
120
+ ``` sh
121
+ devseeker projects/my-project
122
+ ```
123
+
124
+ ### Improve Mode
125
+
126
+ Modifies existing code according to your instructions.
127
+
128
+ ``` sh
129
+ devseeker projects/my-project -i
130
+ ```
131
+
132
+ ### Clarify Mode
133
+
134
+ Discusses specifications with you before implementing them.
135
+
136
+ ``` sh
137
+ devseeker projects/my-project -c
138
+ ```
139
+
140
+ ### Lite Mode
141
+
142
+ Generates code using only your main prompt, without additional steps.
143
+
144
+ ``` sh
145
+ devseeker projects/my-project -l
146
+ ```
147
+
148
+ ### Self-Heal Mode
149
+
150
+ Automatically fixes code when it fails during execution.
151
+
152
+ ``` sh
153
+ devseeker projects/my-project -sh
154
+ ```
155
+
156
+ ## CLI Options Reference
157
+
158
+ DevSeeker offers numerous command-line options to customize its behavior:
159
+
160
+ | Option | Short | Default | Description |
161
+ | --------| -------| ---------| -------------|
162
+ | ` --model ` , | ` -m ` | gpt-4o | The AI model to use |
163
+ | ` --temperature ` | ` -t ` | 0.1 | Controls randomness in outputs (0.0-1.0) |
164
+ | ` --improve ` | ` -i ` | False | Improves existing project |
165
+ | ` --lite ` | ` -l ` | False | Runs using only the main prompt |
166
+ | ` --clarify ` | ` -c ` | False | Discusses specifications before implementation |
167
+ | ` --self-heal ` | ` -sh ` | False | Auto-fixes failing code |
168
+ | ` --azure ` | ` -a ` | "" | Azure OpenAI endpoint URL |
169
+ | ` --use-custom-preprompts ` | | False | Uses custom prompts from project workspace |
170
+ | ` --llm-via-clipboard ` | | False | Uses clipboard for AI communication |
171
+ | ` --verbose ` | ` -v ` | False | Enables verbose logging |
172
+ | ` --debug ` | ` -d ` | False | Enables debug mode |
173
+ | ` --prompt_file ` | | "prompt" | Path to text file with prompt |
174
+ | ` --entrypoint_prompt ` | | "" | Path to file with entrypoint requirements |
175
+ | ` --image_directory ` | | "" | Path to folder with images |
176
+ | ` --use_cache ` | | False | Caches LLM responses to save tokens |
177
+ | ` --skip-file-selection ` | ` -s ` | False | Skips interactive file selection in improve mode |
178
+ | ` --no_execution ` | | False | Runs setup without calling LLM or writing code |
179
+ | ` --sysinfo ` | | False | Outputs system information for debugging |
180
+ | ` --diff_timeout ` | | 3 | Timeout for diff regexp searches |
181
+ | ` --help ` | ` -h ` | | Shows help information |
182
+
183
+ ### Common Command Examples
57
184
58
185
``` sh
59
- bench run --help
186
+ # Basic usage - create a project from prompt
187
+ devseeker projects/my-project
188
+
189
+ # Create a project with a specific model
190
+ devseeker projects/my-project -m gpt-4-turbo
191
+
192
+ # Improve an existing project
193
+ devseeker projects/my-existing-project -i
194
+
195
+ # Improve a project with higher temperature for more creative outputs
196
+ devseeker projects/my-project -i -t 0.5
197
+
198
+ # Clarify requirements before implementation
199
+ devseeker projects/my-project -c
200
+
201
+ # Use lite mode for faster generation
202
+ devseeker projects/my-project -l
203
+
204
+ # Enable self-healing for auto-fixing code
205
+ devseeker projects/my-project -sh
206
+
207
+ # Use Azure OpenAI service
208
+ devseeker projects/my-project --azure https://< your-resource-name> .openai.azure.com
209
+
210
+ # Display help information
211
+ devseeker --help
212
+
213
+ # Display system information for troubleshooting
214
+ devseeker --sysinfo
215
+
216
+ # Skip file selection in improve mode
217
+ devseeker projects/my-project -i -s
218
+
219
+ # Use a specific prompt file
220
+ devseeker projects/my-project --prompt_file custom_prompt.txt
221
+
222
+ # Use images in your prompt
223
+ devseeker projects/my-project --image_directory images/
224
+
225
+ # Use custom preprompts
226
+ devseeker projects/my-project --use-custom-preprompts
227
+
228
+ # Enable verbose logging
229
+ devseeker projects/my-project -v
230
+ ```
231
+
232
+ ## Environment Variables
233
+
234
+ DevSeeker recognizes these environment variables:
235
+
236
+ | Variable | Description |
237
+ | ----------| -------------|
238
+ | ` OPENAI_API_KEY ` | Your OpenAI API key |
239
+ | ` MODEL_NAME ` | Default model to use (e.g., "gpt-4o") |
240
+ | ` OPENAI_API_BASE ` | Alternative API endpoint |
241
+ | ` LOCAL_MODEL ` | Set to "true" when using local models |
242
+ | ` EDITOR ` | Your preferred text editor |
243
+ | ` LANGCHAIN_WANDB_TRACING ` | Enable W&B tracing (set to "true") |
244
+ | ` WANDB_API_KEY ` | Weights & Biases API key |
245
+
246
+ ## Using Alternative Models
247
+
248
+ ### Local Models with llama.cpp
249
+
250
+ ``` bash
251
+ export OPENAI_API_BASE=" http://localhost:8000/v1"
252
+ export OPENAI_API_KEY=" sk-your_local_key"
253
+ export MODEL_NAME=" CodeLlama"
254
+ export LOCAL_MODEL=true
255
+ ```
256
+
257
+ ### Azure OpenAI
258
+
259
+ ``` bash
260
+ devseeker --azure https://< your-resource-name> .openai.azure.com my-project
261
+ ```
262
+
263
+ See [ docs/open_models.md] ( docs/open_models.md ) for detailed instructions.
264
+
265
+ ## Project Configuration
266
+
267
+ DevSeeker can be configured with a ` devseeker.toml ` file in your project root:
268
+
269
+ ``` toml
270
+ [run ]
271
+ build = " npm run build"
272
+ test = " npm run test"
273
+ lint = " quick-lint-js"
274
+
275
+ [paths ]
276
+ base = " ./frontend" # base directory for monorepos
277
+ src = " ./src" # source directory for context
278
+
279
+ [devseeker-app ] # used for devseeker.app integration
280
+ project_id = " ..."
281
+ ```
282
+
283
+ ## File Selection
284
+
285
+ When improving code, DevSeeker needs to know which files to include in its context. The file selection process:
286
+
287
+ 1 . DevSeeker scans your project directory
288
+ 2 . Creates a TOML file with file paths
289
+ 3 . Opens this file in your text editor
290
+ 4 . You uncomment lines for files you want to include
291
+ 5 . Save and close the file to continue
292
+
293
+ The selection interface supports:
294
+ - Color-coded file types
295
+ - Intelligent defaults based on language
296
+ - Filtering of common directories like ` node_modules `
297
+
298
+ ## Troubleshooting
299
+
300
+ ### Common Issues
301
+
302
+ #### API Key Not Found
303
+ ```
304
+ Error: OpenAI API key not found
305
+ ```
306
+ Solution: Set your ` OPENAI_API_KEY ` as described in Configuration.
307
+
308
+ #### Token Limit Exceeded
309
+ ```
310
+ Error: This model's maximum context length is exceeded
60
311
```
312
+ Solution: Select fewer files in improve mode or use a model with higher token limits.
61
313
62
- ## Commands
314
+ #### Execution Errors
315
+ If generated code fails to run, try:
316
+ - Using self-heal mode: ` devseeker path/to/project -sh `
317
+ - Checking dependency installation
318
+ - Inspecting generated logs in the project's ` .devseeker/logs ` directory
63
319
64
- - ` devseeker ` (alias ` ds ` , ` dste ` ) runs the main CLI application.
65
- - ` bench ` runs benchmarks on AI agents.
320
+ ## Windows-Specific Instructions
66
321
322
+ Windows users should consult [ WINDOWS_README.md] ( WINDOWS_README.md ) for platform-specific details.
67
323
68
- - Windows users can refer to [ WINDOWS_README.md] ( WINDOWS_README.md ) .
324
+ Key differences:
325
+ - Use ` set ` instead of ` export ` for environment variables
326
+ - Path separators use backslashes
327
+ - Some commands may require PowerShell
69
328
70
329
## Contributing
71
330
72
- Contributions are welcome!
331
+ Contributions are welcome! Please feel free to submit a Pull Request.
73
332
74
333
## License
75
334
0 commit comments