Skip to content

Commit 3c8edaf

Browse files
committed
doc: readme
1 parent e450c6e commit 3c8edaf

1 file changed

Lines changed: 23 additions & 10 deletions

File tree

README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,31 @@ Features:
4747
- **Webhooks** — instant sync on push via `/webhooks/github`, `/webhooks/gitlab`, `/webhooks/slack`, `/webhooks/confluence`
4848
- **Health checks**`GET /health` for Docker/K8s readiness probes
4949
- **Sync history**`GET /history` queryable log of all syncs
50-
- **On-demand sync**`POST /sync/{source}` to trigger immediately
50+
- **On-demand sync**`POST /sync/{identifier}` trigger by `name` or `kb-id`
51+
- **API key auth** — set `OIKB_API_KEY` to secure endpoints (Docker secrets `_FILE` supported)
5152
- **OpenAPI tool server** — add `http://oikb:8080` as a Tool Server in Open WebUI (Settings → Connections) and let the LLM trigger syncs, check status, and query history
5253

5354
```yaml
5455
# .oikb.yaml
5556
sources:
56-
- source: github:owner/repo
57-
kb-id: team-wiki
57+
- name: wiki
58+
source: github:owner/repo
59+
kb-id: 8f3a2b1c-...
5860
interval: 1h
5961
webhook: true
6062

61-
- source: confluence:ENG
62-
kb-id: handbook
63+
- name: handbook
64+
source: confluence:ENG
65+
kb-id: 4e7d9a0f-...
6366
interval: 6h
6467
```
6568
69+
```bash
70+
oikb sync --name wiki # CLI: sync a specific entry
71+
curl -X POST /sync/wiki # API: trigger by name
72+
curl -X POST /sync/8f3a2b1c-.. # API: trigger by kb-id
73+
```
74+
6675
### Docker Compose
6776

6877
```yaml
@@ -77,6 +86,7 @@ services:
7786
environment:
7887
- OPEN_WEBUI_URL=http://open-webui:8080
7988
- OPEN_WEBUI_API_KEY=${OPEN_WEBUI_API_KEY}
89+
- OIKB_API_KEY=${OIKB_API_KEY}
8090
volumes:
8191
- ./.oikb.yaml:/app/.oikb.yaml:ro
8292
command: daemon
@@ -120,10 +130,12 @@ Route files from a single source to different Knowledge Bases by glob pattern:
120130

121131
```yaml
122132
sources:
123-
- source: github:owner/repo
133+
- name: wiki
134+
source: github:owner/repo
135+
kb-id: 8f3a2b1c-...
124136
routes:
125-
"docs/**/*.md": docs-kb
126-
"src/**": code-kb
137+
"docs/**/*.md": docs-kb-id
138+
"src/**": code-kb-id
127139
```
128140
129141
## Selective Sync Filters
@@ -132,8 +144,9 @@ Narrow what gets synced with include/exclude globs:
132144
133145
```yaml
134146
sources:
135-
- source: github:owner/repo
136-
kb-id: docs-only
147+
- name: docs
148+
source: github:owner/repo
149+
kb-id: 4e7d9a0f-...
137150
filter:
138151
include: ["docs/**/*.md", "*.txt"]
139152
exclude: ["drafts/**"]

0 commit comments

Comments
 (0)