Skip to main content

mkaireadme

An AI-powered CLI to generate professional README.md files in seconds.

PyPI Version Python Versions License: MIT Code style: black


mkaireadme is a cross-platform Python CLI that leverages the power of generative AI to create and maintain high-quality README.md files for any project. Stop writing documentation from scratch—let your code speak for itself.


✨ Visual Demo

Demo Image - a code block showing the tool in action

# Navigate to your project directory
$ cd my-awesome-project

# Run the generation command
$ mkaireadme gen --model google/gemini-flash-1.5

🤖 Analyzing project context...
🧠 Contacting google/gemini-flash-1.5 via OpenRouter...
📝 Writing README.md...

✅ Successfully created README.md!

📋 Table of Contents

✨ Key Features

  • 🧠 AI-Powered Generation: Uses state-of-the-art language models (via OpenRouter) to analyze your project and generate a tailored, comprehensive README.
  • 🌐 Cross-Platform Compatibility: Works seamlessly on Windows, macOS, and Linux.
  • 🔄 Smart Updates: Intelligently updates existing READMEs by injecting new content between markers, preserving your custom sections.
  • 🛠️ Deep Customization: Guide the AI with a simple .mkaireadme.yml file to specify project goals and custom instructions.
  • 📜 License Management: Includes built-in license generation (from a list of common templates) and automatic README integration.
  • 🤖 Flexible Model Selection: Browse and choose from dozens of AI models to find the perfect fit for your needs and budget.
  • 💰 Content Budgeting: Smartly analyzes large projects by prioritizing key files, ensuring you stay within the AI model's token limits.

🛠️ Tech Stack

  • Python 3.9+
  • Typer: Modern CLI framework for a great user experience.
  • Rich: Beautiful terminal styling, tables, and progress indicators.
  • OpenAI: Official library for robust AI integration via OpenRouter.
  • python-dotenv: Secure environment variable management.
  • pathspec: Gitignore-style file exclusion for precise context analysis.
  • PyYAML: Simple and clean configuration file handling.

🚀 Installation

Install mkaireadme directly from PyPI with a single command:

pip install mkaireadme

🏁 Getting Started

Get your first AI-generated README in just 3 simple steps.

Step 1: Set Your API Key

The tool requires an API key from OpenRouter to function. Set it once, and it will be saved locally for all future use.

mkaireadme set-key YOUR_OPENROUTER_API_KEY

Step 2: Create a License (Recommended)

A LICENSE file is crucial for any serious project. mkaireadme can create one for you.

mkaireadme license

This will prompt you to choose from a list of popular open-source licenses.

Step 3: Generate Your README!

Navigate to your project's root directory and run the gen command.

# Use the recommended Gemini Flash model
mkaireadme gen --model google/gemini-flash-1.5

That's it! Your new README.md is ready. To update it later after making changes to your project, just run the same command again.

📚 Command Reference

gen

The core command to generate or update the README.

Option Description Example
--model (Required) The AI model to use. anthropic/claude-3-haiku
--force-overwrite Replace the entire README, ignoring update markers. --force-overwrite
--debug Enable verbose logging for troubleshooting. --debug

models

Browse and search for available AI models on OpenRouter.

# Show a list of recommended models
mkaireadme models

# Search for a specific model provider or name
mkaireadme models llama

license

An interactive command to generate a LICENSE file for your project.

set-key

Securely saves your OpenRouter API key for future use.

⚙️ Configuration

For more control over the AI's output, create a .mkaireadme.yml file in your project's root directory.

# .mkaireadme.yml

# Provide high-level goals to guide the AI's description
project_goals: "To build a fast, lightweight, and user-friendly CLI tool for automating documentation."

# Give specific instructions to include in the AI prompt
custom_instructions: "Emphasize the cross-platform compatibility. Mention that it is open-source and contributions are welcome."

# Exclude files or directories from the analysis to save tokens
exclude:
  - "docs/"
  - "tests/"
  - "*.log"
  - "dist/"

🤝 Contributing

Contributions are welcome! Whether it's a bug report, a feature request, or a pull request, your input is valued. Please feel free to open an issue to discuss your ideas.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for mkaireadme 0.3.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 mkaireadme 0.3.2
File Size Uploaded
mkaireadme-0.3.2.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkaireadme 0.3.2
File Interpreter ABI Platform
mkaireadme-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / mkaireadme-0.3.2.tar.gz

Download URL mkaireadme-0.3.2.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
39941a016ba93ee774a05f7fe2d09467139215e0e05dcee9c5956c4cc07e7ad5
BLAKE2b-256 checksum
How to use checksums
bc65ac625ec27b09e99390801601ccaf629e8dacc152f07f337d1e4feab7146d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / mkaireadme-0.3.2-py3-none-any.whl

Download URL mkaireadme-0.3.2-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66abb31436ca85fa03bf4d54fc8bab0c0e24b06ec9160e56ea3cb662af86808a
BLAKE2b-256 checksum
How to use checksums
bfdd0011389e8d89575191b8d9d83d359e9c57b2fb49d86747b1d40b08e27b7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.2.1

2 release files

0.1.4

2 release files

0.1.0

1 release file

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