{"id":51162934,"url":"https://github.com/docmd-io/docmd-search","last_synced_at":"2026-06-26T16:00:31.512Z","repository":{"id":361589776,"uuid":"1219752550","full_name":"docmd-io/docmd-search","owner":"docmd-io","description":"Offline semantic search engine that runs anywhere.","archived":false,"fork":false,"pushed_at":"2026-05-31T10:26:42.000Z","size":179,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T12:13:32.589Z","etag":null,"topics":["api","docmd","multi-language-support","offline-first","rust","search-engine","semantic-search","typescript"],"latest_commit_sha":null,"homepage":"https://docmd.io/search","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docmd-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"mgks","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2026-04-24T07:25:09.000Z","updated_at":"2026-05-31T10:26:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/docmd-io/docmd-search","commit_stats":null,"previous_names":["docmd-io/docmd-search"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/docmd-io/docmd-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docmd-io%2Fdocmd-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docmd-io%2Fdocmd-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docmd-io%2Fdocmd-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docmd-io%2Fdocmd-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docmd-io","download_url":"https://codeload.github.com/docmd-io/docmd-search/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docmd-io%2Fdocmd-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34823788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","docmd","multi-language-support","offline-first","rust","search-engine","semantic-search","typescript"],"created_at":"2026-06-26T16:00:18.130Z","updated_at":"2026-06-26T16:00:31.501Z","avatar_url":"https://github.com/docmd-io.png","language":"TypeScript","funding_links":["https://github.com/sponsors/mgks"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003c!-- PROJECT TITLE --\u003e\n  \u003ch3\u003e\n    \u003ca href=\"https://docmd.io/search\"\u003e\n      docmd-search\n    \u003c/a\u003e\n  \u003c/h3\u003e\n  \n  \u003c!-- ONE LINE SUMMARY --\u003e\n  \u003cp\u003e\n    \u003cb\u003eOffline semantic search engine for documentation.\u003c/b\u003e\n    \u003cbr/\u003e\n    Local embeddings, browser-ready indexes.\n  \u003c/p\u003e\n  \n  \u003c!-- BADGES --\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://www.npmjs.com/package/docmd-search\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/docmd-search.svg?style=flat-square\u0026color=CB3837\" alt=\"npm version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/docmd-search?activeTab=versions\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/docmd-search.svg?style=flat-square\u0026color=38bd24\" alt=\"downloads\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/docmd-io/docmd-search\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/docmd-io/docmd-search?style=flat-square\u0026logo=github\" alt=\"stars\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/docmd-io/docmd-search/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/docmd-io/docmd-search.svg?style=flat-square\u0026color=A31F34\" alt=\"license\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#\"\u003e\u003cimg width=\"860\" alt=\"docmd-search preview\" src=\"https://github.com/user-attachments/assets/5064ccf7-462b-4905-b05b-2a4079241818\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n  \u003c!-- MENU --\u003e\n  \u003cp\u003e\n    \u003ch4\u003e\n      \u003ca href=\"https://docmd.io/search/\"\u003eWebsite\u003c/a\u003e • \n      \u003ca href=\"https://docs.docmd.io/search/\"\u003eDocumentation\u003c/a\u003e • \n      \u003ca href=\"https://github.com/docmd-io/docmd-search/issues\"\u003eReport Bug\u003c/a\u003e\n    \u003c/h4\u003e\n  \u003c/p\u003e\n\n\u003c/div\u003e\n\n## Quick Start\n\n**Run docmd-search instantly on any folder:**\n\n```bash\nnpx docmd-search ./docs\n```\n\n**That's it.**\n\n- Files are discovered and chunked automatically\n- Embeddings are generated locally (no cloud API)\n- Search is available in the terminal immediately\n\n### Install for regular usage\n\n```bash\nnpm install -g docmd-search\n```\n\n```bash\n# Install ML dependencies (one-time)\nnpm install -g @huggingface/transformers onnxruntime-node\n```\n\n```bash\ndocmd-search ./docs          # index + interactive search\ndocmd-search ./docs --ui     # index + web UI\ndocmd-search --settings      # configure model\n```\n\n## Features\n\nDesigned to work offline, ship nothing to the browser, and stay out of your way.\n\n### Offline by default\n\n* All embeddings generated locally with ONNX Runtime\n* No data leaves your machine\n* No cloud API keys needed\n\n### Instant search\n\n* Progressive indexing: search available from the first batch\n* Incremental: only re-indexes changed files\n* Resumable: interrupted indexing resumes from last checkpoint\n\n### Tiny client\n\n* Browser runtime is **\u003c3KB gzipped**\n* No model weights in the browser\n* Hybrid scoring: keyword matching + vector similarity\n\n### Built-in capabilities\n\n* Multi-batch index format with automatic compression\n* Navigation tree generation for web UIs\n* First-run setup wizard with model selection\n* Interactive terminal search with live results\n\n## How It Works\n\n```\nBuild time (Node.js)                    Search time (Browser, \u003c3KB)\n───────────────────                     ──────────────────────────\n Crawl files                             Load manifest.json\n   → Chunk by heading                      → Load batch 000 (instant)\n     → Embed via ONNX                        → Background-load rest\n       → Quantize Float32 → Int8               → Keyword + cosine\n         → Compress (ternary/PQ)                 → Ranked results\n           → Save multi-batch index\n```\n\n## Models\n\nFirst run prompts you to select an embedding model:\n\n| Model | Dimensions | Size | Best for |\n| :---- | :--------- | :--- | :------- |\n| **MiniLM L6 v2** ★ | 384 | ~30 MB | Fast, general purpose |\n| BGE Small (English) | 384 | ~45 MB | English-optimised |\n| BGE Base (English) | 768 | ~110 MB | Higher quality |\n| MPNet Base v2 | 768 | ~110 MB | Multilingual |\n\nChange model later: `docmd-search --settings`\n\n## Configuration (optional)\n\nNo configuration is required to get started.\n\n**Global** (`~/.docmd-search/config.json`):\n```json\n{\n  \"model\": \"Xenova/all-MiniLM-L6-v2\",\n  \"wizardCompleted\": true\n}\n```\n\n**Per-project** (`.docmd-search/config.json`):\n```json\n{\n  \"model\": \"Xenova/bge-small-en-v1.5\",\n  \"chunkSize\": 512,\n  \"include\": [\"**/*.md\"],\n  \"exclude\": [\"**/drafts/**\"]\n}\n```\n\nConfig resolution: defaults → global → project → CLI flags.\n\n## Programmatic Usage\n\nUse in scripts or CI pipelines:\n\n```js\nimport { indexDirectory, loadAllBatches } from 'docmd-search';\n\nconst index = await indexDirectory({\n  rootDir: './docs',\n  outDir: '.docmd-search',\n});\n```\n\nBrowser client:\n\n```js\nimport { load, search } from 'docmd-search/client';\n\nawait load('/path/to/.docmd-search');\nconst results = search('deploy kubernetes', 10);\n```\n\n## Project Structure\n\nKeeps the codebase flat and modular.\n\n```\nsrc/\n├── bin/docmd-search.ts   # CLI entry point\n├── client/index.ts       # Browser runtime (\u003c3KB)\n├── config.ts             # Config + model profiles\n├── index-io.ts           # Multi-batch format + compression\n├── index.ts              # Barrel exports\n├── indexer/\n│   ├── chunk.ts          # Heading-aware chunking\n│   ├── crawl.ts          # File discovery\n│   └── index.ts          # Progressive pipeline\n├── model.ts              # ONNX embedding manager\n├── tui.ts                # Terminal UI\n├── types.ts              # Core types\n└── ui/\n    └── launcher.ts       # Web UI via docmd\n```\n\n## Part of the docmd ecosystem\n\ndocmd-search works standalone with any documentation project. It also integrates with [docmd](https://docmd.io) as a semantic search plugin.\n\n| Tool | What it does |\n| :--- | :----------- |\n| [docmd](https://github.com/docmd-io/docmd) | Zero-config documentation generator |\n| **docmd-search** | Offline semantic search engine |\n\n## Community \u0026 Support\n\n* Contributions are welcome\n* If you find it useful, consider [sponsoring](https://github.com/sponsors/mgks) or starring the repo ⭐\n\n## License\n\nMIT License. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocmd-io%2Fdocmd-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocmd-io%2Fdocmd-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocmd-io%2Fdocmd-search/lists"}