Crates.io | obsidian-cli |
lib.rs | obsidian-cli |
version | 0.1.2 |
source | src |
created_at | 2024-08-23 13:34:02.557769 |
updated_at | 2024-08-23 13:34:02.557769 |
description | A CLI for managing obsidian vaults, notes and databases |
homepage | |
repository | https://github.com/mcky/obsidian-cli |
max_upload_size | |
id | 1349165 |
size | 117,456 |
Manage your obsidian vaults, notes and databases from the command line
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 view simple-note
# Notes commands all accept a --vault specifier
> obx notes view from-another-vault --vault=secondary
> obx notes create new-note
# Edit a note in $EDITOR
> obx notes edit simple-note
# Open the note in Obsidian.app
> obx notes open simple-note
# Print the obsidian:// uri for the note
> obx notes uri simple-note
# Print the absolute path to a note
> obx notes path simple-note
# Print the properties of a note in a table
> obx notes properties with-fm-properties
# Print properties as JSON
> obx notes properties with-fm-properties -f json
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 vaults create path/to/new-vault
# Explicitly name a vault
> obx vaults create path/to/new-vault --name another-vault
# Print a table of vaults
> obx vaults list
# Print the vaults as JSON
> obx vaults list -f json
# Interactively switch vaults
> obx vaults switch
# Switch to a named vault
> obx vaults switch secondary
# Print information about the current vault
> obx vaults current
# Print the absolute path to the current vault
# Useful for combining, e.g. tree $(obx vaults path)
> obx vaults path
glow
, e.g. obx notes view my-note | glow