Skip to main content

A smart Python package manager companion — manage, monitor, visualize, and analyze your environment with optional AI insights.

Project description

🛡️ PyCareTaker v0.1

A smart Python package manager companion — manage, monitor, visualize, and analyze your Python environment with optional AI insights.

Not just another pip wrapper, but a developer assistant.


✨ Features

Core Features

Command Description
install <pkg> Install a package and auto-update requirements.txt
remove <pkg> Uninstall a package
deps Visualize dependency graph (networkx + matplotlib)
outdated Compare installed versions against PyPI latest
diff Compare current env vs saved requirements.txt
memwatch Live memory + CPU profiler with dual graphs
security Vulnerability scan (pip-audit + PyPI + AI)
plugins Run custom user plugins
interactive Interactive shell with all commands

AI Features (optional)

Command Description
ai "Add a web framework" Natural language → pip actions
Auto-recommendations AI suggests related packages after install
Security insights AI analyzes CVE databases
Profiling analysis AI interprets memory/CPU graphs

🚀 Quick Start

# Install dependencies
pip install networkx requests packaging colorama psutil matplotlib

# Run help
python package_manager.py --help

# Examples
python package_manager.py deps                          # Dependency graph
python package_manager.py deps --text                   # Text tree
python package_manager.py outdated                      # Version check
python package_manager.py diff                          # Env diff
python package_manager.py memwatch                      # CPU + Memory profiler
python package_manager.py memwatch --export usage.csv   # Export on exit
python package_manager.py security                      # Vulnerability scan
python package_manager.py plugins                       # Run user plugins
python package_manager.py interactive                   # Interactive mode

With AI

# Using OpenAI API
python package_manager.py --api-key sk-... ai "Add a web framework"

# Using local Ollama (auto-detected)
python package_manager.py ai "Remove all testing libraries"

# Environment variable
export OPENAI_API_KEY=sk-...
python package_manager.py ai "What packages do I need for data science?"

🔌 Plugin System

Drop .py scripts in the plugins/ folder. Each must define:

def run(context: dict) -> None:
    packages = context["installed_packages"]  # {name: version}
    # Your custom logic

See pycaretaker/plugins/examples/license_check.py for a reference.


📁 Project Structure

PyCareTaker/
├── package_manager.py          # Entry point
├── pycaretaker/
│   ├── cli.py                  # CLI dispatcher
│   ├── core/                   # Non-AI features
│   │   ├── packages.py         # Install/remove/freeze
│   │   ├── monitor.py          # Background change detection
│   │   ├── deps.py             # Dependency visualization
│   │   ├── outdated.py         # PyPI version tracking
│   │   ├── diff.py             # Environment diffing
│   │   ├── profiler.py         # Memory + CPU profiler
│   │   └── export.py           # CSV/JSON export
│   ├── ai/                     # AI features (optional)
│   │   ├── backend.py          # Flexible LLM backend
│   │   ├── nlp_commands.py     # Natural language → actions
│   │   ├── recommendations.py  # Package suggestions
│   │   ├── security.py         # CVE/vulnerability analysis
│   │   └── analysis.py         # Profiling interpretation
│   └── plugins/                # Plugin loader + examples
├── plugins/                    # User plugin drop folder
├── tests/                      # Unit tests
└── requirements.txt

🧪 Running Tests

python -m pytest tests/test_core.py -v

📄 License

MIT

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

pycaretaker-0.1.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

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

pycaretaker-0.1.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycaretaker-0.1.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pycaretaker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c0072fc207d9f72c691b2309d61e52fbce06753232b46222c4849840416341e9
MD5 3669466928d95bef92fade82f03bc780
BLAKE2b-256 5117b2e8cdeb37a84d1749377594531e6338046fd320e2b3de0f95617a2c54a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycaretaker-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pycaretaker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c9c49aa60db7691f8097a44456e61959897141c3b79c9c3e830b53006c60604
MD5 fa61fdeccc2d572ee492136ee976422b
BLAKE2b-256 d855176af9e5c35949d30663dcc4524723a09db4429e69a1be4e5c0771170dfb

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