A robust Python tool for creating and managing project structures with precision.
- ๐ฏ Create standardized Python projects with a single command
- ๐งฐ Multiple project templates (basic, CLI, and more)
- ๐ Automatic code formatting and structure validation
- โก Smart dependency management and virtual environment setup
- ๐ Project structure inspection and validation
- ๐ Built-in upgrade capabilities for existing projects
pip install project-forge
Create a new Python project:
project-forge new my-project --author "Your Name" --email "[email protected]"
Create a CLI project:
project-forge new my-cli --cli --author "Your Name" --email "[email protected]"
Format code in a project:
# Check formatting without making changes
project-forge format --check path/to/project
# Format project code
project-forge format path/to/project
# Force formatting on current directory
project-forge format --force .
Check project structure and configuration:
project-forge check path/to/project
# Check as CLI project
project-forge check path/to/project --type cli
new
: Create a new Python projectformat
: Format Python code in projectcheck
: Validate project structure and configurationtest
: Run project testsupgrade
: Upgrade project structure and dependencies
Projects created by Project Forge follow this structure:
my-project/
โโโ .github/
โโโ .github/
โ โโโ workflows/
โโโ .gitignore
โโโ src/
โ โโโ my_project/
โ โโโ __init__.py
โ โโโ core/
โโโ tests/
โ โโโ unit/
โ โโโ integration/
โโโ docs/
โโโ examples/
โโโ LICENSE
โโโ README.md
โโโ pyproject.toml
Configure default settings:
Projects created by Project-Forge with --cli flag follow this structure:
$ project-forge new my-cli --cli --author "thatch" --email "[email protected]"
โญโโโโโโโ Project Creation โโโโโโโโโฎ
โ Creating Python package: my-cli โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Project Structure:
my-cli/
โโโ .github/
โโโ .github/workflows/
โโโ .gitignore
โโโ LICENSE
โโโ README.md
โโโ docs/
โโโ examples/
โโโ pyproject.toml
โโโ src/
โโโ src/my_cli/
โโโ src/my_cli/cli/
โโโ tests/
โจ Project created successfully at /home/thatch/projects/my-cli
(venv) thatch@thatch:~/Dev/project_forge$ project-forge check ~/projects/my-cli --type cli
Checking cli project structure in /home/thatch/projects/my-cli...
Validation Results
โโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Status โ Message โ Details โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ ! โ Empty Examples directory โ Add content to: examples/ โ
โ ! โ Incomplete README.md โ Add section: Description โ
โ โ โ Missing recommended pyproject.toml fields โ Consider adding: โ
โ โ โ project.optional-dependencies.dev โ
โโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โจ Project validation passed!
- Clone the repository
git clone https://github.com/yourusername/project-forge.git
cd project-forge
- Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install development dependencies
pip install -e ".[dev]"
- Run tests
pytest tests/
MIT License - see LICENSE for details.