Doctor CLI
Summary
Fix your notes using doctor
Usage
NOTE: the
fixFrontmatter
option is only available via the plugin at this time
doctor helps you fix your notes
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]
--action what action the doctor should take
[string] [choices: "fixFrontmatter", "h1ToTitle", "h1ToH2", "removeStubs",
"createMissingLinkedNotes", "regenerateNoteId", "findBrokenLinks",
"fixRemoteVaults", "fixAirtableMetadata", "addMissingDefaultConfigs",
"removeDeprecatedConfigs", "fixSelfContainedVaultsInConfig"]
--query run doctor over a query [string]
--limit limit num changes [number]
--dryRun dry run [boolean]
--podId podId used to export note(s) to Airtable [string]
Options
--action
What action should the doctor take to mend the notes.
Values:
- h1ToTitle: From DoctorGo to text →
- Remove initial
h1
header and use it to replace contents oftitle
field in frontmatter
- Remove initial
- h1ToH2: From DoctorGo to text →
- Convert all initial
h1
header toh2
header
- Convert all initial
- removeStubs: From DoctorGo to text →
- Remove all stub docs
- createMissingLinkedNotes: From DoctorGo to text →
- Create notes that do not exist yet but has a wikilink to it.
- A preview pane will appear with the notes that will be created before proceeding.
- In a multi-vault workspace, wikilinks that do not specify a vault prefix will be omitted from the candidates.
- In a workspace that has 2 vaults named
foo
andbar
, the wikilink[[missing-note]]
will not be a candidate for missing note creation with this command. - However,
[[dendron://foo/missing-note]]
and / or[[dendron://bar/missing-note]]
will be recognized as a missing note and will be listed as candidates.
- In a workspace that has 2 vaults named
- regenerateNoteId: From DoctorGo to text →
Regenerates the IDs of your notes.
- Command:
Dendron: Doctor
- Option:
regenerateNoteId
If you publish your notes, this will break the published links to your notes.
To change the scope of using this command (single note vs. workspace), remember to follow the notice in Dendron Doctor Details.
- Command:
- findBrokenLinks: From DoctorGo to text →
Similar to createMissingLinkedNotes: find all broken links (that have a vault prefix). This does note create new notes.
- Command:
Dendron: Doctor
- Option:
findBrokenLinks
This simply lists all broken links in the scope.
- Command:
- fixRemoteVaults: From DoctorGo to text →
If you have a remote vault that is not correctly marked as such in the configuration, this action will fix your config file for you.
- Command:
Dendron: Doctor
- Option:
fixRemoteVaults
- Command:
- fixAirtableMetadata: From DoctorGo to text →
Update airtable export pod metadata to latest version. Before running this command, Navigate to the domain of the hiearchy (eg.
tasks
) that is currently exported When run, the doctor will ask for the following:- hierarchy to export (same hierarchy you are currently on)
- pod id that this hierarchy is exported to (select the relevant pod config)
After doctor has run, it will convert all scalar airtable destinations to the new value
- addMissingDefaultConfigs: From DoctorGo to text →
-
Detects if there are any missing configurations that are required or has a default value in
dendron.yml
. -
When a missing configuration exists, a backup of
dendron.yml
is created and the missing keys are added with their corresponding default values. -
Command:
Dendron: Doctor
-
Option:
addMissingDefaultConfigs
-
- removeDeprecatedConfigs: From DoctorGo to text →
-
Detects if there are any deprecated configurations that are still in
dendron.yml
. -
When a deprecated configuration key exists, a backup of
dendron.yml
is created and the deprecated keys are removed. -
Command:
Dendron: Doctor
-
Option:
removeDeprecatedConfigs
-
- fixSelfContainedVaultsInConfig: Fixes issues in the
dendron.yml
when using/moving to a self-contained vault
Examples
- convert all
h1
tags to frontmattertitle
values for thereadings
hierarchy
dendron doctor --wsRoot . --action h1ToTitle --limit 10 --query "readings.*"
- see log
LOG_LEVEL=info LOG_DST=stdout dendron doctor --wsRoot . --action h1ToTitle --limit 10
Backlinks