@8xlabsai/hekaya-kb-cli
v0.2.1
Published
Hekaya knowledge-base ingestion CLI — scans your frontend project, extracts text, uploads to your tenant.
Readme
@8xlabsai/hekaya-kb-cli
CLI that seeds your Hekaya tenant's knowledge base by scanning your frontend project. Detects React / Angular / generic codebases, extracts user-visible strings + route metadata, and uploads them to your tenant for the AI sales agent to ground answers in.
Install
# One-off via npx (recommended for v1):
npx @8xlabsai/hekaya-kb-cli login
# Or globally:
pnpm add -g @8xlabsai/hekaya-kb-cli
hekaya loginQuickstart (founder onboarding flow)
# 1. Authenticate against your Hekaya dashboard:
npx @8xlabsai/hekaya-kb-cli login
# → opens browser to mint a CLI token; pasted back automatically.
# 2. Scan your frontend project:
cd path/to/your/frontend
npx @8xlabsai/hekaya-kb-cli scan
# → detects framework (Angular / React / generic), produces .hekaya/scan.json
# 3. Upload to your tenant:
npx @8xlabsai/hekaya-kb-cli upload --tenant your-tenant-slug
# → KB chunks created server-side + indexed for retrieval.Commands
hekaya login— opens the dashboard's CLI-token mint page; reads back the plaintext token (one-time reveal). Persists to~/.hekaya/credentials.hekaya scan— walks the working directory, detects framework, extracts text + route metadata, writes.hekaya/scan.json. Respects.gitignore.hekaya upload [--tenant <slug>]— POSTs.hekaya/scan.jsonto the orchestrator's/api/v1/kb/upload. Server replays the chunks under the tenant's RLS context.
Supported frameworks
- React — JSX/TSX text nodes, file-based routes (Next.js / Remix / Vite plugins).
- Angular — template
i18nmarkers, component selector + route module map. - Generic — plain HTML scrape + sitemap discovery.
Auto-detected via .hekaya scan based on files in the project root.
Privacy
The CLI uploads only user-visible strings — never source code, never tokens, never .env values. Excludes node_modules, dist, build, and any path matched by .gitignore. Files containing the literal word secret or token in the basename are skipped as a belt-and-suspenders measure.
Source
Monorepo: github.com/8xlabs-ai/hekaya.ai → packages/kb-cli/.
License
MIT
