pipu-cli


Namepipu-cli JSON
Version 0.1.dev7 PyPI version JSON
download
home_pageNone
SummaryA cute Python package updater
upload_time2025-11-06 23:35:37
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords pip pipu package updater package management
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img src=".assets/pipu.png" alt="pipu logo" width="300"/>
</p>

# pipu

**Author:** Scott Arne Johnson ([sajohn2@gmail.com](mailto:sajohn2@gmail.com))

A powerful and user-friendly Python package updater with advanced constraint handling, beautiful TUI, and intelligent version management. Keep your Python packages up-to-date while maintaining stability through smart constraint enforcement.

## โœจ Key Features

- ๐ŸŽฎ **Interactive TUI** - Beautiful terminal interface with keyboard navigation and real-time feedback
- ๐ŸŽฏ **Smart Constraints** - Automatic constraint discovery and enforcement to prevent breaking updates
- ๐Ÿšซ **Flexible Ignoring** - Exclude packages from updates with environment-specific rules
- ๐Ÿ“Š **Rich Output** - Color-coded tables showing constraints, versions, and update safety
- ๐Ÿ” **Pre-release Support** - Optional inclusion of alpha, beta, and RC versions
- โš™๏ธ **Configurable** - 10+ environment variables for advanced customization
- ๐Ÿ”’ **Safe Updates** - Thread-safe operations with guaranteed resource cleanup
- ๐ŸŒ **Cross-Platform** - Full support for Windows, macOS, and Linux

## ๐Ÿš€ Quick Start

### Installation

```bash
# Install in editable mode for development
pip install --config-settings editable_mode=compat -e ".[dev]"
```

### Basic Usage

```bash
# Launch interactive TUI (recommended)
pipu

# List outdated packages
pipu list

# Update all packages with confirmation
pipu update

# Auto-update without prompting
pipu update --yes
```

That's it! For most users, just running `pipu` will give you everything you need.

## ๐Ÿ“– Detailed Usage

### Commands Overview

| Command | Description | Example |
|---------|-------------|---------|
| `pipu` | Launch interactive TUI | `pipu` |
| `pipu list` | List outdated packages | `pipu list --pre` |
| `pipu update` | Update packages (with confirmation) | `pipu update --yes` |
| `pipu constrain` | Manage version constraints | `pipu constrain "requests<3.0"` |
| `pipu ignore` | Manage ignored packages | `pipu ignore setuptools pip` |

### Interactive TUI Mode

The TUI is the easiest way to manage updates. Just run `pipu` with no arguments.

**Navigation:**
- **โ†‘/โ†“** - Navigate packages
- **Space** - Toggle package selection
- **A** - Select all packages
- **N** - Deselect all packages
- **Enter** - Confirm and update selected packages
- **Esc/Q** - Cancel and exit
- **H** - Show help

**Visual Indicators:**
- โœ“ Green checkmark = Selected for update
- ๐ŸŸข Green constraint = Safe to update
- ๐Ÿ”ด Red constraint = Update blocked by constraint
- โšซ Gray dash (-) = No constraint

### Command-Line Mode

For automation and scripting, use command-line mode:

```bash
# List outdated packages
pipu list

# Include pre-releases (alpha, beta, rc)
pipu list --pre

# Update with confirmation prompt
pipu update

# Update without confirmation (for scripts)
pipu update --yes

# Update including pre-releases
pipu update --pre --yes
```

### Managing Constraints

Constraints prevent packages from updating beyond specific versions, ensuring stability.

**Add Constraints:**
```bash
# Single constraint
pipu constrain "requests>=2.25.0,<3.0.0"

# Multiple constraints
pipu constrain "numpy>=1.20.0" "pandas<2.0.0" "django~=4.1.0"

# Environment-specific (for conda/venv/poetry environments)
pipu constrain "pytest>=7.0.0" --env development
```

**List Constraints:**
```bash
# All constraints
pipu constrain --list

# Environment-specific
pipu constrain --list --env production
```

**Remove Constraints:**
```bash
# Remove specific packages
pipu constrain --remove requests numpy

# Remove from specific environment
pipu constrain --remove django --env production

# Remove ALL constraints (prompts for confirmation)
pipu constrain --remove-all

# Skip confirmation
pipu constrain --remove-all --yes
```

**Auto-Discovery:**

Pipu automatically discovers constraints from your installed packages' dependencies. For example, if `deprecated==1.2.10` depends on `wrapt<2`, pipu will automatically constrain `wrapt<2` and show "deprecated>1.2.10" as the trigger. These auto-constraints are temporary and removed when no longer needed.

### Managing Ignored Packages

Ignored packages are completely excluded from update checks.

**Add Ignores:**
```bash
# Ignore packages globally
pipu ignore setuptools pip wheel

# Environment-specific ignores
pipu ignore pytest black mypy --env development
```

**List Ignores:**
```bash
pipu ignore --list
pipu ignore --list --env production
```

**Remove Ignores:**
```bash
pipu ignore --remove setuptools wheel
pipu ignore --remove-all
pipu ignore --remove-all --yes  # Skip confirmation
```

## โš™๏ธ Configuration

### Environment Variables

Customize pipu's behavior with environment variables:

**Network Settings:**
```bash
export PIPU_TIMEOUT=30              # Network timeout (default: 10s)
export PIPU_RETRIES=3               # Retry attempts (default: 0)
export PIPU_MAX_NETWORK_ERRORS=3    # Max consecutive errors (default: 1)
export PIPU_RETRY_DELAY=1.0         # Delay between retries (default: 0.5s)
```

**Subprocess Settings:**
```bash
export PIPU_SUBPROCESS_TIMEOUT=60   # Subprocess timeout (default: 30s)
export PIPU_UNINSTALL_TIMEOUT=180   # Uninstall timeout (default: 120s)
export PIPU_FORCE_KILL_TIMEOUT=10   # Force kill timeout (default: 5s)
```

**Caching & Logging:**
```bash
export PIPU_CACHE_TTL=120           # Cache lifetime (default: 60s)
export PIPU_LOG_LEVEL=DEBUG         # Logging level (default: WARNING)
```

**Example: Slow Network Configuration**
```bash
# For slow or unreliable networks
export PIPU_TIMEOUT=60
export PIPU_RETRIES=5
export PIPU_RETRY_DELAY=2.0
pipu update --yes
```

### Pip Configuration Integration

Pipu seamlessly integrates with pip's configuration files:

**Linux/macOS:**
- `~/.config/pip/pip.conf` (user-specific)
- `~/.pip/pip.conf` (legacy)
- `/etc/pip.conf` (system-wide)

**Windows:**
- `%APPDATA%\pip\pip.ini` (user-specific)
- `C:\ProgramData\pip\pip.ini` (system-wide)

**Example Configuration:**
```ini
[global]
index-url = https://pypi.org/simple/
trusted-host = pypi.org

# Global constraints
constraints =
    requests>=2.25.0,<3.0.0
    numpy>=1.20.0
    django>=4.1.0,<5.0.0

# Global ignores
ignores = pip setuptools wheel

[development]
# Development-specific constraints
constraints =
    pytest>=7.0.0
    black>=22.0.0
    mypy>=1.0.0

ignores =
    requests
    numpy
```

## ๐Ÿ“š Advanced Topics

### Constraint Sources (Priority Order)

Pipu checks these sources in order:

1. **`PIP_CONSTRAINT` environment variable**
   ```bash
   export PIP_CONSTRAINT=/path/to/constraints.txt
   ```

2. **Pip config - Environment-specific section**
   ```ini
   [myenv]  # Detected from conda/venv/poetry
   constraints = /path/to/constraints.txt
   ```

3. **Pip config - Global section**
   ```ini
   [global]
   constraints = /path/to/constraints.txt
   ```

4. **Project root** (legacy fallback)
   ```
   your-project/
   โ”œโ”€โ”€ pyproject.toml  # or setup.py
   โ””โ”€โ”€ constraints.txt
   ```

5. **Auto-discovered constraints** (from installed packages)
   - Automatically detected from package dependencies
   - Temporary and self-cleaning
   - Displayed with "Invalid When" trigger information

### Constraint File Format

```txt
# Web frameworks
requests>=2.25.0,<3.0.0
django>=4.1.0,<5.0.0
flask~=2.0.0

# Data science
numpy>=1.20.0
pandas>=1.5.0,!=1.5.1
scipy>=1.9.0,!=1.9.1,<2.0.0

# Comments and empty lines are ignored
matplotlib==3.6.0  # Exact version
```

### Constraint Operators

| Operator | Description | Example |
|----------|-------------|---------|
| `==1.0.0` | Exact version | `requests==2.28.0` |
| `>=1.0.0` | Minimum version | `numpy>=1.20.0` |
| `<=2.0.0` | Maximum version | `django<=4.2.0` |
| `>1.0.0,<2.0.0` | Version range | `flask>2.0,<3.0` |
| `~=1.4.0` | Compatible version | `black~=22.0` |
| `!=1.5.1` | Exclude version | `pandas!=1.5.1` |

### Environment Detection

Pipu automatically detects your Python environment:

- **Conda/Mamba/Micromamba**: Uses `$CONDA_DEFAULT_ENV`
- **Poetry**: Runs `poetry env info --name`
- **Virtualenv/venv**: Uses basename of `$VIRTUAL_ENV`

This enables environment-specific constraints and ignores.

### Invalidation Triggers

Pipu supports automatic constraint removal when packages are updated. Useful for temporary constraints:

```bash
# Add constraint with trigger
pipu constrain "wrapt<2" --invalidation-triggers "deprecated>1.2.10"

# When deprecated is updated to >1.2.10, wrapt constraint is automatically removed
pipu update deprecated

# Manually check and clean invalid constraints
pipu constrain --list  # Shows triggers
```

## ๐ŸŽจ Output Examples

### List Command Output

```
                    Outdated Packages
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Package      โ”ƒ Version โ”ƒ Latest  โ”ƒ Type  โ”ƒ Constraint โ”ƒ Invalid When     โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ requests     โ”‚ 2.28.0  โ”‚ 2.31.0  โ”‚ wheel โ”‚ -          โ”‚ -                โ”‚
โ”‚ numpy        โ”‚ 1.19.5  โ”‚ 1.24.3  โ”‚ wheel โ”‚ >=1.20.0   โ”‚ -                โ”‚
โ”‚ wrapt        โ”‚ 1.14.0  โ”‚ 2.0.0   โ”‚ wheel โ”‚ <2         โ”‚ deprecated>1.2.10โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

**Color Coding:**
- ๐ŸŸข **Green** = Constraint satisfied, safe to update
- ๐Ÿ”ด **Red** = Constraint violated, update blocked
- โšซ **Gray dash** = No constraint

## ๐Ÿ”ง Development

### Running Tests

```bash
# All tests (422 tests)
pytest tests/ -v

# Specific test categories
pytest tests/test_constraints.py -v
pytest tests/test_cli.py -v
pytest tests/test_tui_usability.py -v

# With coverage
pytest tests/ --cov=pipu_cli --cov-report=html
```

### Building

```bash
# Install build dependencies
pip install build

# Build distribution
python -m build

# Install locally
pip install dist/pipu_cli-*.whl
```

### Code Quality

The codebase includes:
- โœ… Thread-safe operations
- โœ… Cross-platform compatibility
- โœ… Comprehensive error handling
- โœ… Type hints on key functions
- โœ… Extensive test coverage (422 tests)
- โœ… Resource cleanup guarantees

## ๐Ÿค Common Workflows

### Workflow 1: First-Time Setup

```bash
# 1. Install pipu
pip install -e .

# 2. Check what's outdated
pipu list

# 3. Use interactive mode to select packages
pipu

# 4. Add constraints for critical packages
pipu constrain "django>=4.1,<5.0" "numpy>=1.20"

# 5. Update everything else
pipu update --yes
```

### Workflow 2: CI/CD Pipeline

```bash
# Increase timeouts for CI environments
export PIPU_TIMEOUT=60
export PIPU_RETRIES=3
export PIPU_CACHE_TTL=300

# Check for outdated packages
pipu list

# Update with auto-approval
pipu update --yes
```

### Workflow 3: Development Environment

```bash
# Create dev-specific constraints
pipu constrain "pytest>=7.0" --env development
pipu ignore requests numpy --env development

# Update only development packages
pipu update --yes
```

### Workflow 4: Production Environment

```bash
# Strict constraints for production
pipu constrain "requests==2.28.0" --env production
pipu constrain "django~=4.1.0" --env production

# List what would be updated (without updating)
pipu list

# Only update when ready
pipu update --yes
```

## ๐Ÿ“‹ Troubleshooting

### Common Issues

**Slow Package Checks:**
```bash
# Increase timeout and enable retries
export PIPU_TIMEOUT=30
export PIPU_RETRIES=3
pipu list
```

**Network Errors:**
```bash
# Enable debug logging
export PIPU_LOG_LEVEL=DEBUG
pipu list
```

**Terminal Display Issues:**
```bash
# The TUI handles terminal cleanup automatically
# If issues persist, pipu resets terminal state on exit
```

**Package Not Found:**
```bash
# Check if package is in your pip indexes
pip search package-name

# Check your pip configuration
pip config list
```

## ๐Ÿ“„ License

MIT License - see LICENSE file for details.

---

**Made with โค๏ธ for Python developers who want safe, smart package updates.**

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pipu-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "pip, pipu, package, updater, package management",
    "author": null,
    "author_email": "Scott Arne Johnson <scott.arne.johnson@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "<p align=\"center\">\n  <img src=\".assets/pipu.png\" alt=\"pipu logo\" width=\"300\"/>\n</p>\n\n# pipu\n\n**Author:** Scott Arne Johnson ([sajohn2@gmail.com](mailto:sajohn2@gmail.com))\n\nA powerful and user-friendly Python package updater with advanced constraint handling, beautiful TUI, and intelligent version management. Keep your Python packages up-to-date while maintaining stability through smart constraint enforcement.\n\n## \u2728 Key Features\n\n- \ud83c\udfae **Interactive TUI** - Beautiful terminal interface with keyboard navigation and real-time feedback\n- \ud83c\udfaf **Smart Constraints** - Automatic constraint discovery and enforcement to prevent breaking updates\n- \ud83d\udeab **Flexible Ignoring** - Exclude packages from updates with environment-specific rules\n- \ud83d\udcca **Rich Output** - Color-coded tables showing constraints, versions, and update safety\n- \ud83d\udd0d **Pre-release Support** - Optional inclusion of alpha, beta, and RC versions\n- \u2699\ufe0f **Configurable** - 10+ environment variables for advanced customization\n- \ud83d\udd12 **Safe Updates** - Thread-safe operations with guaranteed resource cleanup\n- \ud83c\udf10 **Cross-Platform** - Full support for Windows, macOS, and Linux\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\n# Install in editable mode for development\npip install --config-settings editable_mode=compat -e \".[dev]\"\n```\n\n### Basic Usage\n\n```bash\n# Launch interactive TUI (recommended)\npipu\n\n# List outdated packages\npipu list\n\n# Update all packages with confirmation\npipu update\n\n# Auto-update without prompting\npipu update --yes\n```\n\nThat's it! For most users, just running `pipu` will give you everything you need.\n\n## \ud83d\udcd6 Detailed Usage\n\n### Commands Overview\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `pipu` | Launch interactive TUI | `pipu` |\n| `pipu list` | List outdated packages | `pipu list --pre` |\n| `pipu update` | Update packages (with confirmation) | `pipu update --yes` |\n| `pipu constrain` | Manage version constraints | `pipu constrain \"requests<3.0\"` |\n| `pipu ignore` | Manage ignored packages | `pipu ignore setuptools pip` |\n\n### Interactive TUI Mode\n\nThe TUI is the easiest way to manage updates. Just run `pipu` with no arguments.\n\n**Navigation:**\n- **\u2191/\u2193** - Navigate packages\n- **Space** - Toggle package selection\n- **A** - Select all packages\n- **N** - Deselect all packages\n- **Enter** - Confirm and update selected packages\n- **Esc/Q** - Cancel and exit\n- **H** - Show help\n\n**Visual Indicators:**\n- \u2713 Green checkmark = Selected for update\n- \ud83d\udfe2 Green constraint = Safe to update\n- \ud83d\udd34 Red constraint = Update blocked by constraint\n- \u26ab Gray dash (-) = No constraint\n\n### Command-Line Mode\n\nFor automation and scripting, use command-line mode:\n\n```bash\n# List outdated packages\npipu list\n\n# Include pre-releases (alpha, beta, rc)\npipu list --pre\n\n# Update with confirmation prompt\npipu update\n\n# Update without confirmation (for scripts)\npipu update --yes\n\n# Update including pre-releases\npipu update --pre --yes\n```\n\n### Managing Constraints\n\nConstraints prevent packages from updating beyond specific versions, ensuring stability.\n\n**Add Constraints:**\n```bash\n# Single constraint\npipu constrain \"requests>=2.25.0,<3.0.0\"\n\n# Multiple constraints\npipu constrain \"numpy>=1.20.0\" \"pandas<2.0.0\" \"django~=4.1.0\"\n\n# Environment-specific (for conda/venv/poetry environments)\npipu constrain \"pytest>=7.0.0\" --env development\n```\n\n**List Constraints:**\n```bash\n# All constraints\npipu constrain --list\n\n# Environment-specific\npipu constrain --list --env production\n```\n\n**Remove Constraints:**\n```bash\n# Remove specific packages\npipu constrain --remove requests numpy\n\n# Remove from specific environment\npipu constrain --remove django --env production\n\n# Remove ALL constraints (prompts for confirmation)\npipu constrain --remove-all\n\n# Skip confirmation\npipu constrain --remove-all --yes\n```\n\n**Auto-Discovery:**\n\nPipu automatically discovers constraints from your installed packages' dependencies. For example, if `deprecated==1.2.10` depends on `wrapt<2`, pipu will automatically constrain `wrapt<2` and show \"deprecated>1.2.10\" as the trigger. These auto-constraints are temporary and removed when no longer needed.\n\n### Managing Ignored Packages\n\nIgnored packages are completely excluded from update checks.\n\n**Add Ignores:**\n```bash\n# Ignore packages globally\npipu ignore setuptools pip wheel\n\n# Environment-specific ignores\npipu ignore pytest black mypy --env development\n```\n\n**List Ignores:**\n```bash\npipu ignore --list\npipu ignore --list --env production\n```\n\n**Remove Ignores:**\n```bash\npipu ignore --remove setuptools wheel\npipu ignore --remove-all\npipu ignore --remove-all --yes  # Skip confirmation\n```\n\n## \u2699\ufe0f Configuration\n\n### Environment Variables\n\nCustomize pipu's behavior with environment variables:\n\n**Network Settings:**\n```bash\nexport PIPU_TIMEOUT=30              # Network timeout (default: 10s)\nexport PIPU_RETRIES=3               # Retry attempts (default: 0)\nexport PIPU_MAX_NETWORK_ERRORS=3    # Max consecutive errors (default: 1)\nexport PIPU_RETRY_DELAY=1.0         # Delay between retries (default: 0.5s)\n```\n\n**Subprocess Settings:**\n```bash\nexport PIPU_SUBPROCESS_TIMEOUT=60   # Subprocess timeout (default: 30s)\nexport PIPU_UNINSTALL_TIMEOUT=180   # Uninstall timeout (default: 120s)\nexport PIPU_FORCE_KILL_TIMEOUT=10   # Force kill timeout (default: 5s)\n```\n\n**Caching & Logging:**\n```bash\nexport PIPU_CACHE_TTL=120           # Cache lifetime (default: 60s)\nexport PIPU_LOG_LEVEL=DEBUG         # Logging level (default: WARNING)\n```\n\n**Example: Slow Network Configuration**\n```bash\n# For slow or unreliable networks\nexport PIPU_TIMEOUT=60\nexport PIPU_RETRIES=5\nexport PIPU_RETRY_DELAY=2.0\npipu update --yes\n```\n\n### Pip Configuration Integration\n\nPipu seamlessly integrates with pip's configuration files:\n\n**Linux/macOS:**\n- `~/.config/pip/pip.conf` (user-specific)\n- `~/.pip/pip.conf` (legacy)\n- `/etc/pip.conf` (system-wide)\n\n**Windows:**\n- `%APPDATA%\\pip\\pip.ini` (user-specific)\n- `C:\\ProgramData\\pip\\pip.ini` (system-wide)\n\n**Example Configuration:**\n```ini\n[global]\nindex-url = https://pypi.org/simple/\ntrusted-host = pypi.org\n\n# Global constraints\nconstraints =\n    requests>=2.25.0,<3.0.0\n    numpy>=1.20.0\n    django>=4.1.0,<5.0.0\n\n# Global ignores\nignores = pip setuptools wheel\n\n[development]\n# Development-specific constraints\nconstraints =\n    pytest>=7.0.0\n    black>=22.0.0\n    mypy>=1.0.0\n\nignores =\n    requests\n    numpy\n```\n\n## \ud83d\udcda Advanced Topics\n\n### Constraint Sources (Priority Order)\n\nPipu checks these sources in order:\n\n1. **`PIP_CONSTRAINT` environment variable**\n   ```bash\n   export PIP_CONSTRAINT=/path/to/constraints.txt\n   ```\n\n2. **Pip config - Environment-specific section**\n   ```ini\n   [myenv]  # Detected from conda/venv/poetry\n   constraints = /path/to/constraints.txt\n   ```\n\n3. **Pip config - Global section**\n   ```ini\n   [global]\n   constraints = /path/to/constraints.txt\n   ```\n\n4. **Project root** (legacy fallback)\n   ```\n   your-project/\n   \u251c\u2500\u2500 pyproject.toml  # or setup.py\n   \u2514\u2500\u2500 constraints.txt\n   ```\n\n5. **Auto-discovered constraints** (from installed packages)\n   - Automatically detected from package dependencies\n   - Temporary and self-cleaning\n   - Displayed with \"Invalid When\" trigger information\n\n### Constraint File Format\n\n```txt\n# Web frameworks\nrequests>=2.25.0,<3.0.0\ndjango>=4.1.0,<5.0.0\nflask~=2.0.0\n\n# Data science\nnumpy>=1.20.0\npandas>=1.5.0,!=1.5.1\nscipy>=1.9.0,!=1.9.1,<2.0.0\n\n# Comments and empty lines are ignored\nmatplotlib==3.6.0  # Exact version\n```\n\n### Constraint Operators\n\n| Operator | Description | Example |\n|----------|-------------|---------|\n| `==1.0.0` | Exact version | `requests==2.28.0` |\n| `>=1.0.0` | Minimum version | `numpy>=1.20.0` |\n| `<=2.0.0` | Maximum version | `django<=4.2.0` |\n| `>1.0.0,<2.0.0` | Version range | `flask>2.0,<3.0` |\n| `~=1.4.0` | Compatible version | `black~=22.0` |\n| `!=1.5.1` | Exclude version | `pandas!=1.5.1` |\n\n### Environment Detection\n\nPipu automatically detects your Python environment:\n\n- **Conda/Mamba/Micromamba**: Uses `$CONDA_DEFAULT_ENV`\n- **Poetry**: Runs `poetry env info --name`\n- **Virtualenv/venv**: Uses basename of `$VIRTUAL_ENV`\n\nThis enables environment-specific constraints and ignores.\n\n### Invalidation Triggers\n\nPipu supports automatic constraint removal when packages are updated. Useful for temporary constraints:\n\n```bash\n# Add constraint with trigger\npipu constrain \"wrapt<2\" --invalidation-triggers \"deprecated>1.2.10\"\n\n# When deprecated is updated to >1.2.10, wrapt constraint is automatically removed\npipu update deprecated\n\n# Manually check and clean invalid constraints\npipu constrain --list  # Shows triggers\n```\n\n## \ud83c\udfa8 Output Examples\n\n### List Command Output\n\n```\n                    Outdated Packages\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Package      \u2503 Version \u2503 Latest  \u2503 Type  \u2503 Constraint \u2503 Invalid When     \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 requests     \u2502 2.28.0  \u2502 2.31.0  \u2502 wheel \u2502 -          \u2502 -                \u2502\n\u2502 numpy        \u2502 1.19.5  \u2502 1.24.3  \u2502 wheel \u2502 >=1.20.0   \u2502 -                \u2502\n\u2502 wrapt        \u2502 1.14.0  \u2502 2.0.0   \u2502 wheel \u2502 <2         \u2502 deprecated>1.2.10\u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n**Color Coding:**\n- \ud83d\udfe2 **Green** = Constraint satisfied, safe to update\n- \ud83d\udd34 **Red** = Constraint violated, update blocked\n- \u26ab **Gray dash** = No constraint\n\n## \ud83d\udd27 Development\n\n### Running Tests\n\n```bash\n# All tests (422 tests)\npytest tests/ -v\n\n# Specific test categories\npytest tests/test_constraints.py -v\npytest tests/test_cli.py -v\npytest tests/test_tui_usability.py -v\n\n# With coverage\npytest tests/ --cov=pipu_cli --cov-report=html\n```\n\n### Building\n\n```bash\n# Install build dependencies\npip install build\n\n# Build distribution\npython -m build\n\n# Install locally\npip install dist/pipu_cli-*.whl\n```\n\n### Code Quality\n\nThe codebase includes:\n- \u2705 Thread-safe operations\n- \u2705 Cross-platform compatibility\n- \u2705 Comprehensive error handling\n- \u2705 Type hints on key functions\n- \u2705 Extensive test coverage (422 tests)\n- \u2705 Resource cleanup guarantees\n\n## \ud83e\udd1d Common Workflows\n\n### Workflow 1: First-Time Setup\n\n```bash\n# 1. Install pipu\npip install -e .\n\n# 2. Check what's outdated\npipu list\n\n# 3. Use interactive mode to select packages\npipu\n\n# 4. Add constraints for critical packages\npipu constrain \"django>=4.1,<5.0\" \"numpy>=1.20\"\n\n# 5. Update everything else\npipu update --yes\n```\n\n### Workflow 2: CI/CD Pipeline\n\n```bash\n# Increase timeouts for CI environments\nexport PIPU_TIMEOUT=60\nexport PIPU_RETRIES=3\nexport PIPU_CACHE_TTL=300\n\n# Check for outdated packages\npipu list\n\n# Update with auto-approval\npipu update --yes\n```\n\n### Workflow 3: Development Environment\n\n```bash\n# Create dev-specific constraints\npipu constrain \"pytest>=7.0\" --env development\npipu ignore requests numpy --env development\n\n# Update only development packages\npipu update --yes\n```\n\n### Workflow 4: Production Environment\n\n```bash\n# Strict constraints for production\npipu constrain \"requests==2.28.0\" --env production\npipu constrain \"django~=4.1.0\" --env production\n\n# List what would be updated (without updating)\npipu list\n\n# Only update when ready\npipu update --yes\n```\n\n## \ud83d\udccb Troubleshooting\n\n### Common Issues\n\n**Slow Package Checks:**\n```bash\n# Increase timeout and enable retries\nexport PIPU_TIMEOUT=30\nexport PIPU_RETRIES=3\npipu list\n```\n\n**Network Errors:**\n```bash\n# Enable debug logging\nexport PIPU_LOG_LEVEL=DEBUG\npipu list\n```\n\n**Terminal Display Issues:**\n```bash\n# The TUI handles terminal cleanup automatically\n# If issues persist, pipu resets terminal state on exit\n```\n\n**Package Not Found:**\n```bash\n# Check if package is in your pip indexes\npip search package-name\n\n# Check your pip configuration\npip config list\n```\n\n## \ud83d\udcc4 License\n\nMIT License - see LICENSE file for details.\n\n---\n\n**Made with \u2764\ufe0f for Python developers who want safe, smart package updates.**\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A cute Python package updater",
    "version": "0.1.dev7",
    "project_urls": null,
    "split_keywords": [
        "pip",
        " pipu",
        " package",
        " updater",
        " package management"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bd3911c26f70070456bfdce9ca76439f6600fda60e4f341aa19323df574f3f63",
                "md5": "7c88582b8b49376a1b53c1ec4e200c4b",
                "sha256": "48b374438e9dc4e8646a43ba20544cf92510a4478d28b3cc481ee5b021facb1f"
            },
            "downloads": -1,
            "filename": "pipu_cli-0.1.dev7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7c88582b8b49376a1b53c1ec4e200c4b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 73971,
            "upload_time": "2025-11-06T23:35:37",
            "upload_time_iso_8601": "2025-11-06T23:35:37.261339Z",
            "url": "https://files.pythonhosted.org/packages/bd/39/11c26f70070456bfdce9ca76439f6600fda60e4f341aa19323df574f3f63/pipu_cli-0.1.dev7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-06 23:35:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pipu-cli"
}
        
Elapsed time: 3.02384s