Table of Contents

Smart Views

Smart Views are saved SQL queries that appear in your sidebar for quick access. They let you create custom filtered views of your file database.

What Are Smart Views?

A Smart View is a named SQL query with an optional icon that lives in the sidebar. Click it to run the query and see matching files instantly. Think of them as saved searches or bookmarks for your database.

Creating a Smart View

  1. Click + in the Smart Views section header
  2. Enter a name for the view (e.g., “Python Files”, “Files Without Tags”)
  3. Choose an icon from the emoji picker (40 options), or paste your own emoji
  4. Write a SQL query that returns file data
  5. Click Save

Example Queries

All JavaScript files:

SELECT * FROM files WHERE LANGUAGE = 'javascript'

Files with the most relations:

SELECT f.name, COUNT(r.id) AS connections
FROM files f
LEFT JOIN relations r ON f.id = r.source_id OR f.id = r.target_id
GROUP BY f.id
ORDER BY connections DESC
LIMIT 20

Recently modified files:

SELECT * FROM files ORDER BY updated_at DESC LIMIT 10

Files tagged as “todo”:

SELECT DISTINCT f.* FROM files f
JOIN tags t ON f.id = t.file_id
WHERE t.tag = 'todo'

Orphan files (no relations):

SELECT f.* FROM files f
WHERE f.id NOT IN (SELECT source_id FROM relations)
AND f.id NOT IN (SELECT target_id FROM relations)

Managing Smart Views

Tips

Tip: Smart Views run against the full SQLite database. You can join any tables (files, relations, tags, properties) to create powerful filtered views.