Skip to main content

An AI-powered README.md generator for local projects.

Project description

Docify AI 🚀: Intelligent Documentation & Test Generation for Your Code

PyPI - Version PyPI - Python Version Downloads

A versatile AI-powered command-line tool for instantly generating comprehensive README.md files, pytest tests, Dockerfiles, and GitHub Actions CI/CD workflows for your local projects, powered by Google Gemini and OpenAI GPT models.

Key Features ✨

  • 🤖 AI-Powered Content Generation: Leverages large language models (Google Gemini and OpenAI GPT) to write human-quality README.md files, pytest tests, Dockerfiles, and GitHub Actions CI/CD workflows.
  • 💡 Versatile Output Formats: Generate comprehensive project documentation, runnable unit tests, containerization configurations, or automation workflows.
  • 📂 Intelligent Project Analysis: Scans your project directory, intelligently ignoring irrelevant files and directories (configurable with --ignore-dirs and --ignore-exts), to deeply understand its purpose, technologies, and structure.
  • ⚙️ Flexible AI Client Selection: Seamlessly choose between Google Gemini and OpenAI GPT models for content generation directly from the command line.
  • 🔑 Robust API Key Management: Supports API keys via environment variables or direct command-line arguments for both Gemini and OpenAI for enhanced security and convenience.
  • 🚀 Fast Project Scaffolding: Bootstrap new Python projects with an intelligent, AI-generated initial structure using the --init option.
  • 📝 Docstring Automation: Automatically generate and insert Google-style docstrings for Python modules, classes, and functions using the --docstring option.
  • ⏱️ Rapid Generation: Transform a nascent project or an existing codebase into a fully documented, tested, and deployable application in moments.
  • 🔧 Highly Customizable: Specify project paths, output file names, and tailor content generation with various command-line options.

Installation 📦

Docify-AI is available on PyPI and can be installed on any system with Python 3.8 or newer using pip.

pip install docify-ai

Usage 🚀

Using Docify-AI is straightforward, involving a one-time API key setup and a simple command execution.

1. Set Your API Key

Docify-AI requires an API key for the chosen AI model (Google Gemini or OpenAI). You can obtain a free key from Google AI Studio for Gemini, or from the OpenAI platform for OpenAI.

Once you have your key, set it as an environment variable:

  • For Google Gemini: GEMINI_API_KEY
  • For OpenAI: OPENAI_API_KEY

For macOS / Linux (bash/zsh):

export GEMINI_API_KEY='your-gemini-secret-api-key'
# OR
export OPENAI_API_KEY='your-openai-secret-api-key'

(To make this permanent across terminal sessions, add the line to your shell's configuration file, e.g., ~/.zshrc or ~/.bashrc.)

For Windows (PowerShell):

$Env:GEMINI_API_KEY="your-gemini-secret-api-key"
# OR
$Env:OPENAI_API_KEY="your-openai-secret-api-key"

Alternatively, you can pass the API key directly via the --key argument, which will override the environment variable.

2. Run Docify-AI

Navigate to the root directory of the project you wish to document and simply run the docify command. By default, it uses the Gemini model to generate a README.

docify

The tool will scan the current directory and generate a README.md file with AI-powered content.

Command-Line Options

You can customize the behavior of Docify-AI using the following command-line arguments:

  • --path <directory> / -p <directory>: Specifies the root directory of the project to be analyzed. Defaults to the current working directory (.).
  • --output <filename_or_dir> / -o <filename_or_dir>: Defines the name of the output file or directory. Defaults: README.md for docs, tests/ for tests, Dockerfile for Docker, .github/workflows/ci.yml for GitHub Actions, or the modified file for docstring generation.
  • --client <openai|gemini> / -c <openai|gemini>: Choose the AI client to use for generation. Options are openai or gemini (default: gemini). Case-insensitive.
  • --key <your-api-key> / -k <your-api-key>: Provide your API key directly. This will take precedence over environment variables.
  • --test / -t: Generate pytest test files instead of a README.
  • --docker: Generate a Dockerfile for the project.
  • --gha: Generate a GitHub Actions (CI/CD) workflow.
  • --init <project_name>: Bootstrap a new Python project with the given project name, creating a basic scaffold.
  • --docstring <file_path>: Add Google-style docstrings to a specified Python file (relative path from current directory).
  • --ignore-dirs <dir1> <dir2>...: A space-separated list of directory names to ignore during scanning (e.g., .git __pycache__ node_modules).
  • --ignore-exts <ext1> <ext2>...: A space-separated list of file extensions to ignore (e.g., .tmp .pyc .log).

Examples:

  1. To document a project located at /path/to/my-other-project and save the output to PROJECT_DOCS.md using the default Gemini model:

    docify --path /path/to/my-other-project --output PROJECT_DOCS.md
    
  2. To use the OpenAI client for README generation:

    docify --client openai
    
  3. To use the OpenAI client and provide the API key directly (overriding any environment variable):

    docify --client openai --key sk-YOUR_OPENAI_API_KEY
    
  4. To generate pytest tests for the current project using the Gemini client, ignoring dist and build directories:

    docify --test --client gemini --ignore-dirs dist build
    
  5. To generate a Dockerfile for the current project:

    docify --docker
    
  6. To generate a GitHub Actions workflow for the current project:

    docify --gha
    
  7. To initialize a new Python project named my_new_app:

    docify --init my_new_app
    
  8. To add docstrings to my_module.py in the current directory:

    docify --docstring my_module.py
    

1.5.0 - 2025-09-05

  • 📝 Added --docstring option to automatically generate PEP 257–compliant docstrings for Python functions, classes, and modules.

1.4.0 - 2025-08-28

  • Added --docker , --gha and --init options, to generate the project aware Dockerfile, Github Actions worflow Yaml file and to generate a project structure for a python project.

1.3.0 - 2025-08-22

  • Added --ignore-dirs and --ignore-exts option, to ignore the irrelevant or unwanted directories and files to generate the docs/readme or tests.

1.2.0 - 2025-08-21

  • Added -t or --test option, to generate pytest supported test directory including test modules for all the features of your project.

1.1.1 - 2025-08-20

  • fixed project description not visible issue

1.1.0 - 2025-08-20

  • ✨ Added support for OpenAI + Gemini clients
  • 🛠 Added --key argument to provide api key, without setting it as environment variable.
  • 🔍 Case-insensitive --client option

1.0.0 - 2025-08-15

  • 🚀 Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docify_ai-1.5.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docify_ai-1.5.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file docify_ai-1.5.0.tar.gz.

File metadata

  • Download URL: docify_ai-1.5.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for docify_ai-1.5.0.tar.gz
Algorithm Hash digest
SHA256 8b4829e2e996b8f58afc36583e5213e1546b4c278136cb61ad8903499e0440c1
MD5 6dfd373415daf0b77b652ebe2e948e33
BLAKE2b-256 5c641aa79a7ef66e0b84eca232be8ca04540746cfc2f45c255c567c0ee3a1019

See more details on using hashes here.

File details

Details for the file docify_ai-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: docify_ai-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for docify_ai-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37387f6c8b82fd395029534969a00aad6c680c6cd22cac4c5cb239d5465cb325
MD5 5e7be53ef69e7c26510385b0c2e3cdcf
BLAKE2b-256 db9d749030bdb6f11f547c74a5f21254f4bea505c20ea23e61b4ae5aeab3748e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page