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
.basefile 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
If path is omitted, notekey 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
notekey init /path/to/vault/Projects/MyProject
This creates:
MyProject.baseMyProject.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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file notekey-0.1.0.tar.gz.
File metadata
- Download URL: notekey-0.1.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dd00bed344b79341f1628164fdd1ef0c87f7d945fbe4775f9a01b97a6389170
|
|
| MD5 |
8378407a226f5c18dfb86d85154f56a7
|
|
| BLAKE2b-256 |
5004494c09a07146901bfa5cf12b5cd47e1e52243cd15cb3c03e31853420459f
|
File details
Details for the file notekey-0.1.0-py3-none-any.whl.
File metadata
- Download URL: notekey-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93a7ad80830f79f67693d9e0c66bb7988c84be82b0a8f75d8cb2879136a0d8b3
|
|
| MD5 |
f1aa9cea4b36648454a7282b134b0a41
|
|
| BLAKE2b-256 |
0a9f26498efc853722dbb3a5b178a87e4396e7d91aaafb0382552d5822debd93
|