@blinq_ai/widget
v0.2.2
Published
Blinq AI browser widget, SDK, and CLI.
Maintainers
Readme
@blinq_ai/widget
Browser widget, npm SDK, and CLI for Blinq AI.
Install
npm install @blinq_ai/widgetnpm install by itself is not enough. You still need to mount the widget once in your app.
Custom element
<blinq-widget
public-token="bq_pk_..."
api-base-url="https://app.blinq.kz"
mcp-endpoint="https://app.blinq.kz/mcp"
></blinq-widget>
<script type="module">
import "@blinq_ai/widget/browser"
</script>SDK
import { init } from "@blinq_ai/widget"
await init({
publicToken: "bq_pk_...",
apiBaseUrl: "https://app.blinq.kz",
mcpEndpoint: "https://app.blinq.kz/mcp",
})Config bootstrap
import config from "./blinq-widget.config.json"
import { initFromConfig } from "@blinq_ai/widget"
await initFromConfig(config)CLI
npx @blinq_ai/widget login
npx @blinq_ai/widget initFor self-hosted installs or DNS-restricted shells:
npx @blinq_ai/widget login --api-base-url https://app.blinq.kz
# or
BLINQ_API_BASE_URL=https://app.blinq.kz npx @blinq_ai/widget loginUpdates
- Publish a new version to npm when the package changes.
- Clients that pin an exact version need to bump that version in their app.
- Clients using a semver range pick up updates on the next install/deploy.
- After the widget is mounted once, normal product copy, prompts, and dashboard config changes do not require code changes in the client app.
