Targ Apps Docs
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

ValueWhen to use
indexeddbBrowser-only apps, static template default
filesystemChroma 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

FieldDefaultDescription
dbNamechroma-fsIndexedDB database name
storeNamefilesObject 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/fs

In dynamic template package.json:

{
  "scripts": {
    "fs:init": "chroma fs init",
    "fs:link": "chroma fs link"
  }
}

On this page