Professional Python CLI scaffolding tool for modern development
npm install kens-pythontools๐ A create-t3-app-style interactive CLI for scaffolding modern Python CLI tools
kens-pythontools is a powerful project generator that creates production-ready Python CLI applications with modern best practices, secure dependencies, and professional tooling built-in. Inspired by create-t3-app, it provides an opinionated foundation while remaining flexible for your specific needs.
- โก Modern CLI Frameworks - Choose from Typer, Click, or argparse
- ๐จ Beautiful Terminal Output - Rich formatting with colors and progress bars
- ๐ฆ Multiple Package Managers - Support for Poetry, pip, and Pipenv
- ๐ Security First - Latest secure dependencies with vulnerability scanning
- ๐งช Testing Ready - Pytest setup with coverage reporting
- ๐ Code Quality - Ruff, Black, and MyPy pre-configured
- ๐ CI/CD Included - GitHub Actions workflow ready to go
- ๐ Comprehensive Logging - Structured logging with Loguru
- โ๏ธ Configuration Support - TOML, YAML, or JSON config files
- ๐ HTTP Client - Modern async HTTP client with httpx
- ๐ฏ Type Safe - Full type hints throughout
``bash`
npx kens-pythontools
`bashInstall
pip install kens-pythontools
$3
`bash
Install
poetry add --dev kens-pythontoolsCreate new project
poetry run kens-pythontools my-awesome-cli
`Interactive Setup
kens-pythontools guides you through setting up your project with smart questions:
1. Project Name - What to call your CLI tool
2. CLI Framework - Typer (recommended), Click, or argparse
3. Package Manager - Poetry (recommended), pip, or Pipenv
4. Optional Features - Rich output, config files, logging, HTTP client, etc.
5. Development Tools - Testing, linting, pre-commit hooks, CI/CD
6. Git Integration - Initialize repository and install dependencies
Generated Project Structure
`
my-awesome-cli/
โโโ src/
โ โโโ my_awesome_cli/
โ โโโ __init__.py
โ โโโ main.py # Main CLI entry point
โ โโโ cli/ # CLI commands
โ โโโ core/ # Core business logic
โโโ tests/ # Test files
โโโ docs/ # Documentation
โโโ .github/workflows/ # CI/CD workflows
โโโ pyproject.toml # Project configuration
โโโ README.md
โโโ LICENSE
`Technology Choices
$3
- Typer - Modern, type-safe, auto-documented (recommended)
- Click - Mature, widely-used, highly configurable
- argparse - Standard library, minimal dependencies
$3
- Poetry - Modern dependency management with lock files (recommended)
- pip - Traditional pip with requirements.txt
- Pipenv - Pipfile-based workflow
$3
- Rich - Beautiful terminal output with colors and formatting
- Loguru - Structured logging with rotation and filtering
- httpx - Modern async HTTP client for API calls
- Configuration - TOML, YAML, or JSON config file support
- File Watching - Watch files for changes with watchdog
- Async Support - Full async/await compatibility
$3
- pytest - Testing framework with fixtures and plugins
- ruff - Lightning-fast linting (replaces flake8, isort, etc.)
- black - Opinionated code formatting
- mypy - Static type checking
- pre-commit - Git hooks for code quality
- GitHub Actions - CI/CD with testing and publishing
Example Usage
After creating a project:
`bash
cd my-awesome-cliInstall dependencies (Poetry)
poetry install && poetry shellRun your CLI
my-awesome-cli --help
my-awesome-cli hello --name "World"Development commands
poetry run pytest # Run tests
poetry run black . # Format code
poetry run ruff check # Lint code
poetry run mypy . # Type check
`Non-Interactive Mode
For automation and CI/CD:
`bash
Use defaults
kens-pythontools my-project --non-interactiveSpecify project name only
kens-pythontools my-project -y
`Requirements
- Python 3.10+
- Git (for repository initialization)
- Poetry, pip, or Pipenv (depending on choice)
Why kens-pythontools?
$3
- โ Setup Friction - No more hours spent configuring tools
- โ Security Vulnerabilities - Always uses latest secure dependencies
- โ Inconsistent Structure - Follows Python packaging best practices
- โ Missing Tooling - Includes testing, linting, and CI/CD setup
- โ Poor Documentation - Generates comprehensive README and docs
$3
- โ
Professional Quality - Production-ready code from day one
- โ
Modern Stack - Uses current Python ecosystem best practices
- โ
Flexible Foundation - Easy to extend without fighting the structure
- โ
Security First - Regular dependency updates with vulnerability scanning
- โ
Developer Experience - Beautiful CLI with helpful guidance
Contributing
1. Fork the repository
2. Create a feature branch (
git checkout -b feature/amazing-feature)
3. Make your changes
4. Run tests and linting (poetry run pytest && poetry run ruff check)
5. Commit your changes (git commit -m 'Add amazing feature')
6. Push to the branch (git push origin feature/amazing-feature)
7. Open a Pull RequestDevelopment
`bash
Clone the repository
git clone https://github.com/kenkai/kens-pythontools.git
cd kens-pythontoolsInstall dependencies
poetry installRun tests
poetry run pytestTest the CLI locally
poetry run kens-pythontools test-project
``MIT License - see LICENSE file for details.
- Inspired by create-t3-app - the gold standard for project scaffolding
- Built with Typer for the CLI interface
- Uses Rich for beautiful terminal output
- Powered by Cookiecutter for templating
---
Happy coding! ๐โจ