Skip to main content

๐Ÿฅญ PaoPao CLI Framework - Plugin-based CLI system

Project description

PaoPao Logo

๐Ÿฅญ PaoPao 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.

Python 3.6+ License: MIT


โšก 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 git+https://github.com/Paopun20/paopao-cli.git

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
โ”œโ”€โ”€ 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 โ”œโ”€โ”€ requirements.txt # Dependencies (optional) โ””โ”€โ”€ README.md # Documentation (optional)


---

## ๐Ÿ”ง Advanced Configuration

### Project Metadata (`ppc.project.json`)
```json
{
  "name": "awesome-tool",
  "version": "1.2.0",
  "author": "Your Name",
  "description": "An awesome command-line tool",
  "python_version": "3.7+",
  "dependencies": ["requests", "click"],
  "keywords": ["automation", "productivity"],
  "homepage": "https://github.com/user/awesome-tool"
}

๐Ÿ›ก๏ธ Security Guidelines

For Users

  • Review code before installing community commands
  • Use trusted sources (GitHub, GitLab, etc.)
  • Enable validation with --validate flag 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 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


๐ŸŒŸ Acknowledgments

  • Rich library for beautiful terminal output
  • Python community for excellent tooling
  • Git for reliable version control
  • Open Source contributors worldwide

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

paopao_cli-0.0.1.dev9.tar.gz (52.4 kB view details)

Uploaded Source

Built Distribution

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

paopao_cli-0.0.1.dev9-py3-none-any.whl (54.9 kB view details)

Uploaded Python 3

File details

Details for the file paopao_cli-0.0.1.dev9.tar.gz.

File metadata

  • Download URL: paopao_cli-0.0.1.dev9.tar.gz
  • Upload date:
  • Size: 52.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.13

File hashes

Hashes for paopao_cli-0.0.1.dev9.tar.gz
Algorithm Hash digest
SHA256 6621cba5bec4eff22931beea30f453c07daa464f30f6180361bf8852769a42cd
MD5 c513ee5b6b312e61e68ba311fd5a6dff
BLAKE2b-256 594304929f8295efa93bebc38e64d3cffe2c61fe6e0368f0667524816b535753

See more details on using hashes here.

File details

Details for the file paopao_cli-0.0.1.dev9-py3-none-any.whl.

File metadata

File hashes

Hashes for paopao_cli-0.0.1.dev9-py3-none-any.whl
Algorithm Hash digest
SHA256 ad5d82337fbb7466218be9c3dadec6f4e16340ae84cff57767b279f7ca17736a
MD5 d5b153cfc472b99f74a46fad7200a931
BLAKE2b-256 081086d1ec85287c579800c09ef4c7eccfbb6255050010eed8752768c9076a54

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