๐ฅญ PaoPao's CLI Framework - Plugin-based CLI system
Project description
๐ฅญ PaoPao's CLI Framework
A powerful, secure, and extensible Command Line Interface (CLI) framework designed to revolutionize your terminal workflow. Built with Python, it offers advanced plugin management, security features, and a rich user experience.
โก Core Features
๐ ๏ธ Built-in Commands
| Command | Description | Enhanced Features |
|---|---|---|
install |
Install community commands | Security validation, branch selection, force overwrite |
uninstall |
Remove commands | Interactive confirmation, metadata cleanup |
list |
Show installed commands | Advanced filtering, sorting, detailed view |
update |
Update commands from Git | Change detection, force update option |
info |
Show command details | Complete metadata, dependency info |
search |
Find commands | Search by name, description, author |
test |
Test local commands | Security validation, timeout control |
doctor |
System health check | Comprehensive diagnostics, verbose mode |
repl |
experiment featerimental feature, interactive shell | Interactive Python shell for command development and testing |
๐ Community Integration
- Git repository support (GitHub, GitLab, Bitbucket, Codeberg)
- Automatic metadata extraction from project files
- Dependency management and validation
- Version tracking with installation history
- Shallow cloning for faster installations
๐ Security Features
- URL scheme validation (prevents local file access)
- Suspicious pattern detection in repositories
- Code analysis for potentially dangerous imports
- User confirmation for risky operations
- File size limits (10MB max per file)
๐ฅญ Installation
Quick Install
pip install paopao-cli
Development Install
git clone https://github.com/Paopun20/paopao-cli.git
cd paopao-cli
pip install -e .
Requirements
- Python 3.6+
- Git (for community commands)
- Rich (for enhanced terminal output)
- rich-argparse (for beautiful help pages)
๐ Quick Start
Basic Usage
# Show all available commands
ppc
# Get detailed help
ppc --help
# Check system health
ppc doctor
Installing Community Commands
# Install from GitHub
ppc install https://github.com/user/awesome-command
# Install specific branch
ppc install https://github.com/user/command --branch develop
# Install with custom name
ppc install https://github.com/user/tool --name mytool
# Force overwrite existing command
ppc install https://github.com/user/command --force
Managing Commands
# List all commands with details
ppc list --detailed
# List only community commands
ppc list --source community
# Sort by installation date
ppc list --sort installed --reverse
# Search for commands
ppc search "git"
ppc search "deploy" --source community
# Show detailed command info
ppc info my-command
# Update a command
ppc update my-command
# Uninstall with confirmation
ppc uninstall old-command
Development & Testing
# Test a local command script
ppc test --file my_script.py
# Test with security validation
ppc test --file script.py --validate --timeout 60
# Test with arguments
ppc test --file deploy.py -- --env production --dry-run
๐ Project Structure
paopao-cli/
โโโ ppc_commands/ # Official commands
โโโ ppc_addon/ # Community commands
โโโ .ppc_cache/ # Cache and metadata
โโโ docs/ # Documentation
โโโ main.py # Core framework
Command Structure
Addon Structure 0.0.1.1dev8+ (can add multiple commands per repository)
my-command/
โโโ commands/
โ โโโ command_name.py
โ โโโ another_command.py
โ โโโ ...
โโโ ppc.project.json # Project metadata (legacy)
โโโ ppc.project.toml # Project metadata (0.0.1.dev10+)
โโโ requirements.txt # Dependencies (optional)
โโโ README.md # Documentation (optional)
Legacy Structure (can add only one command per repository)
my-command/
โโโ main.py # Entry point (required)
โโโ ppc.project.json # Project metadata (legacy)
โโโ ppc.project.toml # Project metadata (0.0.1.dev10+)
โโโ requirements.txt # Dependencies (optional)
โโโ README.md # Documentation (optional)
๐ง Advanced Configuration
Project Metadata (ppc.project.toml) (0.0.1.dev10+)
[project]
name = "plugin-name"
version = "0.1.0"
description = "Description plugin"
author = "Developer name"
python_version = ">=3.9"
dependencies = ["rich", "requests"]
Project Metadata (ppc.project.json) (legacy)
{
"name": "plugin-name",
"version": "0.1.0",
"author": "Developer name",
"description": "Description plugin",
"python_version": ">=3.9",
"dependencies": ["rich", "requests"],
"keywords": ["automation", "productivity"],
"homepage": "https://github.com/user/plugin-name"
}
๐ก๏ธ Security Guidelines
For Users
- Review code before installing community commands
- Use trusted sources (GitHub, GitLab, etc.)
- Enable validation with
--validateflag during testing - Regular updates keep commands secure
For Developers
- Minimize dependencies in your commands
- Avoid dangerous imports (subprocess, eval, etc.)
- Include metadata in
ppc.project.json - Document security implications in your README
๐ Troubleshooting
Common Issues
Command not found after installation?
# Refresh command cache
ppc doctor
# Or force cache refresh
ppc list --detailed
Installation timeout?
# Increase timeout for large repositories
ppc install https://github.com/large/repo --no-shallow
Permission errors?
# Check directory permissions
ppc doctor --verbose
Git errors?
# Verify git installation
git --version # Should return git version if not installed, go to https://git-scm.com/downloads for installation
# or
pip show GitPython # Should return GitPython package info if not installed, run pip install GitPython
# Check network connectivity
ppc install https://github.com/test/repo
System Health Check
# Comprehensive system check
ppc doctor --verbose
# Check specific components
ppc doctor # Basic check
๐ค Contributing
Creating Commands
This is a simple template to create your own command compatible with PaoPao's CLI. AND THIS REPO IS OPEN SOURCE, YOU CAN CONTRIBUTE YOUR COMMANDS TO THE COMMUNITY! BUT UNDER APACHE LICENSE 2.0
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ฌ Support
- ๐ Issues: GitHub Issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file paopao_cli-0.0.1.dev10.tar.gz.
File metadata
- Download URL: paopao_cli-0.0.1.dev10.tar.gz
- Upload date:
- Size: 52.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
925b99b65da3e1931802678be73f3015e5cef22b6d27cad815a7dd8b3cf72363
|
|
| MD5 |
5a2e6ef22243f4e8c48a20b555362856
|
|
| BLAKE2b-256 |
40f4097061533f22dd06ee9e7cfe7b31368b6fb555d017f2a54992ed146ad127
|
File details
Details for the file paopao_cli-0.0.1.dev10-py3-none-any.whl.
File metadata
- Download URL: paopao_cli-0.0.1.dev10-py3-none-any.whl
- Upload date:
- Size: 55.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bae4169a09f4afa375e9a707e3e206b4e39c4a3549633fe3984f2393fd153192
|
|
| MD5 |
7a4d70c8656f4d33caa37e9bc2188570
|
|
| BLAKE2b-256 |
d21ce62fb22c9e7bb00227ada8ad356a994a3af231eca1ab4c93d445aa821250
|