{"id":46019127,"url":"https://github.com/robertld/libscope","last_synced_at":"2026-03-07T07:01:08.343Z","repository":{"id":341298225,"uuid":"1169567517","full_name":"RobertLD/libscope","owner":"RobertLD","description":"AI-powered knowledge base with MCP integration — query library docs, internal wikis, and topics with semantic search","archived":false,"fork":false,"pushed_at":"2026-03-06T03:48:08.000Z","size":989,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"development","last_synced_at":"2026-03-06T08:46:41.064Z","etag":null,"topics":["ai","context","document-store","llm","mcp","rag"],"latest_commit_sha":null,"homepage":"https://libscope.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobertLD.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"agents.md","dco":null,"cla":null}},"created_at":"2026-02-28T21:59:45.000Z","updated_at":"2026-03-06T03:36:17.000Z","dependencies_parsed_at":"2026-03-06T06:06:40.818Z","dependency_job_id":null,"html_url":"https://github.com/RobertLD/libscope","commit_stats":null,"previous_names":["robertld/libscope"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/RobertLD/libscope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLD%2Flibscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLD%2Flibscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLD%2Flibscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLD%2Flibscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobertLD","download_url":"https://codeload.github.com/RobertLD/libscope/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLD%2Flibscope/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai","context","document-store","llm","mcp","rag"],"created_at":"2026-03-01T02:17:29.110Z","updated_at":"2026-03-07T07:01:08.331Z","avatar_url":"https://github.com/RobertLD.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibScope\n\n[![npm version](https://img.shields.io/npm/v/libscope)](https://www.npmjs.com/package/libscope)\n[![CI](https://github.com/RobertLD/libscope/actions/workflows/ci.yml/badge.svg)](https://github.com/RobertLD/libscope/actions/workflows/ci.yml)\n[![License: Source Available](https://img.shields.io/badge/License-Source%20Available-orange.svg)](LICENSE)\n[![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org)\n[![Website](https://img.shields.io/badge/docs-libscope.com-blue)](https://libscope.com)\n\nLibScope is a local knowledge base that makes your documentation searchable by AI assistants. Point it at markdown files, URLs, or connect it to Obsidian/Notion/Confluence/Slack, and it chunks, embeds, and indexes everything into a local SQLite database. Your AI tools query it through [MCP](https://modelcontextprotocol.io/) (Model Context Protocol) or a REST API.\n\nEverything runs on your machine. No cloud services required for basic usage — just `npm install` and go.\n\n## Getting Started\n\n```bash\nnpm install -g libscope\n\n# Set up the database\nlibscope init\n\n# Index some docs\nlibscope add ./docs/getting-started.md --library my-lib\nlibscope add https://docs.example.com/guide\nlibscope import ./docs/ --library my-lib --extensions .md,.mdx\n\n# Search\nlibscope search \"how to authenticate\"\n\n# Start the MCP server so your AI assistant can query it\nlibscope serve\n```\n\nOn first run with the default embedding provider, LibScope downloads the [all-MiniLM-L6-v2](https://huggingface.co/Xenova/all-MiniLM-L6-v2) model (~80 MB). Subsequent runs use the cached model.\n\n### Document Format Support\n\nLibScope supports **Markdown** (`.md`, `.mdx`) and **plain text** natively. Additional formats are available via optional dependencies:\n\n| Format       | Extension | Optional Dependency | Node.js Requirement |\n| ------------ | --------- | ------------------- | ------------------- |\n| PDF          | `.pdf`    | `pdf-parse` (v2)    | ≥ 20.16 or ≥ 22.3   |\n| Word         | `.docx`   | `mammoth`           | Any                 |\n| EPUB         | `.epub`   | `epub2`             | Any                 |\n| PowerPoint   | `.pptx`   | `pizzip`            | Any                 |\n| CSV          | `.csv`    | Built-in            | Any                 |\n\nThe `pdf-parse`, `mammoth`, `epub2`, and `pizzip` packages are listed as `optionalDependencies` and install automatically when the Node.js version is compatible. Note: binary `.ppt` files are not supported — only `.pptx`.\n\n## Using with AI Assistants\n\nLibScope exposes an MCP server over stdio. Point your MCP-compatible client at it:\n\n**Cursor** — add to `~/.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"libscope\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"libscope\", \"serve\"]\n    }\n  }\n}\n```\n\n**Claude Code:**\n\n```bash\nclaude mcp add --scope user libscope -- npx -y libscope serve\n```\n\nOnce connected, your assistant can search docs, submit new documents, rate content quality, and ask RAG-powered questions against your knowledge base.\n\n\u003cdetails\u003e\n\u003csummary\u003eFull list of MCP tools\u003c/summary\u003e\n\n| Tool                   | What it does                                              |\n| ---------------------- | --------------------------------------------------------- |\n| `search-docs`          | Semantic search with topic/library/version/rating filters |\n| `ask-question`         | RAG question-answering with source citations              |\n| `get-document`         | Retrieve a document by ID                                 |\n| `list-documents`       | List docs with filters                                    |\n| `list-topics`          | Browse the topic hierarchy                                |\n| `submit-document`      | Index new content (raw text or a URL to fetch)            |\n| `update-document`      | Update a document's title, content, or metadata           |\n| `delete-document`      | Remove a document                                         |\n| `rate-document`        | Rate a doc 1–5 with optional feedback and corrections     |\n| `suggest-tags`         | Auto-suggest tags based on content analysis               |\n| `save-search`          | Save a named search query with filters                    |\n| `list-saved-searches`  | List all saved searches                                   |\n| `run-saved-search`     | Execute a saved search by name or ID                      |\n| `delete-saved-search`  | Delete a saved search                                     |\n| `link-documents`       | Create a cross-reference between two documents            |\n| `get-document-links`   | List all incoming and outgoing links for a document       |\n| `delete-link`          | Remove a cross-reference link                             |\n| `reindex-documents`    | Re-embed chunks (useful after switching providers)        |\n| `health-check`         | DB status, doc/chunk counts                               |\n| `sync-obsidian-vault`  | Sync an Obsidian vault                                    |\n| `sync-onenote`         | Sync OneNote notebooks via Microsoft Graph                |\n| `sync-notion`          | Sync Notion pages and databases                           |\n| `sync-confluence`      | Sync Confluence spaces                                    |\n| `sync-slack`           | Sync Slack channels and threads                           |\n| `install-pack`         | Install a knowledge pack                                  |\n| `list-packs`           | List installed or registry packs                          |\n\n\u003c/details\u003e\n\n## Connectors\n\nLibScope can pull documentation from several platforms. Each connector handles incremental syncing so re-runs only process what changed.\n\n```bash\n# Obsidian — parses wikilinks, frontmatter, embeds, tags\nlibscope connect obsidian /path/to/vault\nlibscope connect obsidian /path/to/vault --sync   # incremental re-sync\n\n# Notion\nlibscope connect notion --token secret_abc123\n\n# Confluence\nlibscope connect confluence \\\n  --url https://acme.atlassian.net \\\n  --email user@acme.com \\\n  --token $CONFLUENCE_TOKEN\n\n# Slack — index channel messages and threads\nlibscope connect slack --token xoxb-... --channels general,engineering\n\n# OneNote — device code auth via Microsoft Graph\nexport ONENOTE_CLIENT_ID=your-client-id\nlibscope connect onenote\n\n# GitHub / GitLab repos\nlibscope add-repo https://github.com/org/repo --branch main --path docs/\n\n# Remove a connector's data\nlibscope disconnect obsidian /path/to/vault\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eConnector options reference\u003c/summary\u003e\n\n**Obsidian:** `--topic-mapping frontmatter`, `--exclude \"templates/*\" \"daily/*\"`, `--sync`\n\n**Notion:** `--exclude page-id-1 db-id-2`, `--sync`\n\n**Confluence:** `--spaces ENG,DEVOPS`, `--exclude-spaces ARCHIVE`\n\n**Slack:** `--thread-mode aggregate|separate`, `--sync`\n\n**OneNote:** `--notebook \"Work Notes\"`, `--sync`\n\n**GitHub/GitLab:** `--token`, `--branch`, `--path`, `--extensions .md,.mdx,.rst`\n\n\u003c/details\u003e\n\n## Search and RAG\n\n```bash\n# Semantic search\nlibscope search \"authentication best practices\"\nlibscope search \"API rate limiting\" --library my-lib --topic security --limit 10\n\n# Ask questions (needs an LLM provider configured — see Configuration below)\nlibscope ask \"How do I configure OAuth2?\" --library my-lib\n\n# Interactive REPL for iterative searching\nlibscope repl\n```\n\nSearch uses sqlite-vec for vector similarity when available, with FTS5 full-text search as a fallback. Results automatically get a 1.5× title boost when the document title matches query words. You can also pass `--diversity 0.5` (0–1) for MMR-based diversity reranking.\n\n### Programmatic SDK\n\nLibScope also exports a `LibScope` class for use as a library:\n\n```ts\nimport { LibScope } from \"libscope\";\n\nconst scope = LibScope.create();\nawait scope.index({ title: \"My Doc\", content: \"...\" });\nconst results = await scope.search(\"query\");\nscope.close();\n```\n\nSee the [Programmatic Usage](/guide/programmatic-usage) guide for details on the SDK, batch search, and document TTL/expiry.\n\n## Organizing Content\n\n**Topics** give your docs a hierarchy. **Tags** give them flexible labels. **Workspaces** give you isolated databases.\n\n```bash\n# Topics\nlibscope topics create \"backend\"\nlibscope topics create \"auth\" --parent backend --description \"Auth \u0026 identity\"\n\n# Tags\nlibscope tag add \u003cdoc-id\u003e typescript,api,v2\n\n# Workspaces — separate knowledge bases entirely\nlibscope workspace create my-project\nlibscope workspace use my-project\nlibscope --workspace my-project search \"deploy steps\"\n```\n\nDocuments also keep version history, so you can roll back if a re-index goes wrong:\n\n```bash\nlibscope docs history \u003cdoc-id\u003e\nlibscope docs rollback \u003cdoc-id\u003e 3\n```\n\n## REST API\n\nFor programmatic access outside of MCP:\n\n```bash\nlibscope serve --api --port 3378\n```\n\nOpenAPI 3.0 spec at `GET /openapi.json`. Key endpoints:\n\n| Method          | Endpoint                          | Description                        |\n| --------------- | --------------------------------- | ---------------------------------- |\n| `GET`           | `/api/v1/search?q=...`            | Semantic search                    |\n| `POST`          | `/api/v1/batch-search`            | Batch search (up to 20 queries)    |\n| `POST`          | `/api/v1/ask`                     | RAG question-answering             |\n| `GET/POST`      | `/api/v1/documents`               | List or create documents           |\n| `GET/PATCH/DELETE` | `/api/v1/documents/:id`        | Get, update, or delete a document  |\n| `POST`          | `/api/v1/documents/url`           | Index from a URL                   |\n| `POST`          | `/api/v1/documents/:id/tags`      | Add tags                           |\n| `GET`           | `/api/v1/documents/:id/suggest-tags` | Auto-suggest tags               |\n| `GET/POST`      | `/api/v1/documents/:id/links`     | List or create cross-references    |\n| `DELETE`        | `/api/v1/links/:id`               | Delete a cross-reference           |\n| `GET/POST`      | `/api/v1/topics`                  | List or create topics              |\n| `GET`           | `/api/v1/tags`                    | List tags                          |\n| `GET/POST`      | `/api/v1/searches`                | List or create saved searches      |\n| `POST`          | `/api/v1/searches/:id/run`        | Run a saved search                 |\n| `DELETE`        | `/api/v1/searches/:id`            | Delete a saved search              |\n| `POST`          | `/api/v1/bulk/delete`             | Bulk delete documents              |\n| `POST`          | `/api/v1/bulk/retag`              | Bulk add/remove tags               |\n| `POST`          | `/api/v1/bulk/move`               | Bulk move to a topic               |\n| `GET/POST`      | `/api/v1/webhooks`                | List or create webhooks            |\n| `DELETE`        | `/api/v1/webhooks/:id`            | Delete a webhook                   |\n| `POST`          | `/api/v1/webhooks/:id/test`       | Send a test ping to a webhook      |\n| `GET`           | `/api/v1/analytics/searches`      | Search analytics and knowledge gaps|\n| `GET`           | `/api/v1/connectors/status`       | Connector sync status and history  |\n| `GET`           | `/api/v1/stats`                   | Usage statistics                   |\n| `GET`           | `/api/v1/health`                  | Health check                       |\n\n## Configuration\n\nLibScope reads config from (highest priority first): **environment variables** → **`.libscope.json`** in your project → **`~/.libscope/config.json`** → built-in defaults.\n\n### Embedding Providers\n\n| Provider | Default? | Requirements                              | Model                  |\n| -------- | -------- | ----------------------------------------- | ---------------------- |\n| `local`  | Yes      | None (~80 MB model download on first run) | all-MiniLM-L6-v2       |\n| `ollama` |          | Ollama running locally                    | nomic-embed-text       |\n| `openai` |          | `LIBSCOPE_OPENAI_API_KEY`                 | text-embedding-3-small |\n\n```bash\nlibscope config set embedding.provider ollama\n# or\nexport LIBSCOPE_EMBEDDING_PROVIDER=openai\nexport LIBSCOPE_OPENAI_API_KEY=sk-...\n```\n\n### LLM for RAG\n\nThe `ask` command and `ask-question` MCP tool need an LLM. Configure one with:\n\n```bash\nexport LIBSCOPE_LLM_PROVIDER=openai   # or ollama, anthropic\nexport LIBSCOPE_LLM_MODEL=gpt-4o-mini # optional\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eAll environment variables\u003c/summary\u003e\n\n| Variable                           | Description                              | Default                  |\n| ---------------------------------- | ---------------------------------------- | ------------------------ |\n| `LIBSCOPE_EMBEDDING_PROVIDER`      | `local`, `ollama`, or `openai`           | `local`                  |\n| `LIBSCOPE_OPENAI_API_KEY`          | OpenAI API key                           | —                        |\n| `LIBSCOPE_OLLAMA_URL`              | Ollama server URL                        | `http://localhost:11434` |\n| `LIBSCOPE_LLM_PROVIDER`            | LLM for RAG (`openai` / `ollama` / `anthropic`) | —                |\n| `LIBSCOPE_LLM_MODEL`               | LLM model override                       | —                        |\n| `LIBSCOPE_ANTHROPIC_API_KEY`       | Anthropic API key (for Claude models)    | —                        |\n| `LIBSCOPE_ALLOW_PRIVATE_URLS`      | Allow fetching from private/internal IPs | `false`                  |\n| `LIBSCOPE_ALLOW_SELF_SIGNED_CERTS` | Accept self-signed TLS certificates      | `false`                  |\n| `ONENOTE_CLIENT_ID`                | Microsoft app registration client ID     | —                        |\n| `ONENOTE_TENANT_ID`                | Microsoft tenant ID                      | `common`                 |\n| `NOTION_TOKEN`                     | Notion integration token                 | —                        |\n| `CONFLUENCE_URL`                   | Confluence base URL                      | —                        |\n| `CONFLUENCE_EMAIL`                 | Confluence user email                    | —                        |\n| `CONFLUENCE_TOKEN`                 | Confluence API token                     | —                        |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eExample config file (~/.libscope/config.json)\u003c/summary\u003e\n\n```json\n{\n  \"embedding\": {\n    \"provider\": \"local\",\n    \"ollamaUrl\": \"http://localhost:11434\",\n    \"ollamaModel\": \"nomic-embed-text\",\n    \"openaiModel\": \"text-embedding-3-small\"\n  },\n  \"llm\": {\n    \"provider\": \"openai\",\n    \"model\": \"gpt-4o-mini\",\n    \"anthropicApiKey\": \"sk-ant-...\"\n  },\n  \"database\": {\n    \"path\": \"~/.libscope/libscope.db\"\n  },\n  \"logging\": {\n    \"level\": \"info\"\n  },\n  \"indexing\": {\n    \"allowPrivateUrls\": false,\n    \"allowSelfSignedCerts\": false\n  }\n}\n```\n\n\u003c/details\u003e\n\n### Corporate / Internal Networks\n\nIf you're indexing docs from internal servers (Confluence, wikis, etc.), you may need:\n\n```bash\n# Allow fetching from private/internal IP addresses\nlibscope config set indexing.allowPrivateUrls true\n\n# Accept self-signed or corporate TLS certificates\nlibscope config set indexing.allowSelfSignedCerts true\n```\n\nOr via environment variables:\n\n```bash\nexport LIBSCOPE_ALLOW_PRIVATE_URLS=true\nexport LIBSCOPE_ALLOW_SELF_SIGNED_CERTS=true\n```\n\n## Webhooks\n\nLibScope can push events to any HTTP endpoint. Useful for triggering CI pipelines, Slack notifications, or custom workflows whenever documents are created or updated.\n\n```bash\nlibscope serve --api  # webhooks require the REST API\n```\n\n```bash\n# Create a webhook\ncurl -X POST http://localhost:3378/api/v1/webhooks \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://hooks.example.com/libscope\", \"events\": [\"document.created\", \"document.updated\"], \"secret\": \"my-hmac-secret\"}'\n\n# Send a test ping\ncurl -X POST http://localhost:3378/api/v1/webhooks/\u003cid\u003e/test\n```\n\nWebhook payloads are signed with HMAC-SHA256 when a secret is set. The signature is in the `X-LibScope-Signature` header.\n\nSupported events: `document.created`, `document.updated`, `document.deleted`.\n\n## Other Tools\n\nLibScope ships with a few more utilities beyond the core index-and-search loop:\n\n```bash\n# Watch a directory and auto-reindex on changes\nlibscope watch ./docs/\n\n# Re-embed everything after switching embedding providers\nlibscope reindex\n\n# Find duplicate documents\nlibscope dedupe\n\n# Export / import the whole knowledge base\nlibscope export ./backup.json\nlibscope import-backup ./backup.json\n\n# Usage analytics\nlibscope stats                  # overview\nlibscope stats popular          # most-searched docs\nlibscope stats stale --days 90  # docs nobody searches for\n\n# Knowledge packs — portable document bundles\nlibscope pack create --name \"react-docs\" --topic react\nlibscope pack install ./react-docs.json\n```\n\nThere's also a web dashboard at `http://localhost:3377` when you run `libscope serve`, with search, document browsing, topic navigation, and a knowledge graph visualization at `/graph`.\n\n\u003cdetails\u003e\n\u003csummary\u003eFull CLI reference\u003c/summary\u003e\n\n**Core**\n\n| Command                             | Description                         |\n| ----------------------------------- | ----------------------------------- |\n| `libscope init`                     | Initialize the database             |\n| `libscope add \u003cfileOrUrl\u003e`          | Index a file or URL                 |\n| `libscope import \u003cdirectory\u003e`       | Bulk import from a directory        |\n| `libscope import-batch \u003cdirectory\u003e` | Parallel batch import               |\n| `libscope search \u003cquery\u003e`           | Search                              |\n| `libscope ask \u003cquestion\u003e`           | RAG question-answering              |\n| `libscope repl`                     | Interactive search REPL             |\n| `libscope serve`                    | Start MCP server (`--api` for REST) |\n\n**Documents**\n\n| Command                                 | Description                  |\n| --------------------------------------- | ---------------------------- |\n| `libscope docs list`                    | List documents               |\n| `libscope docs show \u003cid\u003e`               | Show a document              |\n| `libscope docs update \u003cid\u003e`             | Update title/content/metadata|\n| `libscope docs delete \u003cid\u003e`             | Delete a document            |\n| `libscope docs history \u003cid\u003e`            | Version history              |\n| `libscope docs rollback \u003cid\u003e \u003cver\u003e`     | Roll back to a prior version |\n\n**Organization**\n\n| Command                              | Description                      |\n| ------------------------------------ | -------------------------------- |\n| `libscope topics list`               | List topics                      |\n| `libscope topics create \u003cname\u003e`      | Create a topic                   |\n| `libscope tag add \u003cid\u003e \u003ctags...\u003e`    | Add tags                         |\n| `libscope tag remove \u003cid\u003e \u003ctag\u003e`     | Remove a tag                     |\n| `libscope tag list`                  | List tags                        |\n| `libscope workspace create \u003cname\u003e`   | Create workspace                 |\n| `libscope workspace list`            | List workspaces                  |\n| `libscope workspace use \u003cname\u003e`      | Switch workspace                 |\n| `libscope workspace delete \u003cname\u003e`   | Delete workspace                 |\n\n**Saved Searches**\n\n| Command                              | Description                   |\n| ------------------------------------ | ----------------------------- |\n| `libscope searches list`             | List all saved searches       |\n| `libscope searches run \u003cname\u003e`       | Re-run a saved search         |\n| `libscope searches delete \u003cname\u003e`    | Delete a saved search         |\n| `libscope search \u003cq\u003e --save \u003cname\u003e`  | Save a search while running it|\n\n**Document Links**\n\n| Command                               | Description                      |\n| ------------------------------------- | -------------------------------- |\n| `libscope link \u003csrcId\u003e \u003ctgtId\u003e`       | Create a cross-reference         |\n| `libscope links \u003cdocId\u003e`              | Show all links for a document    |\n| `libscope unlink \u003clinkId\u003e`            | Remove a link                    |\n| `libscope prereqs \u003cdocId\u003e`            | Show prerequisite reading chain  |\n\n**Bulk Operations**\n\n| Command                      | Description                         |\n| ---------------------------- | ----------------------------------- |\n| `libscope bulk delete`       | Delete all matching documents       |\n| `libscope bulk retag`        | Add/remove tags on matching docs    |\n| `libscope bulk move`         | Move matching docs to a topic       |\n\n**Connectors**\n\n| Command                            | Description                |\n| ---------------------------------- | -------------------------- |\n| `libscope connect obsidian \u003cpath\u003e` | Sync Obsidian vault        |\n| `libscope connect onenote`         | Sync OneNote               |\n| `libscope connect notion`          | Sync Notion                |\n| `libscope connect confluence`      | Sync Confluence            |\n| `libscope connect slack`           | Sync Slack                 |\n| `libscope add-repo \u003curl\u003e`          | Index a GitHub/GitLab repo |\n| `libscope disconnect \u003cname\u003e`       | Remove connector data      |\n\n**Utilities**\n\n| Command                           | Description                  |\n| --------------------------------- | ---------------------------- |\n| `libscope watch \u003cdir\u003e`            | Auto-reindex on file changes |\n| `libscope reindex`                | Re-embed all chunks          |\n| `libscope dedupe`                 | Find duplicates              |\n| `libscope export \u003cpath\u003e`          | Export to JSON               |\n| `libscope import-backup \u003cpath\u003e`   | Import from backup           |\n| `libscope stats`                  | Usage overview               |\n| `libscope pack install \u003cname\u003e`    | Install a knowledge pack     |\n| `libscope pack create`            | Create a knowledge pack      |\n| `libscope config set \u003ckey\u003e \u003cval\u003e` | Set config                   |\n| `libscope config show`            | Show config                  |\n\n**Global flags:** `--verbose`, `--log-level \u003clevel\u003e`, `--workspace \u003cname\u003e`\n\n\u003c/details\u003e\n\n## How It Works\n\nLibScope stores everything in a local SQLite database (at `~/.libscope/libscope.db` by default):\n\n- Documents are split into chunks by heading boundaries\n- Each chunk is embedded into a vector using the configured provider\n- Vector search is done via [sqlite-vec](https://github.com/asg017/sqlite-vec); FTS5 full-text search is used as a fallback\n- The MCP server reads from this same database over stdio\n- Connectors fetch content from external platforms and feed it through the same indexing pipeline\n\nThe stack: [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) + [sqlite-vec](https://github.com/asg017/sqlite-vec) + [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) + [@xenova/transformers](https://github.com/xenova/transformers.js) for local embeddings.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). The short version:\n\n```bash\ngit clone https://github.com/RobertLD/libscope.git\ncd libscope \u0026\u0026 npm install\nnpm run dev        # watch mode\nnpm test           # run tests\nnpm run typecheck  # type check\nnpm run lint       # lint\n```\n\n## License\n\n[Business Source License 1.1](LICENSE) — see [LICENSE](LICENSE) for full terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertld%2Flibscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertld%2Flibscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertld%2Flibscope/lists"}