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)

OptionTypeDefaultDescription
baseDirstringprocess.cwd()Base directory for the index file.
indexPathstring.peam/index.jsonPath 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