vault commands#
Vault commands manage the daemon’s connection to a vault and its index. vault/init must be called before any other command — it is what binds the daemon instance to a vault.
vault/init#
Initializes the daemon against a vault. This sets up the database context and, if the vault has not been indexed before, performs a full index build by scanning the vault directory.
If the index already contains notes the rebuild is skipped, so calling vault/init on an already-known vault is safe and cheap.
Method: vault/init
Params:
| Field | Type | Description |
|---|---|---|
vaultName | string | Unique name for the vault. Used as the database identifier. |
vaultPath | string | Absolute path to the vault directory. |
templateDirectory | string | Absolute path to the directory containing note templates. |
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "vault/init",
"params": {
"vaultName": "atlas",
"vaultPath": "/home/user/notes/atlas",
"templateDirectory": "/home/user/notes/atlas/.templates"
}
}Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}vault/rebuild#
Triggers a full rebuild of the index for the currently active vault. All notes in the vault directory are re-scanned and the index is updated from scratch.
Useful when notes have been modified outside of Dendrite (e.g. synced from another machine, bulk-renamed) and the index is out of date.
vault/init must have been called before using this command, as the vault path is taken from the active vault configuration.
Method: vault/rebuild
Params: none
Request:
{
"jsonrpc": "2.0",
"id": 2,
"method": "vault/rebuild",
"params": {}
}Response:
{
"jsonrpc": "2.0",
"id": 2,
"result": null
}