explaingit

nightshade-research/lotus-tui

Analysis updated 2026-05-18

9OCamlAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

An OCaml terminal app for running executable code blocks in Obsidian's Lotus plugin, either connected to Obsidian or fully headless.

Mindmap

mindmap
  root((lotus-tui))
    What it does
      Terminal client for Lotus
      Runs code blocks
      Headless vault daemon
    Tech stack
      OCaml
      Dune opam
      lambda-term
    Use cases
      Run notes from terminal
      Server side vault
      Multi language execution
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Browse, edit, and run executable code blocks inside Obsidian Lotus notes from a terminal interface.

USE CASE 2

Serve a Markdown vault headlessly, without Obsidian open, so code blocks can run on a server.

USE CASE 3

Run code blocks written in many languages like Python, Rust, or Go by calling the matching local interpreter.

What is it built with?

OCamlDuneOPAM

How does it compare?

nightshade-research/lotus-tuiyyx990803/flowparaiconicity/meeps
Stars9416
LanguageOCamlOCamlOCaml
Last pushed2016-05-16
MaintenanceDormant
Setup difficultymoderatemoderatehard
Complexity3/52/55/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires OCaml's opam and dune toolchain, and either Obsidian with the Lotus plugin or a local vault for headless mode.

MIT license: use, modify, and distribute freely, including for commercial purposes, as long as the copyright notice is kept.

In plain English

Lotus TUI is an OCaml companion program for Lotus, an Obsidian plugin that lets people run executable code blocks embedded inside their Markdown notes. This project gives you a terminal based interface, a command line tool, and a background service, all of which talk to Lotus through the same local, signed API rather than through Obsidian's own interface. There are two main ways to use it. The normal path connects to Obsidian while it is open with the Lotus plugin's local API turned on, letting you browse notes, view code blocks, and run them from the terminal instead of clicking around inside Obsidian. The other path, called headless mode, runs entirely without Obsidian: Lotus TUI starts its own background daemon that serves a folder of Markdown notes directly, using the exact same API, so a note vault can be worked with from a server or a machine that never opens Obsidian at all. Once connected, the terminal interface lets you browse your notes, look at individual code blocks, edit them in a built in text editor, and run them, with a policy setting that controls whether the output of a run gets written back into the note or just shown on screen. Unsaved edits are automatically kept in a recovery folder so a draft is not lost if the program closes unexpectedly. The headless daemon can execute code blocks written in many languages, including Python, JavaScript, TypeScript, Ruby, Go, Rust, C, and several more, by calling out to whichever matching interpreter or compiler is already installed on the system. Every request between the terminal tool and the API is authenticated with a signed header built from a secret key, a timestamp, and a hash of the request body, checked using a comparison method designed to resist timing based attacks, and timestamps are only accepted within a five minute window. The project is installed and built using OCaml's package manager and build tool, and it is released under the MIT license.

Copy-paste prompts

Prompt 1
Walk me through connecting lotus-tui to Obsidian's Lotus local API for the first time.
Prompt 2
Explain the difference between run-only and write-replace write policies when running a block.
Prompt 3
Show me how to start lotus-tui in headless mode against a vault folder without Obsidian.
Prompt 4
List the keyboard shortcuts I need to run and edit a code block in the lotus-tui interface.

Frequently asked questions

What is lotus-tui?

An OCaml terminal app for running executable code blocks in Obsidian's Lotus plugin, either connected to Obsidian or fully headless.

What language is lotus-tui written in?

Mainly OCaml. The stack also includes OCaml, Dune, OPAM.

What license does lotus-tui use?

MIT license: use, modify, and distribute freely, including for commercial purposes, as long as the copyright notice is kept.

How hard is lotus-tui to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is lotus-tui for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.