hnindex-cli
v0.6.2
Published
CLI to install vibe-hnindex MCP config for Claude, Cursor, Antigravity, Windsurf, VS Code — Windows, macOS, Linux
Maintainers
Readme
hnindex-cli
CLI to merge vibe-hnindex into your editor’s MCP JSON (Claude Code, Claude Desktop, Cursor, Antigravity, Windsurf, VS Code). Works on Windows, macOS, and Linux (Node.js ≥ 20).
Install
Global (recommended) — hnindex is on your PATH:
npm install -g hnindex-cliOne-off without global install:
npx hnindex-cli init --mcp antigravitynpm’s package page sidebar shows
npm i hnindex-cliby default; that installs locally in a project. For a globalhnindexcommand, usenpm install -g hnindex-clias above.
Verify:
hnindex version
hnindex helpWhat it does
hnindex init --mcp <target>— merges avibe-hnindexserver entry into the right MCP config file (creates parent folders if needed). Existing other MCP servers are not removed.hnindex update— runsnpm update -g hnindex-cli.hnindex version— prints the installedhnindex-cliversion.
After a successful init, restart the editor or reload MCP servers so the new config is picked up.
Prerequisites (for the MCP server itself)
hnindex-cli only writes JSON; vibe-hnindex needs Ollama (embeddings) and usually Qdrant for semantic search. See the repo Getting started.
hnindex init --mcp <target>
Targets (where the file is written)
| --mcp | Config file |
|--------|-------------|
| claude | .mcp.json in the current directory (Claude Code) |
| claude-desktop | Claude Desktop user config (OS-specific path) |
| antigravity | ~/.gemini/antigravity/mcp_config.json |
| cursor | Cursor global MCP file |
| cursor-project | .cursor/mcp.json under --cwd |
| windsurf | ~/.windsurf/mcp_config.json |
| vscode | .vscode/mcp.json under --cwd |
List all targets and paths:
hnindex init --listOptions
| Option | Description |
|--------|-------------|
| --mcp <name> | Required. One of the targets above. |
| --name <label> | JSON key for the server (default: vibe-hnindex). |
| --ollama-url <url> | Default: http://localhost:11434 |
| --ollama-model <name> | Default: bge-m3:567m |
| --embedding-dimensions <n> | Writes EMBEDDING_DIMENSIONS for vibe-hnindex (must match Ollama output for that model, e.g. 768). Re-running init merges env: if you omit this flag, a previous EMBEDDING_DIMENSIONS in the MCP file is kept. |
| --qdrant-url <url> | Default: http://localhost:6333 |
| --qdrant-api-key <key> | Optional; use with Qdrant Cloud. |
| --cwd <dir> | Base directory for project-scoped files (default: current directory). |
| --output <path> | Write to this file instead of the default for --mcp. |
| --dry-run | Print merged JSON to stdout; do not write files. |
Examples
Antigravity (default paths):
hnindex init --mcp antigravityClaude Code in a repo:
cd ~/projects/my-app
hnindex init --mcp claudeCursor project-scoped MCP (.cursor/mcp.json in this repo):
hnindex init --mcp cursor-project --cwd .VS Code Copilot MCP in this repo:
hnindex init --mcp vscode --cwd .Custom Ollama host:
hnindex init --mcp claude --ollama-url http://192.168.1.10:11434Qdrant Cloud:
hnindex init --mcp vscode --cwd . \
--qdrant-url "https://xxxx.us-east-1-0.aws.cloud.qdrant.io:6333" \
--qdrant-api-key "your-api-key"Preview JSON without writing:
hnindex init --mcp antigravity --dry-runCustom server key in JSON:
hnindex init --mcp cursor --name my-hnindexUpdate CLI
hnindex updateOr manually:
npm update -g hnindex-cliLinks
- Monorepo: github.com/AndyAnh174/vibe-hnindex — package path
packages/hnindex-cli - Full docs: Getting started → CLI
- Integrations (paths per OS): integrations.md
License
MIT
