obsidian-cli-0.1.2 is not a library.
Obsidian CLI
Manage your obsidian vaults, notes and databases from the command line
Features
- Create, edit and read notes from the command line
- View and export properties from your notes
- Soon: query your vaults and database folders with SQL
Commands
Notes
Commands for interacting with individual notes
Usage: obx notes
obx notes <COMMAND>
Commands:
view Output the raw markdown contents of a note
open Open a note in the Obsidian app
uri Print the Obsidian URI of a note
create Create a new note
edit Open a note in your default editor ($EDITOR)
path Print the full file-path of the note
properties View the properties of a note
help Print this message or the help of the given subcommand(s)
Usage:
# Print a note
> obx
# Notes commands all accept a --vault specifier
> obx
> obx
# Edit a note in $EDITOR
> obx
# Open the note in Obsidian.app
> obx
# Print the obsidian:// uri for the note
> obx
# Print the absolute path to a note
> obx
# Print the properties of a note in a table
> obx
# Print properties as JSON
> obx
Vaults
Commands for interacting with vaults
Usage: obx vaults
obx vaults <COMMAND>
Commands:
create Create a new vault and switch to it. The name will be inferred from the last segment unless --name is explicitly provided
list List all vaults
switch Set a vault as current, to be implicitly used by commands. A vault can be explicitly provided, or chosen interactively
current Print the name and path of the current vault
path Print the absolute path to the current vault
help Print this message or the help of the given subcommand(s)
# Create a new vault called "new-vault"
> obx
# Explicitly name a vault
> obx
# Print a table of vaults
> obx
# Print the vaults as JSON
> obx
# Interactively switch vaults
> obx
# Switch to a named vault
> obx
# Print information about the current vault
> obx
# Print the absolute path to the current vault
# Useful for combining, e.g. tree $(obx vaults path)
> obx
Roadmap
- Fuzzy searching of files within vaults
- Pretty rendering of notes in the command line
- It's been tricky finding a markdown renderer with support for all the features I'd expect, so for
now I suggest piping to another tool such as
glow, e.g.obx notes view my-note | glow
- It's been tricky finding a markdown renderer with support for all the features I'd expect, so for
now I suggest piping to another tool such as
- Query your vault with SQL
- Query notes across a vault
- Query a "database folder"
- Run dataview queries from the command line