Querying and finding files

Basic usage

tessera find QUERY

Returns one file path per line. The command is also available as tessera f.

For the full query language reference, see Query syntax.

Examples

# Files with a single tag
tessera find lossless

# Boolean AND
tessera find "lossless and genre/rock"

# Boolean OR
tessera find "genre/jazz or genre/blues"

# Boolean NOT
tessera find "lossless and not live"

# Key=value exact match
tessera find "artist=Kraftwerk"

# Numeric comparison
tessera find "year>=2020"
tessera find "rating>3 and rating<=5"

# Glob on a tag namespace
tessera find "genre/*"

# File type filter
tessera find "type:image and landscape"
tessera find "type:video and year=2024"

# Combined
tessera find "(genre/rock or genre/metal) and year>=2000 and not live"

Output options

# With tags listed after each path
tessera find QUERY --with-tags

# Count only — no paths printed
tessera find QUERY --count

# NUL-delimited output (safe for xargs -0)
tessera find QUERY -0

# JSON Lines
tessera find QUERY --json

Scope options

By default, a query runs against the current database and any linked child databases and ancestor databases. To change this:

# Current database only
tessera find QUERY --isolated
tessera find QUERY -i

# All globally registered databases
tessera find QUERY --all-dbs

Piping results

# Copy matching files
tessera find "genre/rock" | xargs -I{} cp {} ~/export/

# Open in mpv
tessera find "type:video and year=2024" -0 | xargs -0 mpv

# Pass to another command safely
tessera find QUERY -0 | xargs -0 some-command