Catalog PyPI
PACKAGE EXPLORERView in registry

ai-code-summary

PyPI

This project automates the process of aggregating code files from a directory into a single markdown file, ready for use in an OpenAI Assistant or any RAG model. It intelligently skips files specified in the .gitignore and leverages ChatGPT to generate concise summaries for each code file, ensuring that the final markdown file is both comprehensive and easy to understand.

aiapiartificialautomationcodedataintelligenceopenaipythonsciencesummary
Versions collected1
Direct dependencies5From release 0.1.1
Last observed21 Oct, 10:13 UTC

README

Version 0.1.1 documentation

AI Code Summary

This project automates the process of aggregating code files from a directory into a single markdown file, ready for use in an OpenAI Assistant or any RAG model. It intelligently skips files specified in the .gitignore and leverages ChatGPT to generate concise summaries for each code file, ensuring that the final markdown file is both comprehensive and easy to understand.

Install through PyPI

pip install ai-code-summary

For more details, visit the PyPI project page.

Setup

  1. Clone the repository:
git clone https://github.com/DEV3L/ai-code-summary
cd ai-code-summary
  1. Copy the env.local file to a new file named .env and replace OPENAI_API_KEY with your actual OpenAI API key:
cp env.default .env
  1. Setup a virtual environment with dependencies and activate it:
brew install hatch
hatch env create
hatch shell

Environment Variables

The following environment variables can be configured in the .env file:

  • OPENAI_MODEL: The model to use
    • Default: gpt-4o
  • SUMMARY_PROMPT: The prompt used to summarize code files
    • Default: You are code summary expert. You summarize code in a short way that is easy to understand.

Testing

End to End Test

hatch run e2e

Unit Tests

hatch run test

Coverage Gutters:

Command + Shift + P => Coverage Gutters: Watch

Example

from ai_code_summary.markdown.export import create_markdown_from_code

if __name__ == "__main__":
    create_markdown_from_code(".")

Example output as a markdown file - ai-code-summary.md

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.124 Oct 20245

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
dev3l/ai-code-summary

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:13 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:f5a7a27e0b2a5320156ca0bc6765ca403b1689db5df809362207fb678d9b0621