Workspaces
Virtual Workspaces
Workspaces let you organize notes without moving files. A note can belong to multiple workspaces, and workspaces can span multiple folders.
Defining Workspaces
Define workspaces in your strayfiles.toml:
version = 1
[settings]
roots = ["./notes", "./projects"]
[workspaces.work]
description = "Work-related notes"
include = ["projects/**"]
[workspaces.personal]
description = "Personal notes and ideas"
include = ["notes/personal/**"]
[workspaces.claude-code]
description = "Claude Code context files"
include = ["**/CLAUDE.md", "**/claude/**"]
Workspace Configuration
Each workspace supports these options:
[workspaces.example]
# Human-readable description
description = "Example workspace"
# Glob patterns to auto-include
include = [
"docs/**",
"notes/work/**"
]
# Glob patterns to exclude (overrides include)
exclude = [
"**/*.draft.md"
]
# Color for UI (hex or named)
color = "#3B82F6"
# Icon (emoji or icon name)
icon = "📁"
Assigning Notes to Workspaces
Method 1: Auto-assignment via patterns
Notes matching workspace include patterns are automatically assigned:
[workspaces.ai-tools]
include = [
"**/CLAUDE.md",
"**/cursor/**",
"**/copilot/**"
]
Method 2: Frontmatter assignment
Explicitly assign notes in their frontmatter:
---
title: Project Setup Guide
strayfiles:
enabled: true
workspaces: ["work", "documentation"]
---
Method 3: In-app assignment
Drag and drop notes into workspaces in the strayfiles UI.
Workspace Examples
AI Coding Tools
[workspaces.claude-code]
description = "Claude Code context files"
include = ["**/CLAUDE.md"]
icon = "🤖"
[workspaces.cursor]
description = "Cursor IDE rules"
include = ["**/.cursorrules", "**/cursor/**"]
icon = "⚡"
Project Organization
[workspaces.active]
description = "Currently active projects"
include = ["projects/active/**"]
color = "#22C55E"
[workspaces.archive]
description = "Archived projects"
include = ["projects/archive/**"]
color = "#6B7280"
Content Types
[workspaces.blog]
description = "Blog posts and drafts"
include = ["content/blog/**", "drafts/**"]
exclude = ["**/*.draft.md"]
[workspaces.docs]
description = "Documentation"
include = ["**/README.md", "**/docs/**"]
Workspace Queries
In the strayfiles search, filter by workspace:
workspace:work meeting notes
workspace:claude-code setup
workspace:personal,ideas brainstorm
Combine with other filters:
workspace:work tag:urgent created:today
Tips
- Notes can belong to multiple workspaces
- Workspace membership is non-destructive — files never move
- Use descriptive names and icons for easy scanning
- Color-code by project or priority