docs/user/tools/cli/list.md
List notes, tags, orphans, placeholders, dead-ends, or templates.
foam list <what> [options]
| 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/ |
| 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 |
List all notes:
foam list notes
List notes with a specific tag:
foam list notes --tag project
List notes tagged both project and active:
foam list notes --tag project --tag active
List all tags sorted by usage count:
foam list tags --sort count
List tags starting with project/:
foam list tags --prefix project/
Find orphaned notes (no links in or out):
foam list orphans
Find broken wikilinks (links that don't resolve to a note):
foam list placeholders
List available templates:
foam list templates
See also [orphans] for the orphaned notes panel in VS Code, and [tags] for tag management in the editor.