Skip to content

foam list

List notes, tags, orphans, placeholders, dead-ends, or templates.

foam list <what> [options]
ValueDescription
notesAll notes in the workspace
tagsAll tags used across notes
orphansNotes with no links in or out
deadendsNotes with no outgoing links
placeholdersWikilinks that don’t resolve to an existing note
templatesNote templates in .foam/templates/
OptionDescription
--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:

Terminal window
foam list notes

List notes with a specific tag:

Terminal window
foam list notes --tag project

List notes tagged both project and active:

Terminal window
foam list notes --tag project --tag active

List all tags sorted by usage count:

Terminal window
foam list tags --sort count

List tags starting with project/:

Terminal window
foam list tags --prefix project/

Find orphaned notes (no links in or out):

Terminal window
foam list orphans

Find broken wikilinks (links that don’t resolve to a note):

Terminal window
foam list placeholders

List available templates:

Terminal window
foam list templates

See also Orphaned Notes for the orphaned notes panel in VS Code, and Tags for tag management in the editor.

Published with Foam