JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 185
  • Score
    100M100P100Q106168F
  • License MIT

Knowledge base CLI for querying and curating agent knowledge.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nzpr/kb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @nzpr/kb

    @nzpr/kb is a CLI for using and curating a knowledge base.

    A knowledge entry is just:

    • title
    • text

    Most Common Use

    export KB_DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/DB
    
    kb search "deployment rule"
    kb ask "How do we approve a knowledge proposal?"
    kb list
    kb catalog --json
    kb doctor

    API

    kb search "..."
    kb ask "..."
    kb list
    kb catalog --json
    kb doctor
    kb publish --docs-root ./docs
    kb create --title "..." --text "..."
    kb init-repo

    Install

    npm install -g @nzpr/kb

    Node.js 20+ is required.

    Publish

    export KB_DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/DB
    
    kb publish --docs-root ./docs

    Optional embeddings:

    export KB_EMBEDDING_MODE=bge-m3-openai
    export KB_EMBEDDING_API_URL=https://embeddings.example.com/v1/embeddings
    export KB_EMBEDDING_MODEL=BAAI/bge-m3
    export KB_EMBEDDING_API_KEY=...

    Workflow

    1. kb init-repo
    2. kb create
    3. review the issue
    4. add kb-approved
    5. merge the generated PR
    6. let CI run kb publish

    Create

    export KB_GITHUB_REPO=owner/repo
    export GITHUB_TOKEN=...
    
    kb create \
      --title "Example Rule" \
      --text "Write the exact knowledge text here."

    Notes

    • Most usage should be kb search and kb ask.
    • kb publish does not need GitHub credentials.
    • kb init-repo --interactive is the easiest setup path.
    • For repo bootstrap, kb init-repo --repo ... needs a GitHub token with repository admin access.