Chroma-Fs
Configuration
chroma-fs.json schema — backend selection, IndexedDB names, and filesystem base paths.
Chroma-Fs reads chroma-fs.json at the app root. The CLI scaffolds it via chroma fs init or includes it in static/dynamic templates.
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:
- Static platform (no Tauri globals) →
indexeddb - Desktop platform (Tauri detected) →
filesystem
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 (chroma fs init in static mode):
{
"storage": {
"backend": "indexeddb",
"indexedDb": {
"dbName": "chroma-fs",
"storeName": "files"
}
}
}Dynamic (chroma fs init in dynamic mode):
{
"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 commands
chroma fs init # create chroma-fs.json with mode-appropriate defaults
chroma fs link # build Chroma-Fs from workspace and npm link @chroma/fsIn dynamic template package.json:
{
"scripts": {
"fs:init": "chroma fs init",
"fs:link": "chroma fs link"
}
}