An extensible CLI project automation tool.
lazykit is a command-line utility designed to streamline common project automation tasks, making project setup and maintenance more efficient. It provides built-in commands for generating boilerplate files like README.md and LICENSE, analyzing project structure, and is built with an extensible plugin architecture for future custom automations.
- Project Initialization: Quickly set up new projects with
lazykit init. - License Generation: Generate
LICENSEfiles for your project, supporting various open-source licenses (MIT, Apache, GPLv3, BSD, Creative Commons, etc.) withlazykit gen-license. - README Generation: Automatically generate
README.mdfiles based on project context usinglazykit gen-readme. - File Tree Visualization: Display your project's directory structure with
lazykit tree, allowing for exclusions. - Extensible Architecture: Easily extend with custom plugins to add new commands and workflows.
- Contextual Understanding: Utilizes project context (file trees, comments, metadata) to provide intelligent automation.
You can install lazykit directly from the cloned repository.
# 1. Clone the directory
git clone https://github.com/l4xp/lazykit.git
cd lazykit
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run or add lazykit/ to your shell PATH
python -m lazykit [OPTIONS]lazykit operates through a CLI interface with subcommands for specific tasks.
lazykit <command> [options]Initialize a lazykit project in the current directory or a specified path.
lazykit init [--path <DIR>]--path <DIR>: Directory to initialize lazykit in (defaults to current directory).
Generate a LICENSE file for your project.
lazykit gen-license [-c DIR] [-o FILE] [-t TYPE] [--overwrite]-c, --context-dir DIR: Directory to crawl for project context.-o, --output FILE: Output file path (default: LICENSE).-t, --type TYPE: License type (e.g., MIT, Apache, GPLv3).--overwrite: Overwrite existing license file if present.
Example:
lazykit gen-license -t MIT -o LICENSEGenerate a README.md file for your project.
lazykit gen-readme [-c DIR] [-o FILE] [--overwrite]-c, --context-dir DIR: Directory to crawl for project context.-o, --output FILE: Output path for README (default: README.md).--overwrite: Overwrite existing README if present.
Example:
lazykit gen-readme -o README.mdShow the project file tree, with support for exclusion.
lazykit tree [-c DIR] [-x [DIR ...]] [-X [FILE ...]] [-n] [-l]-c, --context-dir DIR: Directory to crawl.-x, --exclude-dir [DIR ...]: Directories to exclude.-X, --exclude-file [FILE ...]: Files to exclude.-n, --no-summary: Omit tree summary.-l, --list-only: List files without tree structure.
Example:
lazykit tree -x venv .git -X *.pyclazykit uses a configuration system (lazykit/core/config.py) to manage global and user-specific settings.
Example configurable settings:
- Default License Type: Preferred license for
gen-license. - LLM Provider and Model: Configure LLM features (e.g., OpenAI
gpt-4) for intelligent generation.
lazykit supports a plugin-based architecture. Plugins placed in the plugins/ directory can dynamically extend functionality.
- Each plugin can expose a
register()function to hook into the CLI. - Plugins can add new subcommands or modify existing behaviors.
lazykit/
├── commands/ # Built-in CLI commands (gen_license, gen_readme, init, tree)
├── core/ # Core business logic
│ ├── config.py # Config and path handling
│ ├── context.py # Project context (file trees, comments, metadata)
│ ├── extractors.py # Extracts content like docstrings
│ └── generator.py # File/template generation logic
├── docs/ # Documentation
├── plugins/ # User/developer plugins
├── templates/ # File templates
│ ├── license/ # License templates
│ └── readme/ # README templates
├── utils.py # Common helper functions
├── __init__.py # Package init
├── __main__.py # Entrypoint: `python -m lazykit`
├── .lazykitignore # Ignore rules for context crawling
├── cli.py # Main CLI parser
├── pyproject.toml # Build and metadata
└── requirements.txt # Python dependencies
Contributions are welcome!
To contribute:
- Fork the repository.
- Create a feature/bugfix branch.
- Implement changes and ensure tests pass.
- Submit a pull request with a clear description.
For significant changes, please open an issue for discussion first.
This project is licensed under the MIT License — see the LICENSE file for details.