2 min read 468 words Updated Mar 14, 2026 Created Mar 14, 2026

Init Command

The init command creates a new Obsidian vault directory pre-configured for Kiln. It scaffolds the folder structure, a starter note, and a kiln.yaml [configuration file](../Configuration File.md) so you can begin writing content and generating your site immediately. This is the recommended first step if you are starting a fresh project after installing Kiln.

Usage

kiln init

By default, this creates a vault directory in your current working directory. You can specify a different name with the --input flag:

kiln init --input my-notes

What It Creates

Running init generates the following structure:

kiln.yaml
vault/
└── Home.md
  • kiln.yaml — A [configuration file](../Configuration File.md) with all available options commented out. Uncomment and edit values to set project-wide defaults instead of passing flags on every command. CLI flags always override config values. If a kiln.yaml already exists in the current directory, it is left untouched.
  • vault/Home.md — A welcome note with a heading and a prompt to run your first build. This file becomes the homepage of your generated site.

If a directory with the target name already exists, init exits with an error to prevent accidentally overwriting your content.

Flags

FlagShortDefaultDescription
--input-i./vaultName of the directory to create.
--log-linfoSets the log level. Choose between info or debug.

Full Workflow: From Init to Preview

After scaffolding your vault, you can build and preview it with two more commands. Here is the complete workflow from an empty directory to a running local site:

# 1. Scaffold a new vault
kiln init

# 2. Build the site
kiln generate --input ./vault --output ./public

# 3. Preview in your browser
kiln serve --output ./public

Open http://localhost:8080 to see your site. From here you can add Markdown notes, organize them into folders, and rebuild with the Generate Command to see your changes.

Adding Content to Your Vault

The scaffolded vault is intentionally minimal. To build it into a full site, add .md files to the vault directory — either by creating them manually or by pointing Obsidian at the folder. Kiln supports standard Obsidian features including wikilinks, tags, callouts, and math expressions out of the box.

You can also use an existing Obsidian vault instead of running init. Just pass its path to the generate command directly:

kiln generate --input ./my-existing-vault

Troubleshooting

If init reports that the vault directory already exists, either choose a different name with --input or remove the existing directory first. To check your vault for broken links before building, run the Doctor Command:

kiln doctor --input ./vault