Back to Foam

foam list

docs/user/tools/cli/list.md

0.40.22.4 KB
Original Source

foam list

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

foam list <what> [options]

What to list

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/

Options

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

Examples

List all notes:

bash
foam list notes

List notes with a specific tag:

bash
foam list notes --tag project

List notes tagged both project and active:

bash
foam list notes --tag project --tag active

List all tags sorted by usage count:

bash
foam list tags --sort count

List tags starting with project/:

bash
foam list tags --prefix project/

Find orphaned notes (no links in or out):

bash
foam list orphans

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

bash
foam list placeholders

List available templates:

bash
foam list templates

See also [orphans] for the orphaned notes panel in VS Code, and [tags] for tag management in the editor.