Skip to content

Commit 996ff2b

Browse files
committed
chore: v4 release and fixes
1 parent 8dca8ba commit 996ff2b

File tree

8 files changed

+382
-194
lines changed

8 files changed

+382
-194
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
name: publish
1+
name: Publish Package
22

33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- 'v*.*.*'
77

88
jobs:
9-
publish:
9+
build-and-publish:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v4
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
1415
with:
15-
python-version: '3.x'
16-
- run: pip install poetry
17-
- run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
18-
- run: poetry publish --build --no-interaction
16+
python-version: '3.10'
17+
- name: Install Poetry
18+
run: |
19+
curl -sSL https://install.python-poetry.org | python3 -
20+
echo "$HOME/.local/bin" >> $GITHUB_PATH
21+
- name: Install dependencies
22+
run: poetry install --no-dev
23+
- name: Publish to PyPI
24+
env:
25+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
26+
run: poetry publish --no-interaction --build

README.md

Lines changed: 278 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,36 @@
1-
# devseeker
1+
# DevSeeker
22

33
[![PyPI version](https://img.shields.io/pypi/v/devseeker)](https://pypi.org/project/devseeker)
44

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)
624

725
## Installation
826

9-
### Stable release
27+
### Via pip (Recommended)
1028

1129
```sh
1230
pip install devseeker
1331
```
1432

15-
### Development installation
33+
### Development Installation
1634

1735
```sh
1836
git clone https://github.com/iBz-04/devseeker.git
@@ -23,53 +41,294 @@ poetry shell
2341

2442
## Configuration
2543

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
2747

2848
```sh
2949
export OPENAI_API_KEY=your_api_key
3050
```
3151

32-
or create a `.env` file:
52+
### 2. .env file
53+
54+
Create a `.env` file in your project directory:
3355

3456
```
3557
OPENAI_API_KEY=your_api_key
3658
```
3759

38-
## Usage
60+
### 3. Custom configuration
3961

40-
### Creating a new project
62+
For advanced configuration, create a `devseeker.toml` file in your project:
4163

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:
4581

4682
```sh
4783
devseeker projects/my-new-project
4884
```
4985

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
5194

5295
```sh
5396
devseeker projects/my-existing-project -i
5497
```
5598

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
57184

58185
```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
60311
```
312+
Solution: Select fewer files in improve mode or use a model with higher token limits.
61313

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
63319

64-
- `devseeker` (alias `ds`, `dste`) runs the main CLI application.
65-
- `bench` runs benchmarks on AI agents.
320+
## Windows-Specific Instructions
66321

322+
Windows users should consult [WINDOWS_README.md](WINDOWS_README.md) for platform-specific details.
67323

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
69328

70329
## Contributing
71330

72-
Contributions are welcome!
331+
Contributions are welcome! Please feel free to submit a Pull Request.
73332

74333
## License
75334

WINDOWS_README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ YOU CAN RUN THE CLI WITH `poetry run devseeker`
6161
- Fill in the `prompt` file in your new folder with your command
6262
- `devseeker projects/my-new-project` or `poetry run devseeker projects/my-new-project`
6363
- (Note, `devseeker --help` lets you see all available options. For example `--steps use_feedback` lets you improve/fix code in a project)
64+
- Also ` devseeker projects/my-existing-project -i` or `devseeker projects/my-existing-project -improve`
6465

6566
NB: If you want to create a game you might want to install pygame `pip install pygame`
6667

0 commit comments

Comments
 (0)