@grumppie/ownsearch 0.1.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
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.
package/README.md ADDED
@@ -0,0 +1,137 @@
1
+ # ownsearch
2
+
3
+ **ownsearch** is a local search layer for agents.
4
+
5
+ It indexes approved folders into a local Qdrant vector store, exposes retrieval through an MCP server, and gives agents grounded access to private knowledge without requiring a hosted search service.
6
+
7
+ V1 is intentionally text-first: reliable local retrieval for documentation, code, and extracted PDF text. Future versions are intended to expand into multimodal indexing and search for images, audio, video, and richer document workflows.
8
+
9
+ ## What it does
10
+
11
+ - Indexes local folders into a persistent vector store
12
+ - Chunks and embeds supported files with Gemini
13
+ - Supports incremental reindexing for changed and deleted files
14
+ - Exposes search and context retrieval through MCP
15
+ - Lets agents retrieve ranked hits, exact chunks, or bundled grounded context
16
+
17
+ ## V1 scope
18
+
19
+ - text and code files
20
+ - extracted text from PDFs
21
+ - Gemini `gemini-embedding-001`
22
+ - Docker-backed Qdrant
23
+ - stdio MCP server for local agent attachment
24
+
25
+ ## Quickstart
26
+
27
+ Install `ownsearch` globally:
28
+
29
+ ```bash
30
+ npm install -g @grumppie/ownsearch
31
+ ```
32
+
33
+ Set it up, index a folder, and start searching:
34
+
35
+ ```bash
36
+ ownsearch setup
37
+ ownsearch doctor
38
+ ownsearch index ./docs --name docs
39
+ ownsearch list-roots
40
+ ownsearch search "what is this repo about?" --limit 5
41
+ ownsearch search-context "what is this repo about?" --limit 8 --max-chars 12000
42
+ ownsearch serve-mcp
43
+ ```
44
+
45
+ On first run, `ownsearch setup` can prompt for `GEMINI_API_KEY` and save it to `~/.ownsearch/.env`, which is then reused automatically by later CLI and MCP runs.
46
+
47
+ The installed binary remains `ownsearch`, so the scoped package name only affects installation and `npx` usage.
48
+
49
+ To connect `ownsearch` to a supported agent, print a config snippet for your client:
50
+
51
+ ```bash
52
+ ownsearch print-agent-config codex
53
+ ownsearch print-agent-config claude-desktop
54
+ ownsearch print-agent-config cursor
55
+ ```
56
+
57
+ ## Local development
58
+
59
+ If you want to run `ownsearch` from source while developing locally:
60
+
61
+ ```bash
62
+ npm install
63
+ npm run build
64
+ node dist/cli.js setup
65
+ node dist/cli.js index ./docs --name docs
66
+ node dist/cli.js search "what is this repo about?" --limit 5
67
+ node dist/cli.js serve-mcp
68
+ ```
69
+
70
+ ## CLI commands
71
+
72
+ - `ownsearch setup`
73
+ Starts or reconnects to the local Qdrant Docker container, creates local config, and can save `GEMINI_API_KEY` into `~/.ownsearch/.env`.
74
+ - `ownsearch doctor`
75
+ Checks config, Gemini key presence, Qdrant connectivity, and active collection settings.
76
+ - `ownsearch index <folder> --name <name>`
77
+ Indexes a folder incrementally into the local vector collection.
78
+ - `ownsearch list-roots`
79
+ Lists approved indexed roots.
80
+ - `ownsearch search "<query>"`
81
+ Returns ranked search hits from the vector store.
82
+ - `ownsearch search-context "<query>"`
83
+ Returns a compact grounded context bundle for agents.
84
+ - `ownsearch delete-root <rootId>`
85
+ Removes a root from config and deletes its vectors from Qdrant.
86
+ - `ownsearch store-status`
87
+ Shows collection status and vector configuration.
88
+ - `ownsearch serve-mcp`
89
+ Starts the stdio MCP server.
90
+ - `ownsearch print-agent-config <agent>`
91
+ Prints an MCP config snippet for supported agents.
92
+
93
+ ## MCP tools
94
+
95
+ The MCP server currently exposes:
96
+
97
+ - `index_path`
98
+ - `search`
99
+ - `search_context`
100
+ - `get_chunks`
101
+ - `list_roots`
102
+ - `delete_root`
103
+ - `store_status`
104
+
105
+ Recommended agent flow:
106
+
107
+ 1. Call `search_context` for fast grounded retrieval.
108
+ 2. If more precision is needed, call `search`.
109
+ 3. Use `get_chunks` on selected hit IDs for exact source text.
110
+
111
+ ## Notes
112
+
113
+ - Config is stored in `~/.ownsearch/config.json`
114
+ - Shared CLI and MCP secrets can be stored in `~/.ownsearch/.env`
115
+ - Qdrant runs locally in Docker as `ownsearch-qdrant`
116
+ - `GEMINI_API_KEY` may come from the shell environment, the current working directory `.env`, or `~/.ownsearch/.env`
117
+ - Node.js `20+` is required
118
+
119
+ ## Roadmap
120
+
121
+ Planned after the text-first v1:
122
+
123
+ - richer document extraction
124
+ - better reranking and deduplication
125
+ - watch mode for automatic reindexing
126
+ - HTTP MCP transport
127
+ - multimodal indexing and search for:
128
+ - images
129
+ - audio
130
+ - video
131
+ - richer document formats
132
+
133
+ The multimodal phase will require careful collection migration because Gemini text and multimodal embedding spaces are not interchangeable across model families.
134
+
135
+ ## License
136
+
137
+ MIT