CLI
Usage
note related commands
Positionals:
cmd a command to run[string] [required] [choices: "get", "find", "lookup", "delete", "move"]
Options:
--version Show version number [boolean]
--help Show help [boolean]
--wsRoot location of workspace
--vault name of vault
--quiet don't print output to stdout
--enginePort If set, connect to to running engine. If not set, create new
instance of Dendron Engine
--attach Use existing engine instead of spawning a new one
--useLocalEngine If set, use in memory engine instead of connecting to a
server [boolean]
--query the query to run [string]
--output format to output in
[string] [choices: "json", "md_gfm", "md_dendron"] [default: "json"]
--fname name of file to find/write [string]
--body body of file to write [string]
--destFname name to change to (for move) [string]
--destVaultName vault to move to (for move) [string]
Commands
get
Get a note by id.
find
Find notes by note properties
lookup
Find or create a note if one does not exist, outputting in a specified format.
delete
Delete a note from a vault.
write
Creates a new note if fname/vault doesn't exist or updates body of existing note
move
Move a note to another vault, or rename a note within a workspace.
Options
--query
Note to query for. Same syntax as Lookup
--output
Controls how note is formatted
Values:
json
: JSON outputmd_dendron
: dendron markdownmd_gfm
: github flavored markdown
Examples
- Creating a note (or updating an existing note)
# creates hello if it does not exist. updates hello if it does exist.
dendron note write --fname "mytest" --vault "vaultName" --body "this is a body"
- Getting a note
dendron note get --query "noteId"
- Finding notes
dendron note find --fname "foo"
- Querying a note
# retrieves hello.md if it does exist
dendron note lookup --query "hello"
- Querying a note with GitHub Flavored Markdown output
# retrieves hello.md if it does exist
dendron note lookup --query "hello" --output md_gfm
- Deleting a note
dendron note delete --fname "foo"
- Deleting a note within a multi-vault workspace
dendron note delete --vault vault2 --fname "foo"
- Moving a note
# renames the note "foo" to "bar" within a single-vault workspace
# if there is no note in the vault already named "bar"
dendron note move --fname "foo" --destFname "bar"
- Moving a note in a multi-vault workspace
# moves the note "foo" to vault2 and changes its name to "bar"
# if there is no note in vault2 already named "bar"
dendron note move --vault vault --fname "foo" --destFname "bar" --destVaultName vault2
Children
Backlinks