Kodify 0.1.9

dotnet add package Kodify --version 0.1.9
                    
NuGet\Install-Package Kodify -Version 0.1.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kodify" Version="0.1.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kodify" Version="0.1.9" />
                    
Directory.Packages.props
<PackageReference Include="Kodify" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Kodify --version 0.1.9
                    
#r "nuget: Kodify, 0.1.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Kodify@0.1.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Kodify&version=0.1.9
                    
Install as a Cake Addin
#tool nuget:?package=Kodify&version=0.1.9
                    
Install as a Cake Tool

Kodify

Kodify is an AI-powered .NET library that automates your project's documentation, code analysis, changelog generation, and visualization. It streamlines development workflows by enhancing standard project metadata with AI-curated explanations, intelligent code analysis using Roslyn.

.NET GitHub Actions License


Features

  • Automated Documentation Generation
    Generate comprehensive, user-focused README files using structured project data and AI-enhanced language. The documentation is built from source analysis and enhanced via the OpenAI API.

  • Changelog Automation
    Automatically generate curated changelogs by scanning Git commit history. Commit messages are processed to replace issue/PR references (like #123) with clickable GitHub links for improved traceability.

  • Static Code Analysis
    Leverage Roslyn to analyze your C# code, detect API controllers, extract key project structure details, and automatically detect license files.

  • Seamless Git Integration
    Automatically detect your project's Git repository; normalize remote URLs and, when applicable, integrate with GitHub to enrich commit messages with clickable links.

  • Customizable Content Generation
    Use the included ContentBuilder and ReadmeGenerator to either automatically generate structured documentation or compose manual content enhanced by AI.

  • OpenAI-Powered Enhancement
    Improve documentation language, structure, and consistency through customizable prompt templates and an integrated OpenAI service.


Installation

Install Kodify via the .NET CLI:

dotnet add package Kodify

Quick Start

1. Create an instance of an AI service

Use the OpenAIService to create an instance of the AI service which serves as your docs enhancer:

var aiConfig = new OpenAIConfig 
{ 
    ApiKey = "",
    Model = "gpt-4o-mini" 
};
var aiService = new OpenAIService(openAiConfig);

2. Generate your README file

Generate a README by combining analytical data with AI enhancement:

var markdownGenerator = new MarkdownGenerator(aiService);

// Generate a README file for your project
await markdownGenerator.GenerateReadMe("MyProject",
    "A concise summary that showcases the project's purpose, features, and value.",
    "Step-by-step usage instructions go here..." // Shortened, of course
);

3. Create a Changelog

Automatically generate a changelog that aggregates commit history:

// This invokes the ChangelogGenerator which creates a CHANGELOG.md in your project root
markdownGenerator.GenerateChangelog();
markdownGenerator.GenerateChangelog(aiService); // This overload uses the AI service to clean up messy commits, PRs and comments.

Detailed Usage

Documentation & Content Generation

  • Structured Content Building:
    The ContentBuilder compiles key details (e.g., API detection, licenses, and key features) into markdown, which is later enhanced by the AI.

  • Manual Content Customization:
    Not a fan of full automation? Use BuildManualContent from the ContentBuilder to create a more traditional README layout, then enhance with the AI service.

  • AI Enhancement:
    The ReadmeGenerator and MarkdownGenerator blend the raw content with prompt templates (defined in PromptTemplates.cs), resulting in user-friendly, production-ready documentation.

Changelog Generation

  • Commit Curation:
    The ChangelogGenerator groups changes by Git tags (or treats commit history as unreleased changes) and annotates commit messages. Issue references like #123 are automatically converted to clickable links when a GitHub repository is detected.

Code Analysis

  • CodeAnalyzer:
    Parses C# source files to generate a ProjectInfo object. It provides insights such as detected API controllers, directory structures, and license files.

Git Integration

  • GitRepositoryService & GitHubApiService:
    These services detect Git repositories, normalize URLs (removing any trailing .git), and optionally integrate with GitHub for enriching repository context and commit annotations.

Configuration & Customization

  • OpenAI API:
    Set up your OpenAIConfig by ensuring the OPENAI_API_KEY environment variable is properly configured.

  • Prompt & Template Customization:
    Edit PromptTemplates.cs to tailor the AI prompts to your desired tone and structure.

  • Advanced Settings:
    Extend classes like ContentBuilder and ReadmeGenerator to further customize the generated documentation and changelog to suit your project's style.


Project Resources

  • Source Code & Repository:
    GitHub Repository

  • License:
    Kodify is released under the MIT License. See LICENSE for more information.


Dependencies

  • LibGit2Sharp
  • Microsoft.CodeAnalysis (Roslyn)
  • OpenAI
  • Markdig
  • Newtonsoft.Json
  • Humanizer.Core
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Kodify:

Package Downloads
Kodify.Extensions

A sub-package including various extensions for the Kodify .NET library.

Kodify.DevOps

A Kodify sub-package including DevOps tools.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.9 247 2/24/2025
0.1.9-dev-0015 179 2/24/2025
0.1.8 196 2/22/2025
0.1.8-dev-0014 228 2/22/2025
0.1.8-dev-0013 150 2/22/2025
0.1.7 197 2/20/2025
0.1.7-dev-0012 130 2/20/2025
0.1.6 207 2/20/2025
0.1.6-dev-0011 155 2/20/2025
0.1.6-dev-0010 151 2/20/2025
0.1.6-dev-0009 162 2/19/2025
0.1.6-dev-0008 151 2/19/2025
0.1.5 167 2/19/2025
0.1.5-dev-0007 155 2/18/2025
0.1.5-dev-0006 159 2/18/2025
0.1.5-dev-0005 156 2/18/2025
0.1.5-dev-0004 150 2/18/2025
0.1.5-dev-0003 152 2/18/2025
0.1.5-dev-0002 138 2/18/2025
0.1.4-dev-0001 129 2/18/2025
Loading failed