User Tools

Site Tools


codedb:tags-properties

Tags & Properties

Tags and properties let you annotate files with metadata beyond their content and relationships.

Tags

Tags are labels you attach to files for organization and filtering. They appear in the Tags section of the sidebar as a tag cloud, sized by frequency.

Adding Tags

  • From the sidebar: Click + in the Tags section header to add a tag globally
  • From the context menu: Right-click a file and select Add Tag
  • Automatic extraction: CodeDB automatically extracts inline tags from file content (e.g., #todo, #api, #deprecated)

Tag Cloud

The Tags section in the sidebar displays all tags as a cloud. Click any tag to filter and see all files with that tag. Tags are sized proportionally to how many files use them.

Automatic Tag Extraction

CodeDB scans file content and extracts hashtag-style tags (e.g., #important, #refactor). Hex color codes like #FFFFFF are automatically excluded from tag extraction.

Properties

Properties are key-value pairs attached to individual files. They let you store structured metadata.

Adding Properties

  1. Open a file in the editor
  2. Open the bottom panel (⌘J) and click the Properties tab
  3. Click + Add Property
  4. Enter a key and value

Common Use Cases

  • author — who wrote or owns the file
  • version — version number
  • status — draft, review, published
  • priority — high, medium, low
  • category — grouping label
  • notes — free-form notes

Querying Properties

Properties are stored in the properties table and can be queried via the Query Console:

SELECT f.name, p.key, p.value
FROM properties p
JOIN files f ON p.file_id = f.id
WHERE p.key = 'status' AND p.value = 'draft';

Database Schema

CREATE TABLE tags (
  id INTEGER PRIMARY KEY,
  file_id INTEGER REFERENCES files(id),
  tag TEXT NOT NULL
);
 
CREATE TABLE properties (
  id INTEGER PRIMARY KEY,
  file_id INTEGER REFERENCES files(id),
  KEY TEXT NOT NULL,
  VALUE TEXT
);
codedb/tags-properties.txt · Last modified: by 127.0.0.1