Configuration
chroma-fs.json schema — backend selection, IndexedDB names, and filesystem base paths.
Chroma-Fs reads chroma-fs.json at the app root. chroma fs init creates it with defaults for the app mode, and the templates include it.
The Chroma linter and VS Code extension validate this file against chroma-fs.schema.json.
Schema
{
"storage": {
"backend": "indexeddb",
"basePath": "./data",
"indexedDb": {
"dbName": "chroma-fs",
"storeName": "files"
}
}
}storage.backend
| Value | When to use |
|---|---|
indexeddb | Browser-only apps, static template default |
filesystem | Chroma Desktop, dynamic template default on desktop |
If omitted, Chroma-Fs picks automatically:
- Browser (top-level window, no Tauri) →
indexeddb - Desktop (Tauri globals, or the app runs inside a Chroma Desktop
<iframe>) →filesystem
When backend is filesystem and the app runs in an iframe, Chroma-Fs uses the
postMessage bridge to the Chroma Desktop shell (no __TAURI__ required in the
iframe). Top-level Tauri hosts use @tauri-apps/plugin-fs directly.
storage.basePath
Filesystem backend only. Relative path under the per-app data directory on desktop (<app-data>/apps/<id>/data/). Default: ./data.
storage.indexedDb
| Field | Default | Description |
|---|---|---|
dbName | chroma-fs | IndexedDB database name |
storeName | files | Object store name |
Template defaults
Static mode (chroma fs init):
{
"storage": {
"backend": "indexeddb",
"indexedDb": {
"dbName": "chroma-fs",
"storeName": "files"
}
}
}Dynamic mode (chroma fs init):
{
"storage": {
"backend": "filesystem",
"basePath": "./data"
}
}Build output
chroma build copies chroma-fs.json into dist/ when present so packaged apps load config at runtime.
CLI
chroma fs init # create chroma-fs.json with defaults for the app modeSee CLI for the other chroma fs subcommands.