I don’t know if this will be helpful in any way as this won’t solve the “2 steps” issue () but you can get a filtered list of available commands using commands filter= …
The problem is I need the command ID. So it actually doesn’t help. I already know the command name I want to run, that’s my starting point. That is not what Obsidian CLI demands. Instead it wants an ID which is I guess a design choice? Not sure why this is. Thus the request here. But it does point out I need to change the title of this thread!
Yes, I understand …
Like I said, it wasn’t going solve your current issue …
I can only guess the use of id vs. name for the command in the CLI/TUI has to do with Obsidian API and how commands are managed/stored within Obsidian … and also that:
obsidian command id="ID"
… in the CLI/TUI is probably similar to using app.commands.executeCommandById("command-id") in the console (or through Templater (for example) and/or other “scripting” plugins) .
I could be wrong though … as I don’t have any more info about the need of id vs. name than you do .
Maybe if we just wait someone more knowledgable will chime in! Thanks for the idea, we can guess all day but to me it just looks like an oversight. You can get the id’s from the name, so why not just do that for me? The only thing I can think of is that names might not be unique for commands, but IDs will be. Having two names that are identical seems like a bad design too but maybe I’m wrong.