Local File Search
Search your own files by meaning, not just keyword matching — entirely on your own machine, nothing uploaded anywhere.
Install
pip install JCcoder0901semantic-search
Run
python -m search_api.main
This works every time, regardless of how your terminal's PATH is set up — no extra configuration needed.
Then open your browser to:
http://127.0.0.1:9120
You'll see a simple page:
-
Index a folder — type the full path to a folder you want searchable (e.g.
C:\Users\you\Documents\notes), pick which extensions to include if you want more than the.txt/.mddefaults, click Index. -
Search — pick a mode (file name + content, file name only, or content only), type a plain-English question, click Search. Results are ranked by how close their meaning is to your question, not exact word matches — a file can show up even without containing your exact search terms.
That's the whole workflow — no curl, no JSON, no terminal commands after the initial run command.
First run downloads a small embedding model (~50MB via fastembed), needs
internet once, then works fully offline.
Your search index is saved to ~/.local_file_search/index.pkl — in your own
user folder, separate from the installed package. It survives reinstalls
and updates, and it's private to your own machine; installing this package
never gives anyone else access to your indexed files or search history.
Optional: using the localsearch shortcut command instead
pip also installs a shortcut command, localsearch, that does the exact
same thing as python -m search_api.main. Whether it works out of the box
depends on your system's PATH setup — a well-known Python packaging quirk,
most common on Windows, and not something wrong with your installation if it
doesn't. There's no need to fix this; python -m search_api.main above
always works regardless. If you'd like the shortcut working anyway:
python -c "import sysconfig; print(sysconfig.get_path('scripts'))"
Add the folder that prints to your system PATH (search "environment variables" in the Start menu on Windows), then open a new terminal window.
Alternatively, pipx is built to handle this
automatically — though it can hit the same PATH issue itself on some
systems, in which case run python -m pipx ensurepath instead of
pipx ensurepath.
Running via Docker instead (optional)
If you'd rather not install anything into your system Python, a Dockerfile
is included.
docker build -t local-file-search .
docker run -p 9120:9120 -v "${PWD}/data:/data" -v "${env:USERPROFILE}:/host" local-file-search
${env:USERPROFILE} mounts your whole Windows user folder as /host inside
the container, so a folder like Documents\notes in your profile becomes
/host/Documents/notes when typed into the app. ${PWD}/data:/data
persists the index outside the container so it survives restarts.
Notes on scope
- Only files you explicitly
Indexget searched — nothing is scanned automatically just because it exists on disk. - Point Index at specific folders rather than an entire drive — indexing everything would be slow and pull in a lot of irrelevant files.
- Supported file types by default:
.txtand.md. Add more via theextensionsfield in the Index request, or by editingsearch_api/main.py.
How it works, briefly
- Index: for each matching file, embeds the filename and the content as
two separate vectors (lists of numbers capturing meaning) using a small
local model (via
fastembed, no PyTorch/GPU required), and saves them toindex.pkl. - Search: embeds your question the same way, compares it against the stored vectors by cosine similarity, and returns the closest matches. The mode selector controls whether "closest" is judged by filename, content, or whichever of the two is the stronger match.
Publishing new versions (for the maintainer)
This project publishes to PyPI automatically via GitHub Actions
(.github/workflows/publish.yml) using PyPI's Trusted Publishing — no
manual twine upload or API token needed.
To release a new version:
- Bump
versioninpyproject.toml. - Commit and push the change.
- On GitHub: Releases → Draft a new release, tag it (e.g.
v0.1.1), and publish the release.
That triggers the workflow, which builds the package and uploads it to PyPI automatically.
Metadata
Release files for JCcoder0901semantic-search 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jccoder0901semantic_search-0.2.3.tar.gz | 10.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jccoder0901semantic_search-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.9 kB
Release files / jccoder0901semantic_search-0.2.3.tar.gz
| Download URL | jccoder0901semantic_search-0.2.3.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83b2bc7f733898e4c806a178db309eb0bd24b0f314ae8f7c62745a7a0f678aed
|
|
BLAKE2b-256 checksum How to use checksums |
d5852b472d40c8eefc8421cbcde12e52620e055667eb4fa473f38c615e731266
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / jccoder0901semantic_search-0.2.3-py3-none-any.whl
| Download URL | jccoder0901semantic_search-0.2.3-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77f924d912931c22ef261ac78869c65b7d6523fdba192e32ffc1b96e8b6dd2c6
|
|
BLAKE2b-256 checksum How to use checksums |
e266e3f4e9aa144708e05cc1f57ce3a4ffb7d1ebaf4ecdb235e26e1d48234a0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for JCcoder0901semantic-search 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for jccoder0901semantic_search-0.2.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.