Skip to main content

TNH Scholar README

TNH Scholar is a human-centered research project for the study and exploration of the teachings of Thích Nhất Hạnh, the Plum Village tradition, and the broader Buddhist tradition. It is grounded in mindful human–AI collaboration, with an emphasis on transparency, authenticity, and care.

Vision & Aspiration

TNH Scholar aspires to make the teachings of Thích Nhất Hạnh, the Plum Village tradition, and the broader Buddhist tradition more accessible, discoverable, and researchable. It explores how AI can support deep study, translation, navigation, and content processing, while also opening new possibilities for the collaborative development of the software and research workflows behind that work. Our vision is to keep human discernment, scholarly care, contemplative use, and mindful human–AI collaboration at the center.

Features

TNH Scholar is currently in active prototyping. Key capabilities:

  • Audio and transcript processing: audio-transcribe with diarization and YouTube support
  • Text formatting and translation: tnh-gen CLI for punctuation, translation, sectioning, and prompt-driven processing. See ADR-TG01 and ADR-TG02 for architecture details. See the Thầy Edited Journal Text Case Study for a fully worked OCR-to-translation example.
  • Acquisition utilities: ytt-fetch for transcripts; token-count and nfmt for prep and planning
  • Setup and configuration: tnh-setup plus guided config in Getting Started
  • Agent orchestration bootstrap: maintained tnh-conductor local/headless workflow runner for bounded worktree-backed bootstrap flows
  • Prompt system: See ADRs under docs/architecture/prompt-system/index.md for decisions and roadmap

⚠️ Rapid Prototype Phase (0.x): TNH Scholar is in active development with no backward compatibility guarantees. Breaking changes may occur in ANY 0.x release (including patches). Pin to a specific version if stability is needed: pip install tnh-scholar==0.3.1. See ADR-PP01 for versioning policy.

Quick Start

Installation (PyPI)

pip install tnh-scholar
tnh-setup

Prerequisites: Python 3.12.4+, OpenAI API key (CLI tools), Google Vision (optional OCR), pip or Poetry.

Development setup (from source)

Follow DEV_SETUP.md for the full workflow. Short version:

pyenv install 3.12.4
poetry config virtualenvs.in-project true
make setup-dev    # Full dev environment (recommended)
make build-all    # Full rebuild (poetry update, yt-dlp, pipx, docs)
make pipx-build   # Install CLI tools globally (audio-transcribe, tnh-gen, etc.)

Set OpenAI credentials

export OPENAI_API_KEY="your-api-key"

Example usage

Transcribe Audio from YouTube:

audio-transcribe --yt_url "https://youtube.com/watch?v=example" --split --transcribe

Download Video Transcripts:

ytt-fetch "https://youtube.com/watch?v=example" -l en -o transcript.txt

Process Text with tnh-gen:

# List available prompts
tnh-gen list

# Run a prompt on a file
tnh-gen run --prompt translate --input-file input.txt --var source_language=vi --var target_language=en

Getting Started

  • Practitioners: Install, configure credentials, and follow the Quick Start Guide; workflows live in the User Guide.
  • Developers: Set up via DEV_SETUP.md and Contributing; review System Design and the CLI docs; run make docs to view locally.
    • Project Philosophy & Vision: Developers and researchers should review the conceptual foundations in docs/project/vision.md, docs/project/philosophy.md, docs/project/principles.md, and docs/project/conceptual-architecture.md to understand the system’s long-term direction and design intent.
  • Researchers: Explore Research for experiments and direction in the study of Thích Nhất Hạnh, Plum Village, and broader Buddhist materials; see Architecture for pipelines/ADRs (e.g., ADR-K01).

Documentation Overview

Comprehensive documentation is available in multiple formats:

Documentation Structure

Architecture Overview

Development

Common commands:

  • make setup-dev - Full development environment setup
  • make build-all - Full rebuild (poetry update, yt-dlp, pipx tools, docs)
  • make update - Update dependencies and reinstall pipx tools
  • make pipx-build - Install CLI tools globally via pipx (editable mode)
  • make test, make lint, make format - Testing and code quality
  • make docs, make ci-check - Documentation and CI validation
  • poetry run mypy src/ - Type checking

CLI Tool Access:

All CLI tools can be installed globally via pipx for easy access in any shell:

make pipx-build  # Installs: audio-transcribe, tnh-gen, ytt-fetch, token-count, nfmt, etc.

Optional dependency groups (development only): tnh-scholar[ocr], tnh-scholar[gui], tnh-scholar[query], tnh-scholar[dev]

Troubleshooting and workflows: DEV_SETUP.md

Contributing

See CONTRIBUTING.md for coding standards, testing expectations, and PR workflow. We welcome contributions from practitioners, developers, and scholars who resonate with a human-centered, mindful, transparent, and careful approach to AI-supported research.

Project Status

TNH Scholar is currently in alpha stage (v0.3.1), preparing a 0.4.0 bootstrap-oriented minor release. Expect ongoing API and workflow changes during active development.

Support & Community

Documentation Map

For an auto-generated list of every document (titles and metadata), see the Documentation Index.

License

This project is licensed under the GPL-3.0 License.


For more information, visit the full documentation or explore the source code.

Release files for tnh-scholar 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tnh-scholar 0.4.2
File Size Uploaded
tnh_scholar-0.4.2.tar.gz 354.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tnh-scholar 0.4.2
File Interpreter ABI Platform
tnh_scholar-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 874.3 kB

Release files / tnh_scholar-0.4.2.tar.gz

Download URL tnh_scholar-0.4.2.tar.gz
Size 354.6 kB
Tags Source
SHA-256 checksum
How to use checksums
87c28c8b1c0b668bcbcf0e0989e73260512787e0e763b903d3aed318d4e2cf59
BLAKE2b-256 checksum
How to use checksums
82ec604d68360669c60322f0eaf2334468deaeed8d588385ba5a920915557e2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.4 CPython/3.12.4 Darwin/24.6.0

Release files / tnh_scholar-0.4.2-py3-none-any.whl

Download URL tnh_scholar-0.4.2-py3-none-any.whl
Size 519.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a428f5f873dce45aa61437b4571c3513e66a8b6b77d82bb442f8716ad64471ea
BLAKE2b-256 checksum
How to use checksums
e6db6e6f2be8a9e5ae68f20d7319b7172aa5766efc4220297c0d0afa4a61d802
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.4 CPython/3.12.4 Darwin/24.6.0

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page