vault

Section-aware Markdown CLI for inspecting, reading, and atomically modifying structured notes.

UtilitiesDaily useCode: not public yet

What it does

Working with large structured Markdown documents in automated workflows often leads to corrupted formatting or unintended modifications when using naive text replacements. vault provides a command-line tool for reading and appending to specific sections of Markdown files without requiring an Obsidian MCP server. It parses heading hierarchies while ignoring headers inside code fences, resolves section titles fuzzily or with hierarchical path breadcrumbs, preserves original line endings, and applies updates atomically. This enables AI agents and local scripts to safely inspect document outlines, read targeted sections, and append updates to notes.

  • Generates an outline map of document headings with line numbers and section sizes.
  • Extracts and prints only the specified section, optionally omitting child subsections.
  • Appends text received via standard input to the end of a targeted section.
  • Searches documents for patterns and displays each match alongside its containing section.
  • Handles heading navigation with parent-child disambiguation and accent-insensitive matching.

Commands

CommandWhat it does
vault mapa notes.md --nivel 2Prints an outline of headings with line numbers and section sizes up to level 2.
vault seccion notes.md "Log" --sin-hijosPrints only the specified section without its child headings.
vault anexar notes.md "Projects > Tasks" --crearAppends standard input text to the end of the section, creating it if missing.
vault buscar notes.md "temperature"Finds pattern matches in the file, indicating which section contains each match.

Design principles

  • Atomic writes: guarantees document integrity during concurrent or scripted updates.
  • Syntax awareness: ignores markdown headings located inside code blocks.
  • Line-ending preservation: automatically detects and preserves existing LF or CRLF endings.

Built with

Python

Works with

Markdown notes