@voria/cli 0.0.2
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.
- package/README.md +439 -0
- package/bin/voria +730 -0
- package/docs/ARCHITECTURE.md +419 -0
- package/docs/CHANGELOG.md +189 -0
- package/docs/CONTRIBUTING.md +447 -0
- package/docs/DESIGN_DECISIONS.md +380 -0
- package/docs/DEVELOPMENT.md +535 -0
- package/docs/EXAMPLES.md +434 -0
- package/docs/INSTALL.md +335 -0
- package/docs/IPC_PROTOCOL.md +310 -0
- package/docs/LLM_INTEGRATION.md +416 -0
- package/docs/MODULES.md +470 -0
- package/docs/PERFORMANCE.md +346 -0
- package/docs/PLUGINS.md +432 -0
- package/docs/QUICKSTART.md +184 -0
- package/docs/README.md +133 -0
- package/docs/ROADMAP.md +346 -0
- package/docs/SECURITY.md +334 -0
- package/docs/TROUBLESHOOTING.md +565 -0
- package/docs/USER_GUIDE.md +700 -0
- package/package.json +63 -0
- package/python/voria/__init__.py +8 -0
- package/python/voria/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/voria/__pycache__/engine.cpython-312.pyc +0 -0
- package/python/voria/core/__init__.py +1 -0
- package/python/voria/core/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/voria/core/__pycache__/setup.cpython-312.pyc +0 -0
- package/python/voria/core/agent/__init__.py +9 -0
- package/python/voria/core/agent/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/voria/core/agent/__pycache__/loop.cpython-312.pyc +0 -0
- package/python/voria/core/agent/loop.py +343 -0
- package/python/voria/core/executor/__init__.py +19 -0
- package/python/voria/core/executor/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/voria/core/executor/__pycache__/executor.cpython-312.pyc +0 -0
- package/python/voria/core/executor/executor.py +431 -0
- package/python/voria/core/github/__init__.py +33 -0
- package/python/voria/core/github/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/voria/core/github/__pycache__/client.cpython-312.pyc +0 -0
- package/python/voria/core/github/client.py +438 -0
- package/python/voria/core/llm/__init__.py +55 -0
- package/python/voria/core/llm/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/voria/core/llm/__pycache__/base.cpython-312.pyc +0 -0
- package/python/voria/core/llm/__pycache__/claude_provider.cpython-312.pyc +0 -0
- package/python/voria/core/llm/__pycache__/gemini_provider.cpython-312.pyc +0 -0
- package/python/voria/core/llm/__pycache__/modal_provider.cpython-312.pyc +0 -0
- package/python/voria/core/llm/__pycache__/model_discovery.cpython-312.pyc +0 -0
- package/python/voria/core/llm/__pycache__/openai_provider.cpython-312.pyc +0 -0
- package/python/voria/core/llm/base.py +152 -0
- package/python/voria/core/llm/claude_provider.py +188 -0
- package/python/voria/core/llm/gemini_provider.py +148 -0
- package/python/voria/core/llm/modal_provider.py +228 -0
- package/python/voria/core/llm/model_discovery.py +289 -0
- package/python/voria/core/llm/openai_provider.py +146 -0
- package/python/voria/core/patcher/__init__.py +9 -0
- package/python/voria/core/patcher/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/voria/core/patcher/__pycache__/patcher.cpython-312.pyc +0 -0
- package/python/voria/core/patcher/patcher.py +375 -0
- package/python/voria/core/planner/__init__.py +1 -0
- package/python/voria/core/setup.py +201 -0
- package/python/voria/core/token_manager/__init__.py +29 -0
- package/python/voria/core/token_manager/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/voria/core/token_manager/__pycache__/manager.cpython-312.pyc +0 -0
- package/python/voria/core/token_manager/manager.py +241 -0
- package/python/voria/engine.py +1185 -0
- package/python/voria/plugins/__init__.py +1 -0
- package/python/voria/plugins/python/__init__.py +1 -0
- package/python/voria/plugins/typescript/__init__.py +1 -0
|
@@ -0,0 +1,700 @@
|
|
|
1
|
+
# User Guide
|
|
2
|
+
|
|
3
|
+
Complete guide to using voria for automating bug fixes.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
voria automates the process of fixing issues in your codebase. You describe a problem, and voria:
|
|
8
|
+
|
|
9
|
+
1. **Lists** issues from your repositories
|
|
10
|
+
2. **Fetches** the issue details
|
|
11
|
+
3. **Generates** a fix using an AI LLM
|
|
12
|
+
4. **Applies** the patch to your code
|
|
13
|
+
|
|
14
|
+
## Quick Example
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Setup your LLM provider (do once)
|
|
18
|
+
voria setup-modal your_token_here
|
|
19
|
+
|
|
20
|
+
# Setup GitHub access (do once)
|
|
21
|
+
voria set-github-token
|
|
22
|
+
|
|
23
|
+
# List all issues in a repo
|
|
24
|
+
voria list-issues owner/repo
|
|
25
|
+
|
|
26
|
+
# Fix a specific GitHub issue
|
|
27
|
+
voria fix 42 owner/repo
|
|
28
|
+
|
|
29
|
+
# Plan a fix for an issue
|
|
30
|
+
voria plan 42
|
|
31
|
+
|
|
32
|
+
# Apply a generated patch
|
|
33
|
+
voria apply patch-file.diff
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Main Commands
|
|
39
|
+
|
|
40
|
+
### `voria setup-modal [TOKEN]`
|
|
41
|
+
|
|
42
|
+
Setup Modal API for AI-powered code generation.
|
|
43
|
+
|
|
44
|
+
**Usage:**
|
|
45
|
+
```bash
|
|
46
|
+
# With token provided
|
|
47
|
+
voria setup-modal sk-modal-your-key-here
|
|
48
|
+
|
|
49
|
+
# Or enter interactively
|
|
50
|
+
voria setup-modal
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**What it does:**
|
|
54
|
+
- Saves Modal API key to `~/.voria/config.json`
|
|
55
|
+
- Sets Modal as your LLM provider
|
|
56
|
+
- Encrypts and secures your token
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### `voria set-github-token`
|
|
61
|
+
|
|
62
|
+
Setup GitHub Personal Access Token for accessing repositories.
|
|
63
|
+
|
|
64
|
+
**Usage:**
|
|
65
|
+
```bash
|
|
66
|
+
voria set-github-token
|
|
67
|
+
# Paste your GitHub token when prompted
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**What it does:**
|
|
71
|
+
- Saves GitHub token to `~/.voria/config.json`
|
|
72
|
+
- Enables access to private/public repositories
|
|
73
|
+
- Allows listing issues and creating pull requests
|
|
74
|
+
|
|
75
|
+
**Creating a GitHub Token:**
|
|
76
|
+
1. Go to https://github.com/settings/tokens
|
|
77
|
+
2. Click "Generate new token (classic)"
|
|
78
|
+
3. Select scopes: `repo` (full repository access)
|
|
79
|
+
4. Copy and paste the token
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### `voria list-issues [REPO]`
|
|
84
|
+
|
|
85
|
+
List all open issues in a GitHub repository.
|
|
86
|
+
|
|
87
|
+
**Usage:**
|
|
88
|
+
```bash
|
|
89
|
+
# Using owner/repo format
|
|
90
|
+
voria list-issues ansh/voria
|
|
91
|
+
|
|
92
|
+
# Using full GitHub URL
|
|
93
|
+
voria list-issues https://github.com/ansh/voria
|
|
94
|
+
|
|
95
|
+
# Interactive mode (will prompt for repo)
|
|
96
|
+
voria list-issues
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Output:**
|
|
100
|
+
```
|
|
101
|
+
📋 Found 5 open issues in ansh/voria:
|
|
102
|
+
|
|
103
|
+
#1 - Fix null pointer exception
|
|
104
|
+
Labels: bug, critical
|
|
105
|
+
https://github.com/ansh/voria/issues/1
|
|
106
|
+
|
|
107
|
+
#2 - Add retry logic to API calls
|
|
108
|
+
Labels: enhancement
|
|
109
|
+
https://github.com/ansh/voria/issues/2
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
### `voria fix <ISSUE_NUMBER> [REPO]`
|
|
115
|
+
|
|
116
|
+
Fix a specific GitHub issue using AI.
|
|
117
|
+
|
|
118
|
+
**Usage:**
|
|
119
|
+
```bash
|
|
120
|
+
# With repo specified
|
|
121
|
+
voria fix 42 ansh/voria
|
|
122
|
+
|
|
123
|
+
# With full URL
|
|
124
|
+
voria fix 42 https://github.com/ansh/voria
|
|
125
|
+
|
|
126
|
+
# Interactive mode
|
|
127
|
+
voria fix 42
|
|
128
|
+
# Will prompt for repository
|
|
129
|
+
|
|
130
|
+
# With verbose output
|
|
131
|
+
voria fix 42 ansh/voria -v
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Workflow:**
|
|
135
|
+
```
|
|
136
|
+
1. Fetch issue title and description
|
|
137
|
+
2. Analyze the codebase
|
|
138
|
+
3. Generate a fix using LLM
|
|
139
|
+
4. Display the proposed patch
|
|
140
|
+
5. Show token usage and cost
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Options:**
|
|
144
|
+
- `-v, --verbose` - Show detailed output and debug information
|
|
145
|
+
- `--config <PATH>` - Use specific config file
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### `voria plan [ISSUE_ID]`
|
|
150
|
+
|
|
151
|
+
Plan how to fix a GitHub issue.
|
|
152
|
+
|
|
153
|
+
**Usage:**
|
|
154
|
+
```bash
|
|
155
|
+
# Analyze and propose a fix for issue #42
|
|
156
|
+
voria plan 42
|
|
157
|
+
|
|
158
|
+
# Verbose mode with details
|
|
159
|
+
voria plan 42 -v
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Output:**
|
|
163
|
+
```
|
|
164
|
+
🔍 Analyzing issue #42...
|
|
165
|
+
📝 Plan:
|
|
166
|
+
- This is a simple type mismatch
|
|
167
|
+
- Need to cast string to int
|
|
168
|
+
- 1 file affected
|
|
169
|
+
- Estimated complexity: LOW
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### `voria apply <PATCH_FILE>`
|
|
175
|
+
|
|
176
|
+
Apply a previously-generated patch file.
|
|
177
|
+
|
|
178
|
+
**Usage:**
|
|
179
|
+
```bash
|
|
180
|
+
# Apply a patch
|
|
181
|
+
voria apply fix.patch
|
|
182
|
+
|
|
183
|
+
# Verbose output
|
|
184
|
+
voria apply fix.patch -v
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**What it does:**
|
|
188
|
+
- Reads the patch file
|
|
189
|
+
- Applies changes to your code
|
|
190
|
+
- Shows modified files
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Configuration
|
|
195
|
+
|
|
196
|
+
voria stores configuration in `~/.voria/config.json`:
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"llm_provider": "modal",
|
|
201
|
+
"modal_token": "sk-modal-...",
|
|
202
|
+
"github_token": "ghp_...",
|
|
203
|
+
"llm_provider": "openai",
|
|
204
|
+
"llm_api_key": "sk-...",
|
|
205
|
+
"llm_model": "gpt-4",
|
|
206
|
+
"daily_budget": 10.0,
|
|
207
|
+
"max_retries": 1
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Using Environment Variables
|
|
212
|
+
|
|
213
|
+
Instead of storing in config, you can use environment variables:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
export MODAL_API_KEY=sk-modal-...
|
|
217
|
+
export GITHUB_TOKEN=ghp_...
|
|
218
|
+
|
|
219
|
+
# Or with other providers:
|
|
220
|
+
export OPENAI_API_KEY=sk-...
|
|
221
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Examples
|
|
227
|
+
|
|
228
|
+
### Example 1: Fix a Simple Issue
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Setup (one time)
|
|
232
|
+
voria setup-modal
|
|
233
|
+
voria set-github-token
|
|
234
|
+
|
|
235
|
+
# List issues
|
|
236
|
+
voria list-issues owner/repo
|
|
237
|
+
|
|
238
|
+
# Fix issue #1
|
|
239
|
+
voria fix 1 owner/repo
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Example 2: Plan Before Fixing
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# See what would be done
|
|
246
|
+
voria plan 42
|
|
247
|
+
|
|
248
|
+
# If it looks good, apply it
|
|
249
|
+
voria apply recommended-fix.patch
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Example 3: Batch Process Multiple Issues
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# List all issues
|
|
256
|
+
voria list-issues owner/repo
|
|
257
|
+
|
|
258
|
+
# Fix multiple issues one by one
|
|
259
|
+
voria fix 1 owner/repo
|
|
260
|
+
voria fix 2 owner/repo
|
|
261
|
+
voria fix 3 owner/repo
|
|
262
|
+
```
|
|
263
|
+
3. Config file (`~/.voria/config.json`)
|
|
264
|
+
4. Defaults (OpenAI, gpt-4)
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Setting Up LLM Providers
|
|
269
|
+
|
|
270
|
+
### OpenAI (Default)
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# 1. Get API key from https://platform.openai.com/account/api-keys
|
|
274
|
+
# 2. Set key
|
|
275
|
+
export OPENAI_API_KEY=sk-...
|
|
276
|
+
|
|
277
|
+
# 3. Configure (optional, uses gpt-4 by default)
|
|
278
|
+
./target/release/voria plan "test" --llm openai --model gpt-4-turbo
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Cost:** ~$10-30/month for typical usage
|
|
282
|
+
|
|
283
|
+
### Claude (Anthropic)
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
# 1. Get API key from https://console.anthropic.com/
|
|
287
|
+
# 2. Set key
|
|
288
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
289
|
+
|
|
290
|
+
# 3. Use
|
|
291
|
+
./target/release/voria plan "test" --llm claude --model claude-3-sonnet
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Cost:** ~$5-15/month
|
|
295
|
+
|
|
296
|
+
### Gemini (Google)
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
# 1. Get API key from https://ai.google.dev/
|
|
300
|
+
# 2. Set key
|
|
301
|
+
export GOOGLE_API_KEY=...
|
|
302
|
+
|
|
303
|
+
# 3. Use
|
|
304
|
+
./target/release/voria plan "test" --llm gemini
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**Cost:** ~$1-5/month (cheapest)
|
|
308
|
+
|
|
309
|
+
### Modal (Free)
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
# 1. Get API key from https://modal.com/
|
|
313
|
+
# 2. Set key
|
|
314
|
+
export MODAL_API_KEY=...
|
|
315
|
+
|
|
316
|
+
# 3. Use
|
|
317
|
+
./target/release/voria plan "test" --llm modal
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
**Cost:** Free (community tier) or ~$20/month
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Understanding Costs
|
|
325
|
+
|
|
326
|
+
### Pricing by Provider
|
|
327
|
+
|
|
328
|
+
| Provider | Cost | Speed | Quality |
|
|
329
|
+
|----------|------|-------|---------|
|
|
330
|
+
| Gemini | $0.0001/1k | Fast | Good |
|
|
331
|
+
| OpenAI (GPT-4 Mini) | $0.03/1k | Medium | Very Good |
|
|
332
|
+
| Claude | $0.003/1k | Medium | Excellent |
|
|
333
|
+
| OpenAI (GPT-4 Turbo) | $0.03/1k | Slow | Best |
|
|
334
|
+
| Modal | Free/paid | Fast | Good |
|
|
335
|
+
|
|
336
|
+
### Cost Factors
|
|
337
|
+
|
|
338
|
+
Each fix typically costs:
|
|
339
|
+
- **Simple fix:** 10-50k tokens = $0.50-1.00
|
|
340
|
+
- **Medium fix:** 50-100k tokens = $1.00-3.00
|
|
341
|
+
- **Complex fix:** 100-200k tokens = $3.00-10.00
|
|
342
|
+
|
|
343
|
+
**Token usage depends on:**
|
|
344
|
+
- Repository size
|
|
345
|
+
- Issue complexity
|
|
346
|
+
- Number of iterations (failures and retries)
|
|
347
|
+
- LLM model choice
|
|
348
|
+
|
|
349
|
+
### Cost Control
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
# Set daily budget
|
|
353
|
+
export voria_DAILY_BUDGET=5.0
|
|
354
|
+
|
|
355
|
+
# Monitor spending
|
|
356
|
+
./target/release/voria token info
|
|
357
|
+
|
|
358
|
+
# Reduce context size to save tokens
|
|
359
|
+
./target/release/voria issue 42 --max-files 10
|
|
360
|
+
|
|
361
|
+
# Use cheaper LLM
|
|
362
|
+
./target/release/voria issue 42 --llm gemini # 10x cheaper
|
|
363
|
+
|
|
364
|
+
# Limit iterations
|
|
365
|
+
./target/release/voria issue 42 --max-iterations 1
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Typical monthly cost: **$5-30 depending on usage and LLM choice**
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Working with Tests
|
|
373
|
+
|
|
374
|
+
### Supported Test Frameworks
|
|
375
|
+
|
|
376
|
+
| Language | Frameworks |
|
|
377
|
+
|----------|------------|
|
|
378
|
+
| Python | pytest, unittest, nose2, tox |
|
|
379
|
+
| JavaScript | Jest, Mocha, Jasmine, Vitest |
|
|
380
|
+
| Java | JUnit 4/5, TestNG |
|
|
381
|
+
| Go | testing, testify |
|
|
382
|
+
| Rust | cargo test |
|
|
383
|
+
| Ruby | RSpec, Minitest |
|
|
384
|
+
|
|
385
|
+
### Automatic Detection
|
|
386
|
+
|
|
387
|
+
voria automatically detects your test framework:
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
cd your-repo
|
|
391
|
+
./target/release/voria issue 42 # Detects pytest, jest, etc.
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Custom Test Command
|
|
395
|
+
|
|
396
|
+
```bash
|
|
397
|
+
# Specify test command explicitly
|
|
398
|
+
./target/release/voria issue 42 --test-cmd "npm test"
|
|
399
|
+
|
|
400
|
+
./target/release/voria issue 42 --test-cmd "pytest tests/ -xvs"
|
|
401
|
+
|
|
402
|
+
./target/release/voria issue 42 --test-cmd "cargo test --lib"
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
### Skip Testing
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
# Don't run tests (faster but less safe)
|
|
409
|
+
./target/release/voria issue 42 --skip-tests
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Test Failure Analysis
|
|
413
|
+
|
|
414
|
+
When tests fail, voria:
|
|
415
|
+
|
|
416
|
+
1. **Reads** the test output
|
|
417
|
+
2. **Analyzes** what went wrong
|
|
418
|
+
3. **Generates** a fix
|
|
419
|
+
4. **Reruns** tests (loop up to max-iterations)
|
|
420
|
+
|
|
421
|
+
Example:
|
|
422
|
+
```
|
|
423
|
+
❌ Tests failed (1/3 iterations)
|
|
424
|
+
ERROR: TypeError in test_parse_url
|
|
425
|
+
...
|
|
426
|
+
🔧 Refining fix...
|
|
427
|
+
✅ Tests passed (2/3 iterations)
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## Iteration & Refinement
|
|
433
|
+
|
|
434
|
+
voria automatically improves fixes through iteration:
|
|
435
|
+
|
|
436
|
+
**How it works:**
|
|
437
|
+
1. Generate fix
|
|
438
|
+
2. Run tests
|
|
439
|
+
3. If tests fail → analyze failure → generate improved fix → go to step 2
|
|
440
|
+
4. Maximum 5 iterations (default: 3)
|
|
441
|
+
|
|
442
|
+
**Example:**
|
|
443
|
+
```
|
|
444
|
+
🔍 Iteration 1/3
|
|
445
|
+
✅ 8/9 tests pass → Need refinement
|
|
446
|
+
|
|
447
|
+
🔍 Iteration 2/3
|
|
448
|
+
✅ 9/9 tests pass → SUCCESS
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**Control iteration:**
|
|
452
|
+
```bash
|
|
453
|
+
# Try harder (up to 5 times)
|
|
454
|
+
./target/release/voria issue 42 --max-iterations 5
|
|
455
|
+
|
|
456
|
+
# Fast mode (only try once)
|
|
457
|
+
./target/release/voria issue 42 --max-iterations 1
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
---
|
|
461
|
+
|
|
462
|
+
## Monitoring & Logging
|
|
463
|
+
|
|
464
|
+
### Check voria's Progress
|
|
465
|
+
|
|
466
|
+
```bash
|
|
467
|
+
# Verbose output (shows all steps)
|
|
468
|
+
./target/release/voria -v issue 42
|
|
469
|
+
|
|
470
|
+
# Very verbose (shows token count, API calls)
|
|
471
|
+
./target/release/voria -vv issue 42
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Token Usage
|
|
475
|
+
|
|
476
|
+
```bash
|
|
477
|
+
# Check token usage for this issue
|
|
478
|
+
./target/release/voria token info
|
|
479
|
+
|
|
480
|
+
# Reset daily counter (if needed)
|
|
481
|
+
./target/release/voria token reset
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### Logs
|
|
485
|
+
|
|
486
|
+
voria logs are stored in `~/.voria/voria.log`:
|
|
487
|
+
|
|
488
|
+
```bash
|
|
489
|
+
# View recent logs
|
|
490
|
+
tail -f ~/.voria/voria.log
|
|
491
|
+
|
|
492
|
+
# Find errors
|
|
493
|
+
grep ERROR ~/.voria/voria.log
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
## Safety & Best Practices
|
|
499
|
+
|
|
500
|
+
### Always Use Dry-Run First
|
|
501
|
+
|
|
502
|
+
```bash
|
|
503
|
+
# Propose first
|
|
504
|
+
./target/release/voria issue 42 --dry-run
|
|
505
|
+
|
|
506
|
+
# Review the proposed patch
|
|
507
|
+
git diff # or look at voria's output
|
|
508
|
+
|
|
509
|
+
# Then apply
|
|
510
|
+
./target/release/voria issue 42
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
### Automatic Backups
|
|
514
|
+
|
|
515
|
+
voria automatically backs up files before patching:
|
|
516
|
+
|
|
517
|
+
```bash
|
|
518
|
+
~/.voria/backups/
|
|
519
|
+
├── file_1704067200.py # Backup with timestamp
|
|
520
|
+
├── file_1704067201.py
|
|
521
|
+
└── ...
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
### Review PR Before Merging
|
|
525
|
+
|
|
526
|
+
voria creates PRs automatically, but always:
|
|
527
|
+
|
|
528
|
+
1. **Review** code changes in GitHub PR
|
|
529
|
+
2. **Check** tests pass in CI
|
|
530
|
+
3. **Ask** team for feedback if complex
|
|
531
|
+
4. **Merge** only when confident
|
|
532
|
+
|
|
533
|
+
### Rollback If Needed
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
# If voria's fix broke something:
|
|
537
|
+
git revert HEAD
|
|
538
|
+
|
|
539
|
+
# Or manually restore from backup
|
|
540
|
+
cp ~/.voria/backups/file_*.py restored_file.py
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
---
|
|
544
|
+
|
|
545
|
+
## Troubleshooting
|
|
546
|
+
|
|
547
|
+
### "API Key Not Working"
|
|
548
|
+
|
|
549
|
+
```bash
|
|
550
|
+
# Verify key is set
|
|
551
|
+
echo $OPENAI_API_KEY # Should not be empty
|
|
552
|
+
|
|
553
|
+
# Verify key format (starts with sk- for OpenAI)
|
|
554
|
+
echo $OPENAI_API_KEY | head -c 5
|
|
555
|
+
|
|
556
|
+
# Test key directly
|
|
557
|
+
curl -H "Authorization: Bearer $OPENAI_API_KEY" \
|
|
558
|
+
https://api.openai.com/v1/models | head
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### "Tests Timeout"
|
|
562
|
+
|
|
563
|
+
```bash
|
|
564
|
+
# Increase timeout
|
|
565
|
+
./target/release/voria issue 42 --timeout 600 # 10 minutes
|
|
566
|
+
|
|
567
|
+
# Run tests manually to check they work
|
|
568
|
+
npm test # or pytest, cargo test, etc.
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### "No Issues Found"
|
|
572
|
+
|
|
573
|
+
```bash
|
|
574
|
+
# Ensure you're in a git repository
|
|
575
|
+
git status
|
|
576
|
+
|
|
577
|
+
# Ensure GitHub token is set
|
|
578
|
+
echo $GITHUB_TOKEN
|
|
579
|
+
|
|
580
|
+
# Specify repo explicitly
|
|
581
|
+
./target/release/voria issue 42 --repo https://github.com/user/repo
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
### "Patch Fails to Apply"
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
# Check git status
|
|
588
|
+
git status
|
|
589
|
+
|
|
590
|
+
# Try fuzzy matching
|
|
591
|
+
./target/release/voria issue 42 --patch-strategy fuzzy
|
|
592
|
+
|
|
593
|
+
# Review the patch manually
|
|
594
|
+
voria issue 42 --dry-run
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) for more issues.
|
|
598
|
+
|
|
599
|
+
---
|
|
600
|
+
|
|
601
|
+
## Learning Resources
|
|
602
|
+
|
|
603
|
+
- **[Quick Start](QUICKSTART.md)** - Get running in 5 minutes
|
|
604
|
+
- **[Examples](EXAMPLES.md)** - Real-world usage scenarios
|
|
605
|
+
- **[FAQ](TROUBLESHOOTING.md)** - Common problems and solutions
|
|
606
|
+
- **[Architecture](ARCHITECTURE.md)** - How voria works internally
|
|
607
|
+
- **[Plugins](PLUGINS.md)** - Extend voria with custom capabilities
|
|
608
|
+
|
|
609
|
+
---
|
|
610
|
+
|
|
611
|
+
## Best Practices
|
|
612
|
+
|
|
613
|
+
### Start Small
|
|
614
|
+
|
|
615
|
+
```bash
|
|
616
|
+
# Dry-run first
|
|
617
|
+
./target/release/voria issue 42 --dry-run
|
|
618
|
+
|
|
619
|
+
# Review output carefully
|
|
620
|
+
# Then proceed if it looks good
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
### Use Right Tool for the Job
|
|
624
|
+
|
|
625
|
+
```bash
|
|
626
|
+
# For well-defined issues
|
|
627
|
+
./target/release/voria issue 42
|
|
628
|
+
|
|
629
|
+
# For vague descriptions
|
|
630
|
+
./target/release/voria plan "optimize database queries"
|
|
631
|
+
|
|
632
|
+
# For direct descriptions
|
|
633
|
+
./target/release/voria plan "Add type hints to utils.py"
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
### Monitor Costs
|
|
637
|
+
|
|
638
|
+
```bash
|
|
639
|
+
# Start with cheaper models
|
|
640
|
+
./target/release/voria issue 42 --llm gemini # 10x cheaper
|
|
641
|
+
|
|
642
|
+
# Upgrade if needed
|
|
643
|
+
./target/release/voria issue 42 --llm claude # Better quality
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
### Iterate Carefully
|
|
647
|
+
|
|
648
|
+
```bash
|
|
649
|
+
# Let voria refine
|
|
650
|
+
./target/release/voria issue 42 --max-iterations 3
|
|
651
|
+
|
|
652
|
+
# Monitor progress
|
|
653
|
+
./target/release/voria -v issue 42
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
---
|
|
657
|
+
|
|
658
|
+
## Advanced Usage
|
|
659
|
+
|
|
660
|
+
### Batch Processing
|
|
661
|
+
|
|
662
|
+
```bash
|
|
663
|
+
# Fix multiple issues
|
|
664
|
+
./target/release/voria issue 42 43 45 46
|
|
665
|
+
|
|
666
|
+
# Fix all open issues
|
|
667
|
+
./target/release/voria issue --all
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
### Custom Hooks
|
|
671
|
+
|
|
672
|
+
Create `~/.voria/hooks/post-fix.sh`:
|
|
673
|
+
|
|
674
|
+
```bash
|
|
675
|
+
#!/bin/bash
|
|
676
|
+
# Run after voria creates PR
|
|
677
|
+
echo "New PR created: $1"
|
|
678
|
+
# Send notification, etc.
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
### Team Configuration
|
|
682
|
+
|
|
683
|
+
Team leads can create `voria.config.json` in repo root:
|
|
684
|
+
|
|
685
|
+
```json
|
|
686
|
+
{
|
|
687
|
+
"team_budget": 50.0,
|
|
688
|
+
"default_llm": "claude",
|
|
689
|
+
"excluded_paths": ["tests/", "docs/"],
|
|
690
|
+
"required_reviewers": ["@team-lead"]
|
|
691
|
+
}
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
---
|
|
695
|
+
|
|
696
|
+
**See Also:**
|
|
697
|
+
- [EXAMPLES.md](EXAMPLES.md) - Real-world examples
|
|
698
|
+
- [PERFORMANCE.md](PERFORMANCE.md) - Speed optimization
|
|
699
|
+
- [SECURITY.md](SECURITY.md) - Security best practices
|
|
700
|
+
- [TROUBLESHOOTING.md](TROUBLESHOOTING.md) - Common issues
|