Initialising a database

A tessera database is a single SQLite file stored at .tessera/db.sqlite3 inside the root directory of a collection. All file paths are stored relative to that root, so the database is portable: move the whole directory and everything still works.

Creating a database

cd /path/to/your/collection
tessera init

This creates .tessera/db.sqlite3 in the current directory. You only need one database per directory tree; files in subdirectories are automatically within scope.

Registering in the global registry

If you have several collections and want to query them all at once with --all-dbs, register the database:

tessera init --register
# or, after the fact:
tessera db register

The registry is stored at ~/.config/tessera/databases.json.

Nested collections

You can have a database inside a directory that already has a parent database. tessera will find the deepest database root for any given file and use that one. Queries on the parent automatically include child databases — see Linked databases for details.

The .tessera/ directory

Everything tessera writes lives here:

PathContents
.tessera/db.sqlite3The main database
.tessera/cache/thumbs/Thumbnail cache (web interface)
.tessera/cache/vthumbs/Trickplay sprite sheets (video)
.tessera/cache/ai_sprites/AI analysis sprite sheets
.tessera/cache/transcodes/Transcoded video for streaming
.tessera/logs/tessera.logCurrent tessera-web application log
.tessera/logs/tessera.log.1Previous log after rotation

tessera never writes outside .tessera/.