Add YAML frontmatter (slug, public, category, template, order) to 8 existing docs and 2 new getting-started guides (installation, quick-start). Include docs/**/*.md in npm package files so the portal sync-docs script can read them from node_modules after publish. Update CLAUDE.md with docs pipeline trigger phrases and release checklist.
2.3 KiB
2.3 KiB
| title | slug | public | category | template | order | description | next | ||
|---|---|---|---|---|---|---|---|---|---|
| Installation | getting-started/installation | true | getting-started | guide | 1 | Install Brainy with npm, bun, yarn, or pnpm. Works in Node.js 22+, Bun 1.0+, and browser (OPFS). TypeScript included. |
|
Installation
Requirements
- Node.js 22+ or Bun 1.0+
- TypeScript is optional — Brainy ships with full type definitions
Install
npm install @soulcraft/brainy
Or with your preferred package manager:
bun add @soulcraft/brainy
yarn add @soulcraft/brainy
pnpm add @soulcraft/brainy
Verify
import { Brainy } from '@soulcraft/brainy'
const brain = new Brainy()
await brain.init()
console.log('Brainy ready.')
Native Acceleration (Optional)
For production workloads, add Cortex for Rust-accelerated SIMD distance calculations, vector quantization, and native embeddings:
npm install @soulcraft/cortex
import { Brainy } from '@soulcraft/brainy'
import { registerCortex } from '@soulcraft/cortex'
registerCortex() // activates native acceleration globally
const brain = new Brainy()
await brain.init()
Cortex delivers a 5.2x geometric mean speedup — see Brainy vs Cortex for measured benchmarks.
Browser (OPFS)
Brainy works in the browser using the Origin Private File System:
import { Brainy } from '@soulcraft/brainy'
const brain = new Brainy({ storage: 'opfs' })
await brain.init()
No server required. Data persists across page refreshes in the browser's private storage.
TypeScript
Brainy ships with full TypeScript types. No @types/ package needed:
import { Brainy, NounType, VerbType } from '@soulcraft/brainy'
const brain = new Brainy()
await brain.init()
const id = await brain.add({
data: 'Hello, Brainy',
type: NounType.Concept,
metadata: { created: Date.now() }
})
Next Steps
- Quick Start — build your first knowledge graph in 60 seconds
- Zero Configuration — understand what Brainy auto-detects
- Storage Adapters — choose the right storage for your deployment