No description
Find a file
2025-03-20 23:01:46 -03:00
.github/workflows use plain numbers for releases 2025-01-30 14:31:15 -03:00
.editorconfig use LF instead of CRLF (#28) 2022-04-15 14:13:31 -04:00
.eslintignore fix .eslintignore (#48) 2023-01-19 10:06:51 -05:00
.eslintrc add version bump script (#10) 2022-01-22 16:13:50 -05:00
.gitignore Update .gitignore (#25) 2022-01-28 10:34:53 -05:00
.npmrc add version bump script (#10) 2022-01-22 16:13:50 -05:00
esbuild.config.mjs build: minify prod build 2023-11-15 14:10:43 -05:00
LICENSE Create LICENSE 2024-12-28 14:56:34 -03:00
main.ts feat: use sentence case 2025-01-30 14:24:08 -03:00
manifest.json bump version number 2025-01-30 14:24:20 -03:00
package-lock.json add plugin files 2024-12-28 14:53:51 -03:00
package.json Upgrade esbuild to v0.17.x (#47) 2023-01-25 13:49:50 -05:00
README.md Update README.md 2025-03-20 23:01:46 -03:00
styles.css Update sample css file. 2022-08-09 13:39:02 -04:00
tsconfig.json Fix inconsistent indentation 2024-01-19 21:14:58 +02:00
version-bump.mjs add version bump script (#10) 2022-01-22 16:13:50 -05:00
versions.json Update for 0.15 2022-08-09 13:38:50 -04:00

Clone Vault Plugin

Easily create a new Obsidian vault by duplicating your current vaults settings, folder structure, and selectively copying specific folders (like templates or other important resources).

Features

Clones your vaults settings folder (e.g., .obsidian or a custom folder if renamed), preserving your full workspace configuration

Preserves the folder structure of your vault

Optionally copies the contents of selected folders great for things like templates, snippets, or assets

Handy modal prompt to name and create your new vault

Configurable default location for new vaults

Cloning Vault Settings

Obsidian stores each vaults settings (plugins, themes, hotkeys, workspace layout, etc.) in a settings folder — typically named .obsidian. However, some advanced users may rename this folder using custom configurations.

🔹 Clone Vault automatically detects and copies the correct settings folder, whether its named .obsidian or something else, ensuring the new vault behaves exactly like the original.

Selectively Copy Folder Contents

By default, Clone Vault preserves the folder structure of your vault but doesnt copy file contents. You can, however, specify which folders should be copied along with their files.

How to Specify Folders to Copy

  1. Open Obsidian Settings → Clone Vault plugin settings.

  2. In the “Folders to Copy” field, enter a comma-separated list of folder names (e.g., Templates, Snippets, Assets).

  3. When creating a new vault, Clone Vault will copy the contents of those folders into the new vault.

💡 Example:

If your vault has this structure:

📂 MyVault  
 ├── .obsidian/  
 ├── Templates/  
 │   ├── Meeting Notes.md  
 │   ├── Journal.md  
 ├── Snippets/  
 │   ├── CustomCSS.css  
 ├── Assets/  
 │   ├── Logo.png  
 │   ├── Background.jpg  
 ├── Notes/

And you enter Templates, Snippets in the plugin settings, your new vault will contain:

📂 NewVault  
 ├── .obsidian/  (or custom settings folder, cloned automatically)  
 ├── Templates/  (Includes Meeting Notes.md, Journal.md)  
 ├── Snippets/   (Includes CustomCSS.css)  
 ├── Assets/     (Empty  not copied)  
 ├── Notes/      (Empty  structure only, unless included in the list)  

Installation & Usage

  1. Install Clone Vault from the Obsidian Community Plugins browser.
  2. Enable the plugin in Settings → Community Plugins.
  3. Configure your preferences in Settings → Clone Vault:
    • Set the default location for new vaults
    • Specify which folders should have their contents copied (optional)
  4. Use the “Clone Vault” command from the command palette or plugin menu
  5. Enter a name for your new vault when prompted

Development

To install and build this plugin for local use:

  1. Clone the Repository

    git clone https://github.com/laantorchaweb/clone-vault.git
    cd clone-vault
    
  2. Install Dependencies
    Make sure you have Node.js installed, then run:

    npm install
    
  3. Build the Plugin
    Compile the TypeScript code into a main.js file:

    npm run build
    
  4. Install the Plugin in your Obsidian vault

    • Locate your Obsidian vault folder.
    • Navigate to the .obsidian/plugins/ directory.
    • Create a new folder named clone-vault.
    • Copy the following files into that folder:
      • manifest.json
      • main.js
  5. Enable the Plugin

    • Open Obsidian.
    • Go to Settings → Community plugins.
    • Enable Clone Vault.