vexor 0.2.0__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 vexor might be problematic. Click here for more details.
- vexor-0.2.0/.gitignore +159 -0
- vexor-0.2.0/LICENSE +21 -0
- vexor-0.2.0/PKG-INFO +102 -0
- vexor-0.2.0/README.md +68 -0
- vexor-0.2.0/pyproject.toml +68 -0
- vexor-0.2.0/vexor/__init__.py +12 -0
- vexor-0.2.0/vexor/__main__.py +18 -0
- vexor-0.2.0/vexor/cache.py +286 -0
- vexor-0.2.0/vexor/cli.py +466 -0
- vexor-0.2.0/vexor/config.py +62 -0
- vexor-0.2.0/vexor/search.py +152 -0
- vexor-0.2.0/vexor/text.py +82 -0
- vexor-0.2.0/vexor/utils.py +50 -0
vexor-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
PIPE_MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
*.manifest
|
|
31
|
+
#*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
cover/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
db.sqlite3-journal
|
|
61
|
+
|
|
62
|
+
# Flask stuff:
|
|
63
|
+
instance/
|
|
64
|
+
.webassets-cache
|
|
65
|
+
|
|
66
|
+
# Scrapy stuff:
|
|
67
|
+
.scrapy
|
|
68
|
+
|
|
69
|
+
# Sphinx documentation
|
|
70
|
+
docs/_build/
|
|
71
|
+
|
|
72
|
+
# PyBuilder
|
|
73
|
+
.pybuilder/
|
|
74
|
+
target/
|
|
75
|
+
|
|
76
|
+
# Jupyter Notebook
|
|
77
|
+
.ipynb_checkpoints
|
|
78
|
+
|
|
79
|
+
# IPython
|
|
80
|
+
profile_default/
|
|
81
|
+
ipython_config.py
|
|
82
|
+
|
|
83
|
+
# pyenv
|
|
84
|
+
.python-version
|
|
85
|
+
|
|
86
|
+
# pipenv
|
|
87
|
+
Pipfile.lock
|
|
88
|
+
|
|
89
|
+
# poetry
|
|
90
|
+
poetry.lock
|
|
91
|
+
|
|
92
|
+
# pdm
|
|
93
|
+
.pdm.toml
|
|
94
|
+
|
|
95
|
+
# PEP 582
|
|
96
|
+
__pypackages__/
|
|
97
|
+
|
|
98
|
+
# Celery stuff
|
|
99
|
+
celerybeat-schedule
|
|
100
|
+
celerybeat.pid
|
|
101
|
+
|
|
102
|
+
# SageMath parsed files
|
|
103
|
+
*.sage.py
|
|
104
|
+
|
|
105
|
+
# Environments
|
|
106
|
+
.env
|
|
107
|
+
.venv
|
|
108
|
+
env/
|
|
109
|
+
venv/
|
|
110
|
+
ENV/
|
|
111
|
+
env.bak/
|
|
112
|
+
venv.bak/
|
|
113
|
+
|
|
114
|
+
# Spyder project settings
|
|
115
|
+
.spyderproject
|
|
116
|
+
.spyproject
|
|
117
|
+
|
|
118
|
+
# Rope project settings
|
|
119
|
+
.ropeproject
|
|
120
|
+
|
|
121
|
+
# mkdocs documentation
|
|
122
|
+
/site
|
|
123
|
+
|
|
124
|
+
# mypy
|
|
125
|
+
.mypy_cache/
|
|
126
|
+
.dmypy.json
|
|
127
|
+
dmypy.json
|
|
128
|
+
|
|
129
|
+
# Pyre type checker
|
|
130
|
+
.pyre/
|
|
131
|
+
|
|
132
|
+
# pytype static type analyzer
|
|
133
|
+
.pytype/
|
|
134
|
+
|
|
135
|
+
# Cython debug symbols
|
|
136
|
+
cython_debug/
|
|
137
|
+
|
|
138
|
+
# IDE specific files
|
|
139
|
+
.vscode/
|
|
140
|
+
.idea/
|
|
141
|
+
*.swp
|
|
142
|
+
*.swo
|
|
143
|
+
*~
|
|
144
|
+
.DS_Store
|
|
145
|
+
|
|
146
|
+
# SentenceTransformers cache
|
|
147
|
+
.cache/
|
|
148
|
+
sentence_transformers/
|
|
149
|
+
|
|
150
|
+
# Model cache (HuggingFace)
|
|
151
|
+
.transformers_cache/
|
|
152
|
+
models/
|
|
153
|
+
|
|
154
|
+
# Project specific
|
|
155
|
+
*.db
|
|
156
|
+
*.sqlite
|
|
157
|
+
test_data/
|
|
158
|
+
temp/
|
|
159
|
+
tmp/
|
vexor-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ScarletKc
|
|
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.
|
vexor-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
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/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/scarletkc/vexor/refs/heads/main/assets/vexor.svg" alt="Vexor" width="50%" height="auto">
|
|
4
|
+
|
|
5
|
+
# Vexor
|
|
6
|
+
|
|
7
|
+
[](https://www.python.org/downloads/)
|
|
8
|
+
[](https://pypi.org/project/vexor/)
|
|
9
|
+
[](https://github.com/scarletkc/vexor/actions/workflows/publish.yml)
|
|
10
|
+
[](https://codecov.io/github/scarletkc/vexor)
|
|
11
|
+
[](https://github.com/scarletkc/vexor/blob/main/LICENSE)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
Download from [releases](https://github.com/scarletkc/vexor/releases) without python, or with:
|
|
21
|
+
```bash
|
|
22
|
+
pip install vexor # or use pipx, uv
|
|
23
|
+
```
|
|
24
|
+
The CLI entry point is `vexor`.
|
|
25
|
+
|
|
26
|
+
## Configure
|
|
27
|
+
Set the Gemini API key once and reuse it everywhere:
|
|
28
|
+
```bash
|
|
29
|
+
vexor config --set-api-key "YOUR_KEY"
|
|
30
|
+
```
|
|
31
|
+
Optional defaults:
|
|
32
|
+
```bash
|
|
33
|
+
vexor config --set-model gemini-embedding-001
|
|
34
|
+
vexor config --set-batch-size 0 # 0 = single request
|
|
35
|
+
```
|
|
36
|
+
Configuration is stored in `~/.vexor/config.json`.
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
1. **Index** the project root (includes every subdirectory):
|
|
40
|
+
```bash
|
|
41
|
+
vexor index --path ~/projects/demo --include-hidden
|
|
42
|
+
```
|
|
43
|
+
2. **Search** from anywhere, pointing to the same path:
|
|
44
|
+
```bash
|
|
45
|
+
vexor search "api client config" --path ~/projects/demo --top 5
|
|
46
|
+
```
|
|
47
|
+
Output example:
|
|
48
|
+
```
|
|
49
|
+
Vexor semantic file search results
|
|
50
|
+
──────────────────────────────────
|
|
51
|
+
1 0.923 ./src/config_loader.py
|
|
52
|
+
2 0.871 ./src/utils/config_parse.py
|
|
53
|
+
3 0.809 ./tests/test_config_loader.py
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Tips:
|
|
57
|
+
- Keep one index per project root; subdirectories need separate indexes only if you explicitly run `vexor index` on them.
|
|
58
|
+
- Hidden files are included only if both `index` and `search` use `--include-hidden`.
|
|
59
|
+
|
|
60
|
+
## Commands
|
|
61
|
+
| Command | Description |
|
|
62
|
+
| ------- | ----------- |
|
|
63
|
+
| `vexor index --path PATH [--include-hidden] [--clear]` | Recursively scans `PATH`, embeds file names, and writes a cache under `~/.vexor`. |
|
|
64
|
+
| `vexor search QUERY --path PATH [--top K] [--include-hidden]` | Loads the cached embeddings for `PATH` and ranks matches for `QUERY`. |
|
|
65
|
+
| `vexor doctor` | Checks whether the `vexor` command is available on the current `PATH`. |
|
|
66
|
+
| `vexor update` | Fetches the latest release version and shows links to update via GitHub or PyPI. |
|
|
67
|
+
| `vexor config --set-api-key/--clear-api-key` | Manage the stored Gemini API key. |
|
|
68
|
+
| `vexor config --set-model/--set-batch-size/--show` | Manage default model and batch size. |
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
[build-system]
|
|
3
|
+
requires = ["hatchling>=1.21"]
|
|
4
|
+
build-backend = "hatchling.build"
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
name = "vexor"
|
|
8
|
+
description = "A vector-powered CLI for semantic search over filenames."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [{ name = "scarletkc" }]
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
requires-python = ">=3.9"
|
|
13
|
+
keywords = ["semantic-search", "cli", "typer", "ai"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: End Users/Desktop",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Programming Language :: Python",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Topic :: Utilities",
|
|
23
|
+
"Topic :: System :: Filesystems",
|
|
24
|
+
"Topic :: Text Processing :: Indexing",
|
|
25
|
+
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
26
|
+
]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"google-genai>=0.5.0",
|
|
29
|
+
"python-dotenv>=1.0.0",
|
|
30
|
+
"scikit-learn>=1.3.0",
|
|
31
|
+
"numpy>=1.23.0",
|
|
32
|
+
"typer>=0.9.0",
|
|
33
|
+
"rich>=13.0.0",
|
|
34
|
+
]
|
|
35
|
+
dynamic = ["version"]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
[project.optional-dependencies]
|
|
39
|
+
dev = [
|
|
40
|
+
"pytest>=7.4",
|
|
41
|
+
"pytest-cov>=4.1",
|
|
42
|
+
"build>=1.2.1",
|
|
43
|
+
"twine>=5.1.1",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[project.urls]
|
|
47
|
+
Repository = "https://github.com/scarletkc/vexor"
|
|
48
|
+
|
|
49
|
+
[project.scripts]
|
|
50
|
+
vexor = "vexor.cli:run"
|
|
51
|
+
|
|
52
|
+
[tool.hatch.version]
|
|
53
|
+
path = "vexor/__init__.py"
|
|
54
|
+
|
|
55
|
+
[tool.hatch.build.targets.sdist]
|
|
56
|
+
include = [
|
|
57
|
+
"vexor",
|
|
58
|
+
"README.md",
|
|
59
|
+
"LICENSE",
|
|
60
|
+
"pyproject.toml",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
[tool.hatch.build.targets.wheel]
|
|
64
|
+
packages = ["vexor"]
|
|
65
|
+
|
|
66
|
+
[tool.pytest.ini_options]
|
|
67
|
+
addopts = "-ra"
|
|
68
|
+
pythonpath = ["."]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Entry point for `python -m vexor` and frozen builds."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
# Normal package execution path
|
|
7
|
+
from .cli import run
|
|
8
|
+
except ImportError: # pragma: no cover - happens in frozen single-file builds
|
|
9
|
+
from vexor.cli import run # type: ignore[import]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main() -> None:
|
|
13
|
+
"""Execute the Typer application."""
|
|
14
|
+
run()
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
if __name__ == "__main__":
|
|
18
|
+
raise SystemExit(main())
|