Use case or problem
An alias is how a note’s name in the vault differs from its filename, so a script that resolves a link, decides whether an unresolved target is really missing, or looks up a note by the name a person actually uses needs the alias-to-file map. aliases verbose is the only command that offers one, and its output cannot be parsed back
Two notes sharing an alias, one of them in a folder whose name contains a comma — in the sandbox vault, so no community plugin takes part:
$ obsidian "vault=Obsidian Sandbox" aliases verbose
unicast Notes, drafts/Address types.md, Encapsulation.md
That single field names two files and holds three , separators. Splitting on the separator yields three items, none of which is a path that exists. Nothing in the output marks which commas are structure and which belong to a name
format= is no way out, because aliases does not advertise one: passing it is dropped in silence like any unknown parameter, and the bytes are identical
$ obsidian "vault=Obsidian Sandbox" aliases verbose format=json
unicast Notes, drafts/Address types.md, Encapsulation.md
Plain aliases deduplicates and hides collisions entirely, so neither form answers the question. On a real vault of 5512 files, splitting the verbose field on , reports 485 alias collisions where the metadata index holds 60
Proposed solution
Give aliases the same format=json|tsv|csv its neighbouring listings already take, and in JSON let verbose emit the paths as an array rather than a joined string:
[
{ "alias": "unicast", "files": ["Encapsulation.md", "Notes, drafts/Address types.md"] }
]
Current workaround (optional)
eval against the metadata index. It is exact, but it means running JavaScript inside the app to obtain something the CLI already lists:
obsidian eval code='(()=>{const m={};for(const f of app.vault.getMarkdownFiles()){const a=app.metadataCache.getFileCache(f)?.frontmatter?.aliases;if(!a)continue;for(const x of [].concat(a)){if(x)(m[String(x)]=m[String(x)]||[]).push(f.path)}}return JSON.stringify(m)})()'
Related feature requests (optional)
- “Structured JSON Output for Obsidian CLI” (topic 112869)
- the same joined-field shape in a command that does support
format=json: “CLI:unresolved verbose format=jsonreturnssourcesas a comma-joined string, which cannot be parsed back” (topic 119158)