File-based store
Store index artifacts in a JSON file
Overview
The file-based store reads and writes index data to a JSON file on disk. Configure it through withPeam or the CLI. See Storage for selecting a store.
Options (withPeam)
| Option | Type | Default | Description |
|---|---|---|---|
baseDir | string | process.cwd() | Base directory for the index file. |
indexPath | string | .peam/index.json | Path to the index file, relative to baseDir. |
Example (Next.js)
// next.config.ts
import withPeam from '@peam-ai/next';
export default withPeam({
searchStore: {
type: 'fileBased',
config: { indexPath: '.peam/index.json' },
},
})();Example (CLI)
peam \
--source fileBased --projectDir . --sourceDir dist \
--store fileBased --indexPath .peam/index.json