The qmd bin was a custom bash script that discovered node via hardcoded fallback paths (mise, asdf, nvm, homebrew). This was nonstandard and caused ABI mismatches when installed via bun (native modules compiled for bun but executed with node). Now uses the standard npm bin convention: dist/qmd.js with a node shebang, added by the build script. The isMain guard resolves symlinks so it works when npm/bun create symlinked bin entries. Also converts all dynamic require() calls in tests to ESM imports, and adds container-based smoke tests (test/smoke-install.sh) that verify install + run under both node and bun via mise in a Debian container.
85 lines
2.2 KiB
JSON
85 lines
2.2 KiB
JSON
{
|
|
"name": "@tobilu/qmd",
|
|
"version": "1.0.8",
|
|
"description": "Query Markup Documents - On-device hybrid search for markdown files with BM25, vector search, and LLM reranking",
|
|
"type": "module",
|
|
"bin": {
|
|
"qmd": "dist/qmd.js"
|
|
},
|
|
"files": [
|
|
"dist/",
|
|
"LICENSE",
|
|
"CHANGELOG.md"
|
|
],
|
|
"scripts": {
|
|
"prepare": "[ -d .git ] && ./scripts/install-hooks.sh || true",
|
|
"build": "tsc -p tsconfig.build.json && printf '#!/usr/bin/env node\n' | cat - dist/qmd.js > dist/qmd.tmp && mv dist/qmd.tmp dist/qmd.js && chmod +x dist/qmd.js",
|
|
"test": "vitest run --reporter=verbose test/",
|
|
"qmd": "tsx src/qmd.ts",
|
|
"index": "tsx src/qmd.ts index",
|
|
"vector": "tsx src/qmd.ts vector",
|
|
"search": "tsx src/qmd.ts search",
|
|
"vsearch": "tsx src/qmd.ts vsearch",
|
|
"rerank": "tsx src/qmd.ts rerank",
|
|
"inspector": "npx @modelcontextprotocol/inspector tsx src/qmd.ts mcp",
|
|
"release": "./scripts/release.sh"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/tobi/qmd.git"
|
|
},
|
|
"homepage": "https://github.com/tobi/qmd#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/tobi/qmd/issues"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
"better-sqlite3": "^11.0.0",
|
|
"fast-glob": "^3.3.0",
|
|
"node-llama-cpp": "^3.14.5",
|
|
"picomatch": "^4.0.0",
|
|
"sqlite-vec": "^0.1.7-alpha.2",
|
|
"yaml": "^2.8.2",
|
|
"zod": "^4.2.1"
|
|
},
|
|
"optionalDependencies": {
|
|
"sqlite-vec-darwin-arm64": "^0.1.7-alpha.2",
|
|
"sqlite-vec-darwin-x64": "^0.1.7-alpha.2",
|
|
"sqlite-vec-linux-x64": "^0.1.7-alpha.2",
|
|
"sqlite-vec-win32-x64": "^0.1.7-alpha.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "^7.6.0",
|
|
"tsx": "^4.0.0",
|
|
"vitest": "^3.0.0"
|
|
},
|
|
"peerDependencies": {
|
|
"typescript": "^5.9.3"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.0.0"
|
|
},
|
|
"keywords": [
|
|
"markdown",
|
|
"search",
|
|
"fts",
|
|
"full-text-search",
|
|
"vector",
|
|
"semantic-search",
|
|
"sqlite",
|
|
"bm25",
|
|
"embeddings",
|
|
"rag",
|
|
"mcp",
|
|
"reranking",
|
|
"knowledge-base",
|
|
"local-ai",
|
|
"llm"
|
|
],
|
|
"author": "Tobi Lutke <tobi@lutke.com>",
|
|
"license": "MIT"
|
|
}
|