Tag values

Tags in tessera are either plain words or key=value pairs.

Plain tags

A plain tag is any string without =:

tessera tag photo.jpg -t favourite
tessera tag photo.jpg -t genre/rock
tessera tag photo.jpg -t status/todo

Key=value tags

A key=value tag stores a value alongside the tag name:

tessera tag photo.jpg -t year=2024
tessera tag photo.jpg -t rating=5
tessera tag photo.jpg -t artist=Kraftwerk
tessera tag photo.jpg -t "title=Autobahn"

The key and value are stored separately but treated as a single unit. Querying year without a value matches any file that has a year tag regardless of its value. Querying year=2024 matches only files where the value is exactly 2024.

Numeric comparisons

Values that look like numbers support comparison operators in queries:

year>=2020
rating>3 and rating<=5

Values are stored as strings; numeric comparison is attempted first and falls back to lexicographic comparison.

Tag hierarchy with /

The / character is just a separator in the tag name string — there is no tree structure in the database. genre/rock and genre/jazz are two independent tags that happen to share a prefix. Queries like genre/* use glob matching on the stored strings.

Special characters

  • Commas (,) separate multiple tags on the command line: -t lossless,year=2024
  • Spaces: wrap in double quotes in the query language: "Extra models"
  • /: used as namespace separator by convention, but has no special database meaning
  • =: separates key from value
  • *: glob wildcard in queries only

Listing all tags in a database

tessera tags          # all tags in the current database
tessera info          # database statistics including tag count