Skip to main content

Modern Python CLI scaffolding tool for rapid development

Project description

kens-python-cli

Modern Python CLI scaffolding tool for rapid development. Create production-ready Python CLI applications with best practices, modern tooling, and beginner-friendly guides.

Features

  • ๐Ÿš€ Modern Python CLI - Built with Typer, Rich, and Pydantic
  • ๐Ÿ› ๏ธ Best Practices - Type hints, testing, linting, and formatting
  • ๐Ÿ”ง Developer Experience - Interactive prompts, beautiful output
  • ๐Ÿ“ฆ Cross-Platform - Works on Windows, macOS, and Linux
  • ๐Ÿค– Claude-Optimized - Special documentation for AI-assisted development
  • โšก Fast Setup - Uses uv for lightning-fast dependency management

Installation

# Run directly (recommended)
uvx kens-python-cli my-awesome-cli

# Or install globally
uv tool install kens-python-cli

Quick Start

# Create a new CLI project
uvx kens-python-cli my-cli-tool

# Navigate to project
cd my-cli-tool

# Install dependencies
uv sync

# Run your CLI
uv run my_cli_tool --help

Usage

Interactive Mode (Recommended)

uvx kens-python-cli

The tool will guide you through creating your CLI project with interactive prompts.

Non-Interactive Mode

uvx kens-python-cli my-cli-tool \
  --author "Your Name" \
  --email "your@email.com" \
  --python 3.11 \
  --async \
  --github-actions \
  --yes

Options

  • --author, -a - Author name
  • --email, -e - Author email
  • --python, -p - Python version (3.11, 3.12, 3.13)
  • --output, -o - Output directory
  • --template, -t - Template to use (default: "default")
  • --async - Use async/await patterns
  • --github-actions - Include GitHub Actions workflow
  • --no-tests - Skip testing setup
  • --no-docs - Skip documentation
  • --no-pre-commit - Skip pre-commit hooks
  • --yes, -y - Skip interactive prompts

What You Get

Project Structure

my-cli-tool/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ my_cli_tool/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ main.py              # CLI entry point
โ”‚       โ”œโ”€โ”€ config.py            # Configuration management
โ”‚       โ”œโ”€โ”€ commands/            # Command modules
โ”‚       โ”‚   โ”œโ”€โ”€ info.py         # System information
โ”‚       โ”‚   โ””โ”€โ”€ process.py      # File processing
โ”‚       โ””โ”€โ”€ utils/              # Utility functions
โ”‚           โ”œโ”€โ”€ logging.py      # Rich logging
โ”‚           โ””โ”€โ”€ helpers.py      # Helper functions
โ”œโ”€โ”€ tests/                      # Comprehensive test suite
โ”œโ”€โ”€ pyproject.toml             # Modern Python configuration
โ”œโ”€โ”€ README.md                  # Project documentation
โ”œโ”€โ”€ PROJECT_GUIDE.md          # Claude-optimized development guide
โ””โ”€โ”€ .gitignore                # Git ignore file

Tech Stack

  • Typer - Modern CLI framework
  • Rich - Beautiful terminal output
  • Pydantic - Data validation
  • uv - Ultra-fast package manager
  • Ruff - Lightning-fast linter
  • pytest - Testing framework
  • mypy - Static type checking

Generated Features

  • โœ… Interactive CLI with help, version, and configuration commands
  • โœ… Type-safe with full mypy support
  • โœ… Beautiful output with Rich progress bars, tables, and styling
  • โœ… Cross-platform file operations using pathlib
  • โœ… Comprehensive testing with pytest and coverage
  • โœ… Code quality with Ruff linting and formatting
  • โœ… Pre-commit hooks for automated quality checks
  • โœ… Documentation with examples and best practices
  • โœ… Claude-optimized development guide

Example Generated CLI

# Your generated CLI will have these commands
my-cli-tool --help
my-cli-tool hello --name "World"
my-cli-tool info system
my-cli-tool process files *.txt --recursive
my-cli-tool config --show

Development

Setup

# Clone the repository
git clone https://github.com/ken/kens-python-cli.git
cd kens-python-cli

# Install dependencies
uv sync --dev

# Install pre-commit hooks
uv run pre-commit install

Running Tests

# Run all tests
uv run pytest

# Run with coverage
uv run pytest --cov=kens_python_cli

# Run specific test file
uv run pytest tests/test_main.py

Code Quality

# Format code
uv run ruff format

# Lint code
uv run ruff check

# Type checking
uv run mypy src/kens_python_cli

Publishing

This project uses uv for publishing:

# Build the package
uv build

# Publish to PyPI
uv publish

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite
  6. Submit a pull request

License

MIT License - see LICENSE file for details.

Acknowledgments

  • Built with Typer by Sebastian Ramirez
  • Inspired by create-next-app for web development
  • Uses Rich by Will McGugan for beautiful terminal output

Create amazing Python CLI tools with modern best practices and AI-assisted development! ๐Ÿโœจ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kens_python_cli-0.1.2.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kens_python_cli-0.1.2-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file kens_python_cli-0.1.2.tar.gz.

File metadata

  • Download URL: kens_python_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.16

File hashes

Hashes for kens_python_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0aabce8e60735516b9c7b1a20785eb62f48799b3f2c4e27fb2bbacfdeb684a99
MD5 9afeb48a81fb88cf70f1e27ef70c7415
BLAKE2b-256 8aaefd488db01a86091c9bec036618819a50f1c96cb20091a2048f4477cc36cb

See more details on using hashes here.

File details

Details for the file kens_python_cli-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for kens_python_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ef31a63cb9db8bc2669fcfa8964a40fcce3057fb987f17087024b6759c6b125
MD5 7c118e9a5aaa8a6d1afd3dba38fa3703
BLAKE2b-256 f87690f8849dd53b12f5b93b51bc69962cfb61ea1258de6a68b7a94131502e59

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page