[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82993":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":13,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":29,"discoverSource":30},82993,"oikb","open-webui\u002Foikb","open-webui","Sync anything to Open WebUI Knowledge Bases","",null,"Python",101,13,2,23,0,1,30,35,63.94,"MIT License",false,"main",true,[7],"2026-06-12 04:01:39","# 📚 oikb\n\nKeep your [Open WebUI](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-webui) Knowledge Bases in sync. Point it at a local directory, a GitHub repo, a Confluence space, an S3 bucket, or any of 44 supported sources. Only new and modified files are uploaded via incremental SHA-256 diffing.\n\n> [!IMPORTANT]\n> Requires **Open WebUI 0.9.6+**\n\n## Quick Start\n\n```bash\npip install oikb\n\nexport OPEN_WEBUI_URL=http:\u002F\u002Flocalhost:3000\nexport OPEN_WEBUI_API_KEY=sk-your-api-key\n\n# Sync a directory\noikb sync .\u002Fdocs --kb-id your-kb-id\n\n# Sync a GitHub repo\noikb sync github:owner\u002Frepo --kb-id your-kb-id\n\n# Preview first (no upload)\noikb sync .\u002Fdocs --kb-id your-kb-id --dry-run\n```\n\nFor multi-source, scheduled sync, or daemon mode — run `oikb init` to generate a `.oikb.yaml` config file, then `oikb daemon`.\n\n📖 **[Full Guide](docs\u002Fguide.md)** — installation, connectors, daemon, enterprise features, deployment, troubleshooting.\n\n## Commands\n\n| Command | Description |\n|---|---|\n| `oikb init` | Generate `.oikb.yaml` interactively |\n| `oikb sync \u003Csource>` | Incremental sync to a Knowledge Base |\n| `oikb watch \u003Cdir>` | Watch for changes and auto-sync |\n| `oikb daemon` | Long-lived scheduler with HTTP API |\n| `oikb diff \u003Csource>` | Preview what a sync would do |\n| `oikb validate` | Validate `.oikb.yaml` without running |\n| `oikb history` | View sync history |\n| `oikb ls` | List files in a Knowledge Base |\n| `oikb status` | Show KB info and file count |\n| `oikb reset` | Delete all files in a Knowledge Base |\n| `oikb config` | Manage saved URL and API key |\n\n## Daemon\n\nRun `oikb daemon` for production deployments. Reads `.oikb.yaml` and syncs each source on a schedule.\n\n```bash\noikb daemon --port 8080\n```\n\nFeatures:\n- **Scheduled sync** — simple intervals (`30m`, `1h`) or cron expressions (`0 6 * * 1-5`)\n- **Webhooks** — instant sync on push via `\u002Fwebhooks\u002Fgithub`, `\u002Fwebhooks\u002Fgitlab`, `\u002Fwebhooks\u002Fslack`, `\u002Fwebhooks\u002Fconfluence`\n- **Health checks** — `GET \u002Fhealth` for Docker\u002FK8s readiness probes\n- **Prometheus metrics** — `GET \u002Fmetrics` exports sync counters, duration histograms, and error rates\n- **Sync history** — `GET \u002Fhistory` queryable log of all syncs\n- **On-demand sync** — `POST \u002Fsync\u002F{identifier}` trigger by `name` or `kb-id`\n- **Failure notifications** — webhook POST on sync errors, compatible with Slack, PagerDuty, Opsgenie\n- **API key auth** — set `OIKB_API_KEY` to secure endpoints (Docker secrets `_FILE` supported)\n- **OpenAPI tool server** — add `http:\u002F\u002Foikb:8080` as a Tool Server in Open WebUI (Settings → Connections) and let the LLM trigger syncs, check status, and query history\n\n```yaml\n# .oikb.yaml\ndefaults:\n  interval: 1h\n  concurrency: 4\n  filter:\n    max-size: 50mb\n  notify:\n    url: https:\u002F\u002Fhooks.slack.com\u002Fservices\u002FT...\u002FB...\u002Fxxx\n    on: error\n\nsources:\n  - name: wiki\n    source: github:owner\u002Frepo\n    kb-id: 8f3a2b1c-...\n    webhook: true\n\n  - name: handbook\n    source: confluence:ENG\n    kb-id: 4e7d9a0f-...\n    interval: \"0 6 * * 1-5\"   # overrides default\n```\n\n```bash\noikb sync --name wiki          # CLI: sync a specific entry\ncurl -X POST \u002Fsync\u002Fwiki        # API: trigger by name\ncurl -X POST \u002Fsync\u002F8f3a2b1c-.. # API: trigger by kb-id\n```\n\n### Docker\n\n```bash\ndocker run -d \\\n  -e OPEN_WEBUI_URL=http:\u002F\u002Fopen-webui:8080 \\\n  -e OPEN_WEBUI_API_KEY=sk-... \\\n  -e OIKB_API_KEY=your-daemon-key \\\n  -e LOG_FORMAT=json \\\n  -v .\u002F.oikb.yaml:\u002Fapp\u002F.oikb.yaml:ro \\\n  -p 8080:8080 \\\n  ghcr.io\u002Fopen-webui\u002Foikb:latest daemon\n```\n\n### Docker Compose\n\n```yaml\nservices:\n  open-webui:\n    image: ghcr.io\u002Fopen-webui\u002Fopen-webui:main\n    ports:\n      - \"3000:8080\"\n\n  oikb:\n    image: ghcr.io\u002Fopen-webui\u002Foikb:latest\n    environment:\n      - OPEN_WEBUI_URL=http:\u002F\u002Fopen-webui:8080\n      - OPEN_WEBUI_API_KEY=${OPEN_WEBUI_API_KEY}\n      - OIKB_API_KEY=${OIKB_API_KEY}\n      - LOG_FORMAT=json\n    volumes:\n      - .\u002F.oikb.yaml:\u002Fapp\u002F.oikb.yaml:ro\n    command: daemon\n    ports:\n      - \"8080:8080\"\n    depends_on:\n      - open-webui\n    restart: unless-stopped\n    healthcheck:\n      test: [\"CMD\", \"curl\", \"-f\", \"http:\u002F\u002Flocalhost:8080\u002Fhealth\u002Fready\"]\n      interval: 30s\n      timeout: 5s\n```\n\n## 44 Connectors\n\n| Category | Sources |\n|---|---|\n| **Code Repos** | GitHub, GitLab, Bitbucket |\n| **Cloud Storage** | S3, GCS, Azure Blob, Dropbox, R2, Google Drive, SharePoint, Egnyte, Oracle Cloud |\n| **Wikis & KBs** | Confluence, Notion, BookStack, Discourse, GitBook, Guru, Outline, Slab, Document360, DokuWiki, Google Sites |\n| **Ticketing** | Jira, Linear, Zendesk, Freshdesk, Asana, ClickUp, Airtable, ServiceNow, ProductBoard |\n| **Messaging** | Slack, Discord, Microsoft Teams, Gmail, Zulip |\n| **Meetings** | Gong, Fireflies |\n| **Forums** | XenForo |\n| **Sales & CRM** | Salesforce, HubSpot |\n| **Web** | Website \u002F Sitemap crawler |\n\n```bash\noikb sync github:owner\u002Frepo --kb-id your-kb-id\noikb sync confluence:ENG --kb-id your-kb-id\noikb sync s3:\u002F\u002Fbucket\u002Fprefix --kb-id your-kb-id\noikb sync servicenow:incident --kb-id your-kb-id\n```\n\nSome connectors need an optional extra: `pip install oikb[gdrive]`, `pip install oikb[s3]`, or `pip install oikb[all]` for everything.\n\n## Filters\n\nNarrow what gets synced with include\u002Fexclude globs and size limits:\n\n```yaml\nsources:\n  - name: docs\n    source: github:owner\u002Frepo\n    kb-id: 4e7d9a0f-...\n    filter:\n      include: [\"docs\u002F**\u002F*.md\", \"*.txt\"]\n      exclude: [\"drafts\u002F**\"]\n      max-size: 50mb\n```\n\nTo split a single source across multiple Knowledge Bases, use separate entries:\n\n```yaml\nsources:\n  - name: wiki-docs\n    source: github:owner\u002Frepo\n    kb-id: abc123-...\n    filter:\n      include: [\"docs\u002F**\u002F*.md\"]\n\n  - name: wiki-code\n    source: github:owner\u002Frepo\n    kb-id: def456-...\n    filter:\n      include: [\"src\u002F**\"]\n```\n\n## Configuration\n\nResolved in order (highest priority wins):\n\n1. **CLI flags** (`--url`, `--token`)\n2. **Environment variables** (`OPEN_WEBUI_URL`, `OPEN_WEBUI_API_KEY`)\n3. **Config file** (`~\u002F.config\u002Foikb\u002Fconfig.yaml`)\n\nAll string values in `.oikb.yaml` support `${VAR}` and `${VAR:-default}` interpolation:\n\n```yaml\nsources:\n  - name: docs\n    source: github:${GITHUB_ORG}\u002Fdocs\n    kb-id: ${KB_DOCS_ID}\n    token: ${GITHUB_TOKEN}\n    notify:\n      url: ${SLACK_WEBHOOK:-https:\u002F\u002Fhooks.slack.com\u002Fdefault}\n```\n\n## History\n\n```bash\noikb history                    # Table view\noikb history --json             # JSON output\noikb history --errors           # Failed syncs only\noikb history --clear --days 7   # Prune old entries\n```\n\n## GitHub Actions\n\n```yaml\n- name: Sync docs to Open WebUI\n  uses: docker:\u002F\u002Fghcr.io\u002Fopen-webui\u002Foikb:latest\n  with:\n    args: sync \u002Fgithub\u002Fworkspace\u002Fdocs --kb-id ${{ secrets.KB_ID }}\n  env:\n    OPEN_WEBUI_URL: ${{ secrets.OPEN_WEBUI_URL }}\n    OPEN_WEBUI_API_KEY: ${{ secrets.OPEN_WEBUI_API_KEY }}\n```\n\n## How It Works\n\n1. Scan source, compute checksums\n2. Send manifest to Open WebUI `\u002Fsync\u002Fdiff`\n3. Delete stale files, create missing directories\n4. Upload only new and modified files\n\n## License\n\nMIT. See [LICENSE](LICENSE) for details.\n","oikb 是一个用于将各种来源的数据同步到 Open WebUI 知识库的工具。它支持从本地目录、GitHub 仓库、Confluence 空间、S3 存储桶等44种数据源中选择，仅上传新增或修改过的文件，通过SHA-256增量差异计算实现高效同步。适合需要维护多个知识库更新一致性的场景，如企业内部文档管理、项目协作平台等。此外，oikb 还提供了守护进程模式，支持定时任务、Webhook触发即时同步等功能，确保信息的实时性和准确性。","2026-06-11 04:09:49","CREATED_QUERY"]