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.0.tar.gz (21.0 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.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for kens_python_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd3eae1183f07a4dafd4014d55f5b29326fed7993dabda269c2aa16233ca2be6
MD5 d891db914870d44e7e5cdd49057d764f
BLAKE2b-256 b3544911fd6f582ee390a1a67046d16d4ba74be72e1d6692129b2bdf8d821c25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kens_python_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa02da9bbb57c9511e0664f7ffa9bdaf2dbece92992af9023705ca5ec3bf880d
MD5 a1eede87e3b1e0d98a515532c7102fa1
BLAKE2b-256 e2933c29e06bd944545476e47e24ebe8d2ccbdd111b766bc225678dff61e5c25

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