Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

mdbase-cli

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdbase-cli

CLI tool for mdbase collections — validate, query, CRUD, and execute Obsidian .base files

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
595
-3.41%
Maintainers
1
Weekly downloads
 
Created
Source

mdbase-cli

Command-line tool for working with mdbase collections. Validates, queries, and performs CRUD operations on markdown document collections. Can also execute Obsidian .base files.

Install

Requires Node.js 22+ and the mdbase library.

git clone https://github.com/callumalpass/mdbase.git
git clone https://github.com/callumalpass/mdbase-cli.git
cd mdbase && npm ci && cd ..
cd mdbase-cli && npm ci && npm run build

The CLI is available as mdbase via the bin entry, or run directly with:

node dist/cli.js

Usage

mdbase <command> [options]

Global option:

  • -C, --collection <alias> Run a command against a registered collection alias (from mdbase collections add).

Core commands

CommandDescription
validateValidate documents against their type schemas
queryQuery documents with filters and sorting
readRead a single document by path or ID
createCreate a new document
updateUpdate an existing document
deleteDelete a document
renameRename a document
typesList or inspect registered types

Obsidian Bases

CommandDescription
base runExecute an Obsidian .base file

Additional commands

CommandDescription
initInitialize a new mdbase collection
lintLint documents for common issues
fmtFormat document frontmatter
exportExport documents to CSV or JSON
importImport documents from CSV or JSON
graphShow link graph between documents
statsPrint collection statistics
watchWatch for file changes and re-validate
diffShow differences between document versions
schemaGenerate or inspect type schemas
collectionsManage named collection registry entries

Fuzzy picker

mdbase-fzf provides an interactive two-step picker powered by fzf:

  • Choose a type (includes untype for files without a type).
  • Browse matching files with key fields (display/title-style fields are prioritized), preview, then open in your editor.

Requirements: fzf and jq on PATH.

mdbase-fzf

Examples

Validate all documents in the current directory:

mdbase validate .

Query documents of a given type:

mdbase query "status = published" --types note --sort created --limit 10

Execute an Obsidian .base file:

mdbase base run my-view.base

Export to CSV:

mdbase export . --type note --format csv -o notes.csv

Initialize and register a collection alias:

mdbase init --register work

List markdown files from all registered collections:

mdbase collections files --format paths

Example applications

ProjectDescription
mdbase-workoutsWorkout tracker with chat interface, built on mdbase

Spec

mdbase-cli implements the mdbase specification.

License

MIT

FAQs

Package last updated on 28 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts