vexor 0.2.0__py3-none-any.whl → 0.5.0__py3-none-any.whl
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.
- vexor/__init__.py +1 -1
- vexor/cache.py +299 -26
- vexor/cli.py +340 -193
- vexor/config.py +45 -1
- vexor/modes.py +81 -0
- vexor/providers/__init__.py +3 -0
- vexor/providers/gemini.py +74 -0
- vexor/providers/openai.py +69 -0
- vexor/search.py +38 -69
- vexor/services/__init__.py +9 -0
- vexor/services/cache_service.py +39 -0
- vexor/services/config_service.py +83 -0
- vexor/services/content_extract_service.py +188 -0
- vexor/services/index_service.py +260 -0
- vexor/services/search_service.py +95 -0
- vexor/services/system_service.py +81 -0
- vexor/text.py +53 -10
- vexor/utils.py +24 -9
- vexor-0.5.0.dist-info/METADATA +139 -0
- vexor-0.5.0.dist-info/RECORD +24 -0
- vexor-0.2.0.dist-info/METADATA +0 -102
- vexor-0.2.0.dist-info/RECORD +0 -13
- {vexor-0.2.0.dist-info → vexor-0.5.0.dist-info}/WHEEL +0 -0
- {vexor-0.2.0.dist-info → vexor-0.5.0.dist-info}/entry_points.txt +0 -0
- {vexor-0.2.0.dist-info → vexor-0.5.0.dist-info}/licenses/LICENSE +0 -0
vexor/text.py
CHANGED
|
@@ -17,49 +17,84 @@ class Messages:
|
|
|
17
17
|
HELP_SEARCH_PATH = "Root directory whose cached index will be used."
|
|
18
18
|
HELP_SEARCH_TOP = "Number of results to display."
|
|
19
19
|
HELP_INCLUDE_HIDDEN = "Use the index built with hidden files included."
|
|
20
|
-
HELP_INDEX_PATH = "Root directory to scan
|
|
20
|
+
HELP_INDEX_PATH = "Root directory to scan for indexing."
|
|
21
21
|
HELP_INDEX_INCLUDE = "Include hidden files and directories when building the index."
|
|
22
|
-
HELP_INDEX_CLEAR = "Remove the cached index for the specified path (respecting include-hidden)."
|
|
22
|
+
HELP_INDEX_CLEAR = "Remove the cached index for the specified path (respecting include-hidden, mode and recursion)."
|
|
23
|
+
HELP_INDEX_SHOW = "Display metadata for the cached index matching the provided options."
|
|
24
|
+
HELP_RECURSIVE = "Recurse into subdirectories (default). Disable to work only on the specified directory."
|
|
25
|
+
HELP_MODE = "Indexing mode (name=filename, head=head snippet) to control how embeddings are built."
|
|
23
26
|
HELP_DOCTOR = "Check whether the `vexor` command is available on the current PATH."
|
|
24
27
|
HELP_UPDATE = "Check if a newer Vexor release is available online."
|
|
25
28
|
HELP_SET_API_KEY = "Persist an API key in ~/.vexor/config.json."
|
|
26
29
|
HELP_CLEAR_API_KEY = "Remove the stored API key."
|
|
27
30
|
HELP_SET_MODEL = "Set the default embedding model."
|
|
28
31
|
HELP_SET_BATCH = "Set the default batch size (0 = single request)."
|
|
32
|
+
HELP_SET_PROVIDER = "Set the default embedding provider (e.g., gemini or openai)."
|
|
33
|
+
HELP_SET_BASE_URL = "Override the provider's base URL (leave unset for official endpoints)."
|
|
34
|
+
HELP_CLEAR_BASE_URL = "Remove the custom base URL override."
|
|
29
35
|
HELP_SHOW_CONFIG = "Show current configuration."
|
|
36
|
+
HELP_SHOW_INDEX_ALL = "Show metadata for every cached index regardless of path."
|
|
37
|
+
HELP_CLEAR_INDEX_ALL = "Delete all cached indexes stored under ~/.vexor."
|
|
30
38
|
|
|
31
39
|
ERROR_API_KEY_MISSING = (
|
|
32
|
-
"
|
|
40
|
+
"API key is missing or still set to the placeholder. "
|
|
33
41
|
"Configure it via `vexor config --set-api-key <token>` or an environment variable."
|
|
34
42
|
)
|
|
35
|
-
ERROR_API_KEY_INVALID =
|
|
36
|
-
"Gemini API key is invalid. Verify the stored token and try again."
|
|
37
|
-
)
|
|
43
|
+
ERROR_API_KEY_INVALID = "API key appears invalid. Verify the stored token and try again."
|
|
38
44
|
ERROR_GENAI_PREFIX = "Gemini API request failed: "
|
|
39
|
-
|
|
45
|
+
ERROR_OPENAI_PREFIX = "OpenAI API request failed: "
|
|
46
|
+
ERROR_NO_EMBEDDINGS = "Embedding API returned no embeddings."
|
|
40
47
|
ERROR_EMPTY_QUERY = "Query text must not be empty."
|
|
41
48
|
ERROR_BATCH_NEGATIVE = "Batch size must be >= 0"
|
|
49
|
+
ERROR_MODE_INVALID = "Unsupported mode '{value}'. Allowed values: {allowed}."
|
|
50
|
+
ERROR_PROVIDER_INVALID = "Unsupported provider '{value}'. Allowed values: {allowed}."
|
|
51
|
+
ERROR_BASE_URL_CONFLICT = "Cannot set and clear the base URL in the same command."
|
|
42
52
|
|
|
43
53
|
INFO_NO_FILES = "No files found in the selected directory."
|
|
44
54
|
INFO_NO_RESULTS = "No matching files found."
|
|
45
55
|
ERROR_INDEX_MISSING = (
|
|
46
|
-
"No cached index found for {path}. Run `vexor index
|
|
56
|
+
"No cached index found for {path}. Run `vexor index` first."
|
|
47
57
|
)
|
|
48
58
|
INFO_INDEX_SAVED = "Index saved to {path}."
|
|
49
59
|
INFO_INDEX_EMPTY = "Index contains no files."
|
|
50
60
|
INFO_INDEX_UP_TO_DATE = "Index already matches the current directory; nothing to do."
|
|
51
|
-
WARNING_INDEX_STALE = "Cached index for {path} appears outdated; run `vexor index
|
|
61
|
+
WARNING_INDEX_STALE = "Cached index for {path} appears outdated; run `vexor index` to refresh."
|
|
52
62
|
INFO_INDEX_RUNNING = "Indexing files under {path}..."
|
|
53
63
|
INFO_INDEX_CLEARED = "Removed {count} cached index entr{plural} for {path}."
|
|
54
64
|
INFO_INDEX_CLEAR_NONE = "No cached index found for {path}."
|
|
65
|
+
ERROR_INDEX_SHOW_CONFLICT = "Cannot use --show together with --clear."
|
|
66
|
+
INFO_INDEX_SHOW_HEADER = "Cached index details for {path}:"
|
|
67
|
+
INFO_INDEX_SHOW_SUMMARY = (
|
|
68
|
+
"Mode: {mode}\n"
|
|
69
|
+
"Model: {model}\n"
|
|
70
|
+
"Include hidden: {hidden}\n"
|
|
71
|
+
"Recursive: {recursive}\n"
|
|
72
|
+
"Files: {files}\n"
|
|
73
|
+
"Embedding dimension: {dimension}\n"
|
|
74
|
+
"Version: {version}\n"
|
|
75
|
+
"Generated at: {generated}"
|
|
76
|
+
)
|
|
77
|
+
INFO_INDEX_ALL_HEADER = "Cached index overview"
|
|
78
|
+
INFO_INDEX_ALL_EMPTY = "No cached indexes found under ~/.vexor."
|
|
79
|
+
INFO_INDEX_ALL_CLEARED = "Removed {count} cached index entr{plural} in total."
|
|
80
|
+
INFO_INDEX_ALL_CLEAR_NONE = "Cache already empty; nothing to remove."
|
|
55
81
|
INFO_API_SAVED = "API key saved."
|
|
56
82
|
INFO_API_CLEARED = "API key cleared."
|
|
57
83
|
INFO_MODEL_SET = "Default model set to {value}."
|
|
58
84
|
INFO_BATCH_SET = "Default batch size set to {value}."
|
|
85
|
+
INFO_PROVIDER_SET = "Default provider set to {value}."
|
|
86
|
+
INFO_BASE_URL_SET = "Base URL override set to {value}."
|
|
87
|
+
INFO_BASE_URL_CLEARED = "Base URL override cleared."
|
|
88
|
+
INFO_CONFIG_EDITING = "Opening config file in editor ({editor}): {path}"
|
|
89
|
+
ERROR_CONFIG_EDITOR_NOT_FOUND = "Unable to determine a text editor. Set $VISUAL or $EDITOR, or install nano/vi."
|
|
90
|
+
ERROR_CONFIG_EDITOR_FAILED = "Editor exited with status {code}."
|
|
91
|
+
ERROR_CONFIG_EDITOR_LAUNCH = "Failed to launch editor: {reason}."
|
|
59
92
|
INFO_CONFIG_SUMMARY = (
|
|
60
93
|
"API key set: {api}\n"
|
|
94
|
+
"Default provider: {provider}\n"
|
|
61
95
|
"Default model: {model}\n"
|
|
62
|
-
"Default batch size: {batch}"
|
|
96
|
+
"Default batch size: {batch}\n"
|
|
97
|
+
"Custom base URL: {base_url}"
|
|
63
98
|
)
|
|
64
99
|
INFO_SEARCH_RUNNING = "Searching cached index under {path}..."
|
|
65
100
|
INFO_DOCTOR_CHECKING = "Checking if `vexor` is on PATH..."
|
|
@@ -79,4 +114,12 @@ class Messages:
|
|
|
79
114
|
TABLE_HEADER_INDEX = "#"
|
|
80
115
|
TABLE_HEADER_SIMILARITY = "Similarity"
|
|
81
116
|
TABLE_HEADER_PATH = "File path"
|
|
117
|
+
TABLE_HEADER_PREVIEW = "Preview"
|
|
82
118
|
TABLE_BACKEND_PREFIX = "Backend: "
|
|
119
|
+
TABLE_INDEX_HEADER_ROOT = "Root"
|
|
120
|
+
TABLE_INDEX_HEADER_MODE = "Mode"
|
|
121
|
+
TABLE_INDEX_HEADER_MODEL = "Model"
|
|
122
|
+
TABLE_INDEX_HEADER_HIDDEN = "Hidden"
|
|
123
|
+
TABLE_INDEX_HEADER_RECURSIVE = "Recursive"
|
|
124
|
+
TABLE_INDEX_HEADER_FILES = "Files"
|
|
125
|
+
TABLE_INDEX_HEADER_GENERATED = "Generated"
|
vexor/utils.py
CHANGED
|
@@ -17,17 +17,32 @@ def resolve_directory(path: Path | str) -> Path:
|
|
|
17
17
|
return dir_path
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def collect_files(
|
|
21
|
-
|
|
20
|
+
def collect_files(
|
|
21
|
+
root: Path | str,
|
|
22
|
+
include_hidden: bool = False,
|
|
23
|
+
recursive: bool = True,
|
|
24
|
+
) -> List[Path]:
|
|
25
|
+
"""Collect files under *root*; optionally keep hidden entries and recurse."""
|
|
26
|
+
|
|
22
27
|
directory = resolve_directory(root)
|
|
23
28
|
files: List[Path] = []
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
|
|
30
|
+
if recursive:
|
|
31
|
+
for dirpath, dirnames, filenames in os.walk(directory):
|
|
32
|
+
if not include_hidden:
|
|
33
|
+
dirnames[:] = [d for d in dirnames if not d.startswith(".")]
|
|
34
|
+
filenames = [f for f in filenames if not f.startswith(".")]
|
|
35
|
+
current_dir = Path(dirpath)
|
|
36
|
+
for filename in filenames:
|
|
37
|
+
files.append(current_dir / filename)
|
|
38
|
+
else:
|
|
39
|
+
for entry in directory.iterdir():
|
|
40
|
+
if entry.is_dir():
|
|
41
|
+
continue
|
|
42
|
+
if not include_hidden and entry.name.startswith("."):
|
|
43
|
+
continue
|
|
44
|
+
files.append(entry)
|
|
45
|
+
|
|
31
46
|
files.sort()
|
|
32
47
|
return files
|
|
33
48
|
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vexor
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: A vector-powered CLI for semantic search over files.
|
|
5
|
+
Project-URL: Repository, https://github.com/scarletkc/vexor
|
|
6
|
+
Author: scarletkc
|
|
7
|
+
License: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Keywords: ai,cli,semantic-search,typer
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
18
|
+
Classifier: Topic :: System :: Filesystems
|
|
19
|
+
Classifier: Topic :: Text Processing :: Indexing
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Requires-Dist: charset-normalizer>=3.3.0
|
|
23
|
+
Requires-Dist: google-genai>=0.5.0
|
|
24
|
+
Requires-Dist: numpy>=1.23.0
|
|
25
|
+
Requires-Dist: openai>=1.0.0
|
|
26
|
+
Requires-Dist: pypdf>=4.0.0
|
|
27
|
+
Requires-Dist: python-docx>=0.8.11
|
|
28
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
29
|
+
Requires-Dist: rich>=13.0.0
|
|
30
|
+
Requires-Dist: scikit-learn>=1.3.0
|
|
31
|
+
Requires-Dist: typer>=0.9.0
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: build>=1.2.1; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest>=7.4; extra == 'dev'
|
|
36
|
+
Requires-Dist: twine>=5.1.1; extra == 'dev'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
<div align="center">
|
|
40
|
+
|
|
41
|
+
<img src="https://raw.githubusercontent.com/scarletkc/vexor/refs/heads/main/assets/vexor.svg" alt="Vexor" width="50%" height="auto">
|
|
42
|
+
|
|
43
|
+
# Vexor
|
|
44
|
+
|
|
45
|
+
[](https://www.python.org/downloads/)
|
|
46
|
+
[](https://pypi.org/project/vexor/)
|
|
47
|
+
[](https://github.com/scarletkc/vexor/actions/workflows/publish.yml)
|
|
48
|
+
[](https://codecov.io/github/scarletkc/vexor)
|
|
49
|
+
[](https://github.com/scarletkc/vexor/blob/main/LICENSE)
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
Vexor is a vector-powered CLI for semantic file search. It supports configurable remote embedding models and ranks results by cosine similarity.
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
Download from [releases](https://github.com/scarletkc/vexor/releases) without python, or with:
|
|
59
|
+
```bash
|
|
60
|
+
pip install vexor # or use pipx, uv
|
|
61
|
+
```
|
|
62
|
+
The CLI entry point is `vexor`.
|
|
63
|
+
|
|
64
|
+
## Configure
|
|
65
|
+
Set the Gemini API key once and reuse it everywhere:
|
|
66
|
+
```bash
|
|
67
|
+
vexor config --set-api-key "YOUR_KEY"
|
|
68
|
+
```
|
|
69
|
+
Optional defaults:
|
|
70
|
+
```bash
|
|
71
|
+
vexor config --set-model gemini-embedding-001
|
|
72
|
+
vexor config --set-batch-size 0 # 0 = single request
|
|
73
|
+
vexor config --set-provider gemini
|
|
74
|
+
vexor config --set-base-url https://proxy.example.com # optional proxy; use --clear-base-url to reset
|
|
75
|
+
```
|
|
76
|
+
Provider defaults to `gemini`, so you only need to override it when switching to upcoming backends (e.g., `openai`). Base URLs are optional and let you route requests through a custom proxy; run `vexor config --clear-base-url` to return to the official endpoint.
|
|
77
|
+
|
|
78
|
+
Environment/API keys can be supplied via `vexor config --set-api-key`, `VEXOR_API_KEY`, or provider-specific variables (`GOOGLE_GENAI_API_KEY`, `OPENAI_API_KEY`). Example OpenAI setup:
|
|
79
|
+
```bash
|
|
80
|
+
vexor config --set-provider openai
|
|
81
|
+
vexor config --set-model text-embedding-3-small
|
|
82
|
+
export OPENAI_API_KEY="sk-..." # or use vexor config --set-api-key
|
|
83
|
+
```
|
|
84
|
+
Configuration is stored in `~/.vexor/config.json`.
|
|
85
|
+
|
|
86
|
+
Inspect or reset every cached index:
|
|
87
|
+
```bash
|
|
88
|
+
vexor config --show-index-all
|
|
89
|
+
vexor config --clear-index-all
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Workflow
|
|
93
|
+
1. **Index** the project root (includes every subdirectory):
|
|
94
|
+
```bash
|
|
95
|
+
vexor index --path ~/projects/demo --mode name --include-hidden
|
|
96
|
+
```
|
|
97
|
+
2. **Search** from anywhere, pointing to the same path:
|
|
98
|
+
```bash
|
|
99
|
+
vexor search "api client config" --path ~/projects/demo --mode name --top 5
|
|
100
|
+
```
|
|
101
|
+
Output example:
|
|
102
|
+
```
|
|
103
|
+
Vexor semantic file search results
|
|
104
|
+
──────────────────────────────────
|
|
105
|
+
# Similarity File path Preview
|
|
106
|
+
1 0.923 ./src/config_loader.py config loader entrypoint
|
|
107
|
+
2 0.871 ./src/utils/config_parse.py parse config helpers
|
|
108
|
+
3 0.809 ./tests/test_config_loader.py tests for config loader
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Tips:
|
|
112
|
+
- Keep one index per project root; subdirectories need separate indexes only if you explicitly run `vexor index` on them.
|
|
113
|
+
- Toggle `--no-recursive` (or `-n`) on both `index` and `search` when you only care about the current directory; recursive and non-recursive caches are stored separately.
|
|
114
|
+
- Hidden files are included only if both `index` and `search` use `--include-hidden`.
|
|
115
|
+
- Re-running `vexor index` only re-embeds files whose names changed (or were added/removed); if more than half the files differ, it automatically falls back to a full rebuild for consistency.
|
|
116
|
+
- Specify the indexing mode with `--mode`; currently `name` (file names only) and `head` (first chunk of supported text/code/PDF/DOCX/etc. files) are available, each with its own cache.
|
|
117
|
+
- Switch embedding providers (Gemini by default, OpenAI supported) via `vexor config --set-provider PROVIDER` and pick a matching embedding model.
|
|
118
|
+
|
|
119
|
+
## Commands
|
|
120
|
+
| Command | Description |
|
|
121
|
+
| ------- | ----------- |
|
|
122
|
+
| `vexor index --path PATH --mode MODE [--include-hidden] [--no-recursive] [--clear/--show]` | Scans `PATH` (recursively by default), embeds content according to `MODE` (`name` or `head`), and writes a cache under `~/.vexor`. |
|
|
123
|
+
| `vexor search QUERY --path PATH --mode MODE [--top K] [--include-hidden] [--no-recursive]` | Loads the cached embeddings for `PATH` (matching the chosen mode/recursion/hidden settings), shows matches for `QUERY`. |
|
|
124
|
+
| `vexor doctor` | Checks whether the `vexor` command is available on the current `PATH`. |
|
|
125
|
+
| `vexor update` | Fetches the latest release version and shows links to update via GitHub or PyPI. |
|
|
126
|
+
| `vexor config --set-api-key/--clear-api-key` | Manage the stored API key (Gemini by default). |
|
|
127
|
+
| `vexor config --set-model/--set-batch-size/--show` | Manage default model, batch size, and inspect current settings. |
|
|
128
|
+
| `vexor config --set-provider/--set-base-url/--clear-base-url` | Switch embedding providers and optionally override the remote base URL. |
|
|
129
|
+
| `vexor config --show-index-all/--clear-index-all` | Inspect or delete every cached index regardless of path/mode. |
|
|
130
|
+
|
|
131
|
+
## Documentation
|
|
132
|
+
See the [docs](https://github.com/scarletkc/vexor/tree/main/docs) for more details.
|
|
133
|
+
|
|
134
|
+
Contributions, issues, and PRs are all welcome!
|
|
135
|
+
|
|
136
|
+
Star this repo if you find it helpful!
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
This project is licensed under the [MIT](http://github.com/scarletkc/vexor/blob/main/LICENSE) License.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
vexor/__init__.py,sha256=U3Lf9AC7pGdes58VYAVF9w0BN9OmSRQKDyXsTc4wWS4,234
|
|
2
|
+
vexor/__main__.py,sha256=ZFzom1wCfP6TPXe3aoDFpNcUgjbCZ7Quy_vfzNsH5Fw,426
|
|
3
|
+
vexor/cache.py,sha256=e8MU-Y8IJc5XliN5usMgbS00t0cMtmoFAum81Fw_bNM,18340
|
|
4
|
+
vexor/cli.py,sha256=S_TCnzoAeivOnCqK2Mzqd4sI-wgxFrMtJefsaGBz8CE,19738
|
|
5
|
+
vexor/config.py,sha256=JSJ-3KAad_tIRIyJBkdL_qUALn6Hprjlz5DqterRqx0,2903
|
|
6
|
+
vexor/modes.py,sha256=HhPG4Yv-NYBGolGJQv3h8HhDYH8RsmQV59y8VTzqWUk,2227
|
|
7
|
+
vexor/search.py,sha256=RhYFI3-dzubm8gMs0hrDbnDWt7rwS_Jks_-K3wkueZ0,4306
|
|
8
|
+
vexor/text.py,sha256=moqT8Lrpdo1ReAF28-T8yfWZ1k67_CiJ3D-b-hO3Ymc,6507
|
|
9
|
+
vexor/utils.py,sha256=jH9dA6idQzw2OR7a2igqqevXEcFbdkJNxxqOHVvA1rw,2043
|
|
10
|
+
vexor/providers/__init__.py,sha256=jZ-zoKYK8gC4f_d8zdacqy2B1Ks6hzOeM24OEIM-nuk,83
|
|
11
|
+
vexor/providers/gemini.py,sha256=G-PLb6AlV1B0DN7du4ktyIg-lQTRBsIsYw4pOpG8H48,2669
|
|
12
|
+
vexor/providers/openai.py,sha256=VRClbHIyDRmwSo1WtZIctDExGvE-6v1pLGU7HfiJrg0,2332
|
|
13
|
+
vexor/services/__init__.py,sha256=dA_i2N03vlYmbZbEK2knzJLWviunkNWbzN2LWPNvMk0,160
|
|
14
|
+
vexor/services/cache_service.py,sha256=NJe2nH37mTFDTnHqSMjeBb52Sjf5V0yiO7xAyWFemiA,1073
|
|
15
|
+
vexor/services/config_service.py,sha256=3CeRR9BmkQhSdb8UF3N_eGX68gFKndOO3KD8VtGcjno,2068
|
|
16
|
+
vexor/services/content_extract_service.py,sha256=Y_h50Qu90_-pNEAQwYB3oiPUkkejK_pTMuOsMv92pZA,4464
|
|
17
|
+
vexor/services/index_service.py,sha256=sfgLAxkd7VEYMa4Tk3qu6DHihTz8CMLdG44ZZ5cxCQw,7334
|
|
18
|
+
vexor/services/search_service.py,sha256=WGKVQpHxVGF9k5cExvuvIuti7Ul1CphBoJUE1OMciSY,2563
|
|
19
|
+
vexor/services/system_service.py,sha256=cdSASeBrpShY_99oxZMDk3_9LlBk4lo1tO6njld9PkA,2316
|
|
20
|
+
vexor-0.5.0.dist-info/METADATA,sha256=e7nelTxfPm-6bAfpBMpIBubSrjioni6BDROOYimY9Qg,6791
|
|
21
|
+
vexor-0.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
22
|
+
vexor-0.5.0.dist-info/entry_points.txt,sha256=dvxp6Q1R1d6bozR7TwmpdJ0X_v83MkzsLPagGY_lfr0,40
|
|
23
|
+
vexor-0.5.0.dist-info/licenses/LICENSE,sha256=wP7TAKRll1t9LoYGxWS9NikPM_0hCc00LmlLyvQBsL8,1066
|
|
24
|
+
vexor-0.5.0.dist-info/RECORD,,
|
vexor-0.2.0.dist-info/METADATA
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: vexor
|
|
3
|
-
Version: 0.2.0
|
|
4
|
-
Summary: A vector-powered CLI for semantic search over filenames.
|
|
5
|
-
Project-URL: Repository, https://github.com/scarletkc/vexor
|
|
6
|
-
Author: scarletkc
|
|
7
|
-
License: MIT
|
|
8
|
-
License-File: LICENSE
|
|
9
|
-
Keywords: ai,cli,semantic-search,typer
|
|
10
|
-
Classifier: Development Status :: 3 - Alpha
|
|
11
|
-
Classifier: Environment :: Console
|
|
12
|
-
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
-
Classifier: Operating System :: OS Independent
|
|
15
|
-
Classifier: Programming Language :: Python
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
18
|
-
Classifier: Topic :: System :: Filesystems
|
|
19
|
-
Classifier: Topic :: Text Processing :: Indexing
|
|
20
|
-
Classifier: Topic :: Utilities
|
|
21
|
-
Requires-Python: >=3.9
|
|
22
|
-
Requires-Dist: google-genai>=0.5.0
|
|
23
|
-
Requires-Dist: numpy>=1.23.0
|
|
24
|
-
Requires-Dist: python-dotenv>=1.0.0
|
|
25
|
-
Requires-Dist: rich>=13.0.0
|
|
26
|
-
Requires-Dist: scikit-learn>=1.3.0
|
|
27
|
-
Requires-Dist: typer>=0.9.0
|
|
28
|
-
Provides-Extra: dev
|
|
29
|
-
Requires-Dist: build>=1.2.1; extra == 'dev'
|
|
30
|
-
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
|
|
31
|
-
Requires-Dist: pytest>=7.4; extra == 'dev'
|
|
32
|
-
Requires-Dist: twine>=5.1.1; extra == 'dev'
|
|
33
|
-
Description-Content-Type: text/markdown
|
|
34
|
-
|
|
35
|
-
<div align="center">
|
|
36
|
-
|
|
37
|
-
<img src="https://raw.githubusercontent.com/scarletkc/vexor/refs/heads/main/assets/vexor.svg" alt="Vexor" width="50%" height="auto">
|
|
38
|
-
|
|
39
|
-
# Vexor
|
|
40
|
-
|
|
41
|
-
[](https://www.python.org/downloads/)
|
|
42
|
-
[](https://pypi.org/project/vexor/)
|
|
43
|
-
[](https://github.com/scarletkc/vexor/actions/workflows/publish.yml)
|
|
44
|
-
[](https://codecov.io/github/scarletkc/vexor)
|
|
45
|
-
[](https://github.com/scarletkc/vexor/blob/main/LICENSE)
|
|
46
|
-
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
Vexor is a vector-powered CLI that searches file names semantically. It uses Google GenAI's `gemini-embedding-001` model to embed file names and queries, then ranks matches with cosine similarity.
|
|
52
|
-
|
|
53
|
-
## Install
|
|
54
|
-
Download from [releases](https://github.com/scarletkc/vexor/releases) without python, or with:
|
|
55
|
-
```bash
|
|
56
|
-
pip install vexor # or use pipx, uv
|
|
57
|
-
```
|
|
58
|
-
The CLI entry point is `vexor`.
|
|
59
|
-
|
|
60
|
-
## Configure
|
|
61
|
-
Set the Gemini API key once and reuse it everywhere:
|
|
62
|
-
```bash
|
|
63
|
-
vexor config --set-api-key "YOUR_KEY"
|
|
64
|
-
```
|
|
65
|
-
Optional defaults:
|
|
66
|
-
```bash
|
|
67
|
-
vexor config --set-model gemini-embedding-001
|
|
68
|
-
vexor config --set-batch-size 0 # 0 = single request
|
|
69
|
-
```
|
|
70
|
-
Configuration is stored in `~/.vexor/config.json`.
|
|
71
|
-
|
|
72
|
-
## Workflow
|
|
73
|
-
1. **Index** the project root (includes every subdirectory):
|
|
74
|
-
```bash
|
|
75
|
-
vexor index --path ~/projects/demo --include-hidden
|
|
76
|
-
```
|
|
77
|
-
2. **Search** from anywhere, pointing to the same path:
|
|
78
|
-
```bash
|
|
79
|
-
vexor search "api client config" --path ~/projects/demo --top 5
|
|
80
|
-
```
|
|
81
|
-
Output example:
|
|
82
|
-
```
|
|
83
|
-
Vexor semantic file search results
|
|
84
|
-
──────────────────────────────────
|
|
85
|
-
1 0.923 ./src/config_loader.py
|
|
86
|
-
2 0.871 ./src/utils/config_parse.py
|
|
87
|
-
3 0.809 ./tests/test_config_loader.py
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Tips:
|
|
91
|
-
- Keep one index per project root; subdirectories need separate indexes only if you explicitly run `vexor index` on them.
|
|
92
|
-
- Hidden files are included only if both `index` and `search` use `--include-hidden`.
|
|
93
|
-
|
|
94
|
-
## Commands
|
|
95
|
-
| Command | Description |
|
|
96
|
-
| ------- | ----------- |
|
|
97
|
-
| `vexor index --path PATH [--include-hidden] [--clear]` | Recursively scans `PATH`, embeds file names, and writes a cache under `~/.vexor`. |
|
|
98
|
-
| `vexor search QUERY --path PATH [--top K] [--include-hidden]` | Loads the cached embeddings for `PATH` and ranks matches for `QUERY`. |
|
|
99
|
-
| `vexor doctor` | Checks whether the `vexor` command is available on the current `PATH`. |
|
|
100
|
-
| `vexor update` | Fetches the latest release version and shows links to update via GitHub or PyPI. |
|
|
101
|
-
| `vexor config --set-api-key/--clear-api-key` | Manage the stored Gemini API key. |
|
|
102
|
-
| `vexor config --set-model/--set-batch-size/--show` | Manage default model and batch size. |
|
vexor-0.2.0.dist-info/RECORD
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
vexor/__init__.py,sha256=sxxZci6pouzNpymD1ejnMDepVWWu0RZ7rwM0RKkRg6I,234
|
|
2
|
-
vexor/__main__.py,sha256=ZFzom1wCfP6TPXe3aoDFpNcUgjbCZ7Quy_vfzNsH5Fw,426
|
|
3
|
-
vexor/cache.py,sha256=Y_NoKijKqYU8lq6vfx9W5DDB3kEkFP_mKPykJj0MhV4,9180
|
|
4
|
-
vexor/cli.py,sha256=y_FKVkfAIJ506efaoPhhL_ffz4IAbYkOKSGbcK8zwu4,14175
|
|
5
|
-
vexor/config.py,sha256=euhmbeXxxWn3uULBENFS0YYvNQuX53qjMwVGuejXwF0,1597
|
|
6
|
-
vexor/search.py,sha256=tQG9MuAV3Us4eUl5Tez3sdUp6aolFQJfFREXN3qCnsc,5352
|
|
7
|
-
vexor/text.py,sha256=ELD_0f4AXwQEJmiXvkC1sK6pPMQB3l-Xe_GBIkXd5eA,3890
|
|
8
|
-
vexor/utils.py,sha256=kN8thdTBohRfCk-wO_BZtMpHdsQM6LN4tJBRxyrphpc,1727
|
|
9
|
-
vexor-0.2.0.dist-info/METADATA,sha256=8X2YvrOnUdq6ymyMCeMVeegNgG6zVqCYN36cdwUniZw,4211
|
|
10
|
-
vexor-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
11
|
-
vexor-0.2.0.dist-info/entry_points.txt,sha256=dvxp6Q1R1d6bozR7TwmpdJ0X_v83MkzsLPagGY_lfr0,40
|
|
12
|
-
vexor-0.2.0.dist-info/licenses/LICENSE,sha256=wP7TAKRll1t9LoYGxWS9NikPM_0hCc00LmlLyvQBsL8,1066
|
|
13
|
-
vexor-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|