What is a Space?
A space is simply a folder on your computer that Glyph uses to store and organize your notes. When you create or open a space, Glyph sets up a special.glyph/ directory inside it to store metadata, cache, and app-specific data.
Directory Structure
When you create a space, Glyph automatically creates this structure:The
.glyph/ folder stores all metadata and should not be manually edited. It’s automatically managed by the app.Creating a Space
You can create a new space in two ways:- From the Welcome Screen: Click “Create Space” and choose a directory
- From the Menu: Navigate to File → Create Space (or use
Cmd+Shift+Non macOS)
- Creates the
.glyph/directory structure - Initializes the search database
- Sets up the file watcher for real-time updates
- Cleans up any temporary files from previous sessions
Opening a Space
To open an existing space:- Use
Cmd+O(macOS) orCtrl+O(Windows/Linux) - Select the folder containing your notes
- Glyph will detect if it’s an existing space or create a new one
What happens when you open a space?
What happens when you open a space?
When you open a space, Glyph performs these operations:
- Validates the directory - Ensures it’s a valid folder path
- Initializes metadata - Creates
.glyph/structure if needed - Starts file watcher - Monitors changes to your files in real-time
- Loads the index - Opens the SQLite database for search
- Cleans temporary files - Removes
.tmpfiles from crashes
src-tauri/src/space/watcher.rs) monitors all changes and updates the search index automatically with a 100ms debounce.File Watching
Glyph monitors your space directory for changes using a recursive file watcher. This means:- Real-time updates: Changes from external editors appear immediately
- Smart indexing: Only modified files are re-indexed
- Change debouncing: Multiple rapid changes are batched (100ms window)
- Hidden file filtering: Ignores files/folders starting with
.
How It Works
- External changes trigger a
space:fs_changedevent to the frontend - Markdown files are automatically re-indexed for search
- The file tree UI updates to reflect changes
- Recent local changes (within 2 seconds) are tracked to avoid duplicate processing
Glyph ignores its own writes for 2 seconds to prevent re-indexing files you just saved.
Closing a Space
To close the current space:- Use File → Close Space from the menu
- The file watcher stops
- The search index connection closes
- Recent spaces list is updated
Recent Spaces
Glyph remembers recently opened spaces for quick access. You can:- View recent spaces in Settings → Space
- Clear the recent list with the “Clear” button
- Reopen a recent space from the welcome screen
Space Operations Reference
Best Practices
- Keep spaces focused: Create separate spaces for different projects or areas
- Use cloud sync carefully: If syncing with Dropbox/iCloud, exclude
.glyph/cache/ - Don’t nest spaces: Avoid creating one space inside another
- Backup regularly: The
.glyph/folder can be recreated, but back up your notes
Can I use Git with spaces?
Can I use Git with spaces?
Yes! You can version control your space with Git. Consider adding this to The search database (
.gitignore:glyph.sqlite) can be committed or ignored - Glyph will rebuild it if missing.Troubleshooting
Space won’t open
- Ensure the folder exists and you have read/write permissions
- Check that the path doesn’t contain special characters
- Try creating a new space instead
Search not working
- Go to Settings → Space and click “Rebuild Index”
- This re-indexes all markdown files in your space
Changes not appearing
- The file watcher may have stopped - try closing and reopening the space
- Check that changed files aren’t in hidden folders (starting with
.)