Vaults

Summary

A vault is a collection of notes, files, and configuration files.

If you're familiar with git, it's just like a code repo. By default, Dendron creates a vaults folder when you first initialize a workspace. All your notes are stored on a per vault basis.

.
└── workspace
    ├── vault.main
    │   ├── foo.md
    │   ├── foo.one.md
    │   └── foo.two.md
    └── vault.secret (hypothetical)
        ├── secret.one.md
        └── secret.two.md

By default, when you look for notes in Dendron, it will search over all vaults.

Commands

Create New Vault

  • shortcuts: none

Create a new local vault in your workspace. You can change this later to a remote vault with the Convert Vault command.

Add Existing Vault

  • shortcuts: none

Add an existing vault to your workspace. When you add a vault, you can choose between adding a local vault or a remote vault. You can change this later with the Convert Vault command.

Local Vault

A local vault is a folder in your file system.

Remote Vault

A remote vault is a git repository. If you choose a remote vault, you can choose from a vault from the registry or enter a custom git url.

Vault Add

  • shortcuts: none

Add a new vault to your workspace.

When you add a vault, you can choose between adding a local vault or a remote vault. You can change this later with the Convert Vault command.

Choosing from the registry

Currently, Dendron has four vaults in the registry:

The first two correspond to the notes backing https://wiki.dendron.so/ and https://aws.dendron.so/ respectively.

When you add a remote vault, the url can also point to a remote workspace. In that case, Dendron will inspect the dendron.yml to get a list of all vaults within the workspace and add all vaults from inside the workspace.

Remove Vault

  • shortcuts: none

Remove a vault

Remove a vault from your workspace. Note that the underlying files will not be deleted - the vault will lose its association with your workspace.

Convert Vault

You can convert a local vault to a remote vault, or a remote vault to a local vault using this command. Simply run the command and follow the prompts.

If you are using Self Contained Vaults, then this command will also move the vault folder to be in the correct directory.

Vault Sources

When adding new vaults, your vault can come from either of the following sources:

  • local
  • remote

Local

A local vault is what you start off with. Its a vault that is local to your file system.

Remote

A remote vault is what you get when you run the Add Existing Vault command and select a remote vault. This is a vault that is cloned from a git repo. It will be listed in a similar format as what you see below in your configuration file.

vaults:
  - fsPath: dendron
    remote:
      type: git
      url: "git@github.com:dendronhq/dendron.git"

When someone pulls down a workspace with a dendron.yml that contains a remote vault, Dendron will automatically initialize the vault at the given fsPath. If the vault is a Vaults, Dendron will pull down the workspace to {workspaceName}/fsPath.

If you put a vault in a git repository with a remote without using the Vault Convert command, then it will be missing the correct configuration. Dendron can fix the configuration for you with the fix remote vaults doctor action.

Vault Types

Regular Vault

A regular vault is what you get by default when you first initialize your workspace.

Workspace Vault

A workspace vault is a vault that belongs to another workspace. It is automatically created when you run Create New Vault on a workspace. Upon adding a workspace, Dendron will add all the vaults of the given workspace inside your dendron.yml

You can see an example of the configuration here.


Children
  1. Configuration
  2. Self Contained Vaults
  3. Vaults CLI

Backlinks