{"id":50932578,"url":"https://github.com/getknoku/widget","last_synced_at":"2026-06-17T06:01:18.693Z","repository":{"id":354286017,"uuid":"1223015578","full_name":"getknoku/widget","owner":"getknoku","description":"Embeddable AI chat widget for documentation sites. CDN script or npm import","archived":false,"fork":false,"pushed_at":"2026-05-10T08:02:11.000Z","size":258,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-10T10:10:21.969Z","etag":null,"topics":["ai","chatbot","docs","documentation","widget"],"latest_commit_sha":null,"homepage":"https://knoku.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getknoku.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":null,"dco":null,"cla":null}},"created_at":"2026-04-27T23:47:47.000Z","updated_at":"2026-05-10T08:43:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/getknoku/widget","commit_stats":null,"previous_names":["getknoku/widget"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/getknoku/widget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getknoku%2Fwidget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getknoku%2Fwidget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getknoku%2Fwidget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getknoku%2Fwidget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getknoku","download_url":"https://codeload.github.com/getknoku/widget/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getknoku%2Fwidget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34435981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","chatbot","docs","documentation","widget"],"created_at":"2026-06-17T06:00:29.548Z","updated_at":"2026-06-17T06:01:18.652Z","avatar_url":"https://github.com/getknoku.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Knoku Widget\n\nEmbeddable Knoku chat widget. The package supports two delivery modes:\n\n- CDN / script tag: `dist/widget.js`\n- npm / app integration: `@knoku/widget`\n\nFull documentation: [docs.knoku.com/widget](https://docs.knoku.com/widget).\n\n## CDN usage\n\n```html\n\u003cscript\n  src=\"https://cdn.knoku.com/widget.js\"\n  data-project-id=\"YOUR_PROJECT_ID\"\n  data-greeting=\"How can I help?\"\n  data-launcher-text=\"Need help?\"\n  data-launcher-subtitle=\"Ask AI\"\n  data-primary-color-light=\"#6366f1\"\n  data-primary-color-dark=\"#818cf8\"\n  data-suggested-questions=\"How do I get started?,How does pricing work?\"\n  data-language=\"en\"\n  data-consent-required=\"true\"\n  data-consent-title=\"AI chat consent\"\n  data-consent-disclaimer=\"Questions may be processed to generate an answer.\"\n  data-consent-accept-text=\"Continue\"\n  data-consent-reject-text=\"Cancel\"\n  async\n\u003e\u003c/script\u003e\n```\n\nThe loader reads widget settings from `data-*` attributes, fetches `/api/v1/config/{projectId}` for server-controlled status and plan policy, and skips mounting when the project/widget is inactive or the current domain is not allowed.\n\nAdd a custom site button in addition to the default launcher:\n\n```html\n\u003cbutton id=\"ask-ai\"\u003eAsk AI\u003c/button\u003e\n\u003cscript\n  src=\"https://cdn.knoku.com/widget.js\"\n  data-project-id=\"YOUR_PROJECT_ID\"\n  data-open-selector=\"#ask-ai\"\n  async\n\u003e\u003c/script\u003e\n```\n\nAdd `data-launcher-hidden=\"true\"` only if you want to hide the default bottom launcher.\n\nLanguage defaults to browser detection and can be overridden with `data-language`.\n\n## npm usage\n\n```bash\nnpm install @knoku/widget\n```\n\n```ts\nimport { initKnokuWidget } from '@knoku/widget'\n\nawait initKnokuWidget({\n  projectId: 'YOUR_PROJECT_ID',\n})\n```\n\nUse the npm API for documented per-page overrides such as `greeting` and `language`.\n\nIf you already own the host Shadow DOM, use the lower-level mount API:\n\n```ts\nimport { mountKnokuWidget, createWidgetConfig } from '@knoku/widget'\n\nconst host = document.getElementById('widget-host')\nif (host) {\n  const shadow = host.attachShadow({ mode: 'open' })\n  mountKnokuWidget(\n    shadow,\n    createWidgetConfig({ projectId: 'YOUR_PROJECT_ID' })\n  )\n}\n```\n\n## Programmatic controls\n\nAfter mount, the widget exposes `window.Knoku`:\n\n```ts\nwindow.Knoku.open()\nwindow.Knoku.close()\nwindow.Knoku.toggle()\nwindow.Knoku.ask('How do I self-host?')\nwindow.Knoku.identify({ id: 'user_123', email: 'user@example.com' })\n```\n\n## Build\n\n```bash\nnpm run build\n```\n\nBuild outputs:\n\n- `dist/widget.js` - standalone script-tag loader bundle\n- `dist/index.js` - ESM package entry\n- `dist/*.d.ts` - TypeScript declarations\n\n## Issues \u0026 Contributing\n\nReport bugs or request features at [github.com/getknoku/widget/issues](https://github.com/getknoku/widget/issues).\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetknoku%2Fwidget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetknoku%2Fwidget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetknoku%2Fwidget/lists"}