Resolved: Official API method to get list of commands from command palette?

Is there any way through the official API to get a list of available commands (i.e. what’s shown in the command palette)? When running the current version of the app I see app.commands but commands is not part of App in the API, so I was not sure what that meant. I’ve searched the forum for this particular query and skimmed a number the GitHub issues on the API, but am otherwise new to conversations about the API.
Could someone please clarify whether there’s a way to get commands via the API? Thanks!

app.commands.commands has all command’s, it’s not documented, which means that it might change without notice.

You can declare, these undocumented features in your code to use them.
Similar to how its done here: https://github.com/06000208/obsidian-items/blob/d176832965cfffe255c9f41ef93a71c88e434244/src/types.d.ts

2 Likes

Thank you for the very helpful answer! Marking this resolved via the title.