Skip to content

Latest commit

 

History

History
89 lines (64 loc) · 2.53 KB

README.md

File metadata and controls

89 lines (64 loc) · 2.53 KB

📝 NixMkDoc: Simple and Fast Nix Documentation

NixMkDoc is a lightweight tool written in Golang designed to make documenting your Nix files effortless. It scans your .nix files, finds options defined with lib.mkOption, and automatically generates a Markdown file with all the details you need.

Originally created to help with the documentation for the Neve Project, NixMkDoc is perfect for anyone who wants an easy way to document their Nix projects without hassle.

✨ Why Use NixMkDoc?

  • Easy to Use: No complicated setup. Just point it to a file or directory, and it does the work for you.
  • Automatic Documentation: Extracts key details such as:
    • Full option name
    • Type and default value
    • Description
    • Examples (if available)
  • Markdown Output: Ready to use in GitHub, README files, or other documentation platforms.

🚀 How Does It Work?

Installation

Using Nix

If you have Nix installed, you can run NixMkDoc directly from the repository:

nix run github:Neve-Project/nixmkdoc -- --help

Without Nix (Manual Build)

  1. Install Go.
  2. Clone the repository:
    git clone https://github.com/Neve-Project/nixmkdoc.git
    cd nixmkdoc
  3. Build the executable:
    go build .
  4. Run the program:
    ./nixmkdoc --help

How to Use

NixMkDoc works through simple commands. You can:

  • Scan a directory with --dir or -d:
    ./nixmkdoc --dir /path/to/nix/project
  • Document a single file with --file or -f:
    ./nixmkdoc --file /path/to/file.nix
  • Use --help or -h to see all available options:
    ./nixmkdoc --help

Once executed, NixMkDoc creates a file called options.md in the current directory, containing all the extracted documentation.


🤝 Contribute!

Do you have an idea to improve NixMkDoc? Want to add a new feature? Contributing is easy:

  1. Fork the repository.
  2. Create a branch for your changes:
    git checkout -b feature-your-feature-name
  3. Submit a pull request.

Every suggestion or contribution is welcome!

📜 License

NixMkDoc is distributed under the GPL v2 license. For more details, see the LICENSE file.

💬 Questions or Issues?

Open an issue on the official repository:
Neve-Project/nixmkdoc

Thank you for choosing NixMkDoc! 🎉 Making Nix documentation as simple as it should be.