Repoman is a command-line tool designed to automate the creation, modification, and management of Git repositories. I created it as I wanted to see how do-able it was to create legitimate looking commit history, but as you'll see with this repo(pay attention to the commit history and unhinged.log
), it sort of went off the rails a little bit.
It facilitates the generation of repositories with structured content, commits with backdated timestamps, and AI-generated commit messages to simulate realistic development activity. The tool can also modify commit history and rollback changes, making it useful for research, testing, and controlled environments.
- Dynamically generates repository names and descriptions.
- Structures repositories with predefined directories such as
scripts
,config
, anddocs
. - Creates essential files including
README.md
,.gitignore
, and sample scripts.
- Uses Ollama to generate realistic commit messages relevant to software development and the content within the repo.
- Modifies repository files to improve formatting, readability, and structure.
- Ensures commit messages are concise and meaningful without unnecessary AI-generated prefixes.
- Backdates commits randomly within a specified date range to create an aged repository history.
- Allows rollback of a specified number of commits to simulate version history changes.
- Ensures commit authorship details match predefined user configurations.
- Optionally creates remote repositories on GitHub using API authentication.
- Pushes repositories with structured commit histories and backdated commits.
- Uses force-pushing for rollback operations when modifying commit history.
- Python 3.7+
- Git installed on the system
- Ollama installed and configured
- A valid GitHub account (if pushing repositories remotely)
- Clone the repository:
git clone https://github.com/ZephrFish/repoman.git cd repoman
- Install dependencies:
pip install -r requirements.txt
- Create a
vars.toml
configuration file:
GITHUB_USERNAME = "USERNAME" # Username for whatever account you're writing to
GITHUB_TOKEN = "CLASSIC GIT TOKEN" # Get git token from developer settings in github
OLLAMA_MODEL = "llama2" # Change to "llama2", "gemma", etc.
GIT_USER_NAME = "GIT NAME" # Username variable for git config
GIT_USER_EMAIL = "EMAIL" # email variable for git config
To generate a specified number of repositories with AI-enhanced content:
python repoman.py --count 5
To update commit messages and structure using AI-generated improvements:
python repoman.py
To remove the last few commits from all repositories:
python repoman.py --rollback
For detailed logging and debugging output:
python repoman.py -v
- Generate 5 repositories:
python repoman.py --count 5
- Modify commit history and content:
python repoman.py
- Review commits:
git log --oneline --date=iso
- Push changes manually (if needed):
git push
- Software Development Simulation: Generate realistic repositories with structured commit histories.
- CTF Challenges: Create repositories containing hidden information or staged changes.
- Security Research: Test automated analysis tools on dynamic and structured repositories.
This tool is intended for educational and research purposes only. Use responsibly and ensure compliance with applicable guidelines and policies when modifying or pushing repositories.