foam list
List notes, tags, orphans, placeholders, dead-ends, or templates.
foam list <what> [options]What to list
Section titled “What to list”| Value | Description |
|---|---|
notes | All notes in the workspace |
tags | All tags used across notes |
orphans | Notes with no links in or out |
deadends | Notes with no outgoing links |
placeholders | Wikilinks that don’t resolve to an existing note |
templates | Note templates in .foam/templates/ |
Options
Section titled “Options”| Option | Description |
|---|---|
--type <type> | (notes) Filter by resource type: note, daily-note, attachment, image |
--tag <tag> | (notes) Filter by tag — repeat for multiple tags (AND logic) |
--limit <n> | (notes, tags) Maximum number of results |
--prefix <str> | (tags) Filter by tag prefix |
--sort <count|name> | (tags) Sort order (default: name) |
--workspace <dir> | Workspace root (default: FOAM_WORKSPACE env var, then current directory) |
--format <fmt> | Output format: text (default) or json |
Examples
Section titled “Examples”List all notes:
foam list notesList notes with a specific tag:
foam list notes --tag projectList notes tagged both project and active:
foam list notes --tag project --tag activeList all tags sorted by usage count:
foam list tags --sort countList tags starting with project/:
foam list tags --prefix project/Find orphaned notes (no links in or out):
foam list orphansFind broken wikilinks (links that don’t resolve to a note):
foam list placeholdersList available templates:
foam list templatesSee also Orphaned Notes for the orphaned notes panel in VS Code, and Tags for tag management in the editor.
Published with Foam