Skip to main content

An LLM-powered CLI to fix, format, and enhance Obsidian notes.

Project description

obsform

obsform (Obsidian Formatter) is an LLM-powered CLI tool designed to automatically clean, correct, and perfectly format your Obsidian notes.

Powered by Google's Gemini 1.5 Flash model, obsform acts as your personal editor. It fixes typos, corrects grammar, converts raw text into clean Markdown, and ensures all your mathematical formulas are perfectly rendered in Obsidian's specific LaTeX format.

Features

  • Smart Formatting: Fixes spelling, grammar, and punctuation without losing your personal voice.
  • Obsidian Native: Preserves your [[Internal Links]] and #tags.
  • Math Formatter: Automatically identifies mathematical equations and wraps them in Obsidian-compatible LaTeX ($ for inline, $$ for blocks).
  • Batch Processing: Pass a whole folder of notes, and it will process all .md and .txt files inside.
  • Interactive Diff View: See exactly what the LLM changed with a color-coded terminal diff before saving.
  • Format Conversion: Seamlessly converts plain .txt files into properly formatted .md Obsidian notes.
  • Secure & Local Setup: Stores your API key securely in a local config file so you only have to enter it once.

Installation

Install obsform globally using pip:

pip install obsform

Setup

Before using the tool, you need to provide a free Google Gemini API key. You can get one from Google AI Studio.

Run the setup command to save your key securely:

obsform setup

Usage

Processing a Single File

Process a note and save the output as a new file (e.g., note_processed.md):

obsform process my_note.md

Overwrite the original file with the corrected version:

obsform process my_note.md --replace

Batch Processing

Pass a directory to process all .md and .txt files inside it:

obsform process path/to/my/vault/folder/

Bypassing the Diff View

If you are batch-processing dozens of files and trust the LLM, use the --auto-approve (or -y) flag to skip the confirmation prompt:

obsform process path/to/folder/ --replace -y

Requirements

  • Python 3.9+
  • A valid Google Gemini API Key

License

MIT License

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

obsform-0.1.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

obsform-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for obsform-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b42075723d211637ac948c1e74afc292b1159805c27771f6ce9cc656ad5d1a66
MD5 aa2629c0f4fcf53f16b9f9ca235c13ce
BLAKE2b-256 62dd74071e4f2c87cbc355f7a2dcd133e2985da8cdab331286d450f39ea25224

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for obsform-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f53f944bdc2601979a06f7ae2404ec45d40163d14c7774048fa27544bab0928a
MD5 fe359bf21a31dc933a6130c8ee32a09d
BLAKE2b-256 41ae09db64b15a8c8d9b6f4cbee56e225b15f15a0918dc9405f8d5b300a92f26

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