Skip to main content

CLI utilities for Obsidian vault notes: initialize note bases, search markdown files, and read note content.

Project description

notekey

CLI utilities for working with Markdown notes in an Obsidian vault.

notekey can:

  • initialize a folder with an Obsidian .base file and a matching Markdown note
  • search vault notes by tag, filename, or content
  • read a single note by filename or path match

Requirements

  • Python 3.11+
  • An Obsidian vault directory containing a .obsidian/ folder

Installation

After the package is published to PyPI:

pip install notekey

Usage

notekey init [path]
notekey search [path] [--tags TAGS] [--filename NAME] [--content TEXT]
notekey read FILENAME

For init, omitting path uses the current directory.

For search and read, omitting path uses the OBSIDIAN_VAULT environment variable. If that variable is not set, it uses the current directory.

export OBSIDIAN_VAULT="/path/to/your/vault"

Initialize a note folder

cd /path/to/vault/Projects/MyProject
notekey init

Or pass the target folder explicitly:

notekey init /path/to/vault/Projects/MyProject

This creates:

  • MyProject.base
  • MyProject.md

Add extra base filters with comma-separated tags:

notekey init /path/to/vault/Projects/MyProject --tags python,docs

Overwrite existing generated files with:

notekey init /path/to/vault/Projects/MyProject --force

Search notes

Search by tag:

notekey search --tags python

Search by multiple tags. Files must match all tags:

notekey search --tags python,web

Search by filename:

notekey search --filename flask

Search by content:

notekey search --content pandas

Use = for exact matches:

notekey search --tags "=python"
notekey search --filename "=deep/hidden-note"

Read a note

notekey read flask-app

For an exact filename match:

notekey read "=flask-app"

Development

Run tests with:

pytest

Build distribution files with:

python -m build

Upload is intentionally manual. Use TestPyPI or PyPI with your API token when ready.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notekey-0.1.1.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

notekey-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file notekey-0.1.1.tar.gz.

File metadata

  • Download URL: notekey-0.1.1.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for notekey-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dafade4571f9842286ea1bd72dc907a3074fd8f451c4dafb622d3a64f0a1cc5d
MD5 a2382533d938762e8191b278c87676ee
BLAKE2b-256 f28ea2e2b0153e420cd57b56b4948cde47fd8c9733343ac2c205be473526c6d1

See more details on using hashes here.

File details

Details for the file notekey-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: notekey-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for notekey-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8cdac686b0759c1259805451cd3e6cc352c99cfa633784e89edaafc837b11c14
MD5 e14a066cc11e29eaace60a8088a56cd9
BLAKE2b-256 fd29c7393c0b1c6d73c88c9216ae77ae75bae555c0e0bc6ff67361b51d39a9ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page