This is a fork with some enhancements of RepoAgent, thanks to them for nice job. Please refer to Original repo for additional information.
With this project you can generate good looking documentation for your python project just in one click!
- 📝 Multi-step generation approach provides more precise results.
- 🔍 Generation both of python files and module summaries
- 📚 Docstring generation instead fixed markdown pages.
- 🤖 Integration with mkdocs makes documentation more flexible for changes
Install the repoagent package directly using pip using this source repo:
pip install repoagent@git+https://github.com/valer1435/RepoAgentBefore configuring specific parameters for RepoAgent, please ensure that the OpenAI API is configured as an environment variable in the command line:
export OPENAI_API_KEY=YOUR_API_KEY # on Linux/Mac
set OPENAI_API_KEY=YOUR_API_KEY # on Windows
$Env:OPENAI_API_KEY = "YOUR_API_KEY" # on Windows (PowerShell)Enter the root directory of RepoAgent and try the following command in the terminal:
repoagent run #this command will generate doc, or update docs(pre-commit-hook will automatically call this)
repoagent run --print-hierarchy # Print how repo-agent parse the target repoThe run command supports the following optional flags (if set, will override config defaults):
- -m,- --modelTEXT: Specifies the model to use for completion. Default:- gpt-3.5-turbo
- -t,- --temperatureFLOAT: Sets the generation temperature for the model. Lower values make the model more deterministic. Default:- 0.2
- -r,- --request-timeoutINTEGER: Defines the timeout in seconds for the API request. Default:- 60
- -b,- --base-urlTEXT: The base URL for the API calls. Default:- https://api.openai.com/v1
- -tp,- --target-repo-pathPATH: The file system path to the target repository. Used as the root for documentation generation. Default:- path/to/your/target/repository
- -hp,- --hierarchy-pathTEXT: The name or path for the project hierarchy file, used to organize documentation structure. Default:- .project_doc_record
- -mdp,- --markdown-docs-pathTEXT: The folder path where Markdown documentation will be stored or generated. Default:- markdown_docs
- -i,- --ignore-listTEXT: A list of files or directories to ignore during documentation generation, separated by commas.
- -l,- --languageTEXT: The ISO 639 code or language name for the documentation. Default:- Chinese
- -ll,- --log-level[DEBUG|INFO|WARNING|ERROR|CRITICAL]: Sets the logging level for the application. Default:- INFO
You can also try the following feature
repoagent clean # Remove repoagent-related cache
repoagent diff # Check what docs will be updated/generated based on current code changeIf it's your first time generating documentation for the target repository, RepoAgent will automatically create a JSON file maintaining the global structure information and a folder named Markdown_Docs in the root directory of the target repository for storing documents.
Once you have initially generated the global documentation for the target repository, or if the project you cloned already contains global documentation information, you can then seamlessly and automatically maintain internal project documentation with your team by configuring the pre-commit hook in the target repository!
You also can use mkdocs mkdocs gh-deploy command to automatically deploy documentation on gh-pages. For example docuemtation for this repo is fully AI-generated by RepoAgent+ https://valer1435.github.io/RepoAgent/
Project is in developing stage, so some features may just not work :) If you see any problem - please make an issue.