nilrag-man: Semantic Man Page Search with nilRAG

By Anton Pyrogovskyi3 minutes read

Table of Contents

Ever found yourself struggling to remember the exact tar flag you need? Or flipping through man pages trying to find the right section for a lesser-known Unix command? Enter nilrag-man, a Python-based proof of concept built with Nillion’s privacy-preserving stack that brings the power of semantic search to local manpage content — all while keeping your data private and secure.

What is nilrag-man?

nilrag-man is a script that uses:

Together, they enable you to search and query local man pages semantically, so instead of memorizing flags or exact keywords, you can just ask questions like a human.

How It Works

Here’s a quick overview of how nilrag-man functions under the hood:

  1. Indexing: It parses and ingests your system’s local man pages, chunking and embedding the content into nilDB via nilRAG.
  2. Private Storage: All the indexed data is stored securely using nilDB.
  3. Semantic Search: When you ask a question (e.g., “how do I recursively change file permissions?”), nilRAG retrieves the most relevant chunks.
  4. Answer Generation: Finally, nilAI synthesizes a helpful answer, combining manpage data with semantic context.

This approach shows how you can use RAG-based agents in a completely private, decentralized environment.

Example Usage

$ ./main.py --prompt "how do I copy directories recursively?"

Output:

To copy directories recursively, use the -r or -R flag with cp:
    cp -r source_directory destination_directory
This tells cp to copy directories and their contents.

No more scrolling through man cp or trial-and-error guessing!

Setup instructions are in the repo.

Why Use nilDB/nilRAG?

Traditional RAG setups typically rely on third-party APIs and cloud-hosted vector databases. nilrag-man flips the script by proving that RAG can be locally-driven, secure and private:

A Proof of Concept with Potential

While nilrag-man is a prototype, it demonstrates something powerful: you can build practical AI assistants for your own data, without sacrificing privacy. Whether you’re a power user, developer, or just sick of re-Googling awk flags, this could be the beginning of a new way to interact with your tools. It’s not just about making man pages easier to use — it’s a glimpse into what’s possible when semantic search meets decentralized, privacy-respecting AI.