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.