pacc-cli


Namepacc-cli JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryPackage manager for Claude Code - simplify installation and management of Claude Code extensions
upload_time2025-08-17 01:50:20
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords claude claude-code package-manager extensions hooks mcp agents commands cli developer-tools
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PACC CLI - Package Manager for Claude Code

A Python CLI tool for managing Claude Code extensions including hooks, MCP servers, agents, and slash commands.

**Note on Extension Types:**
- **Hooks & MCP Servers**: Configuration-based, stored in `settings.json`
- **Agents & Commands**: File-based, placed in directories and auto-discovered by Claude Code

## Project Status

**🎯 Production Ready - Version 1.0.0** ✅

### ✅ Completed Features
- **Wave 1-4 - MVP Foundation**: Complete core package management with >80% test coverage
- **Phase 0 - Core CLI**: All basic package management commands implemented
- **Phase 1 - Remote Sources**: Git and URL-based installation with security validation
- **Phase 2 - Project Configuration**: Team collaboration via pacc.json project configs
- **Phase 3 - Packaging & Distribution**: Production-ready package with full installation support

### 🚀 CLI Commands Ready for Production
- **`pacc install`**: Install extensions from local sources, Git repos, or URLs
- **`pacc list`**: List installed extensions with filtering and search
- **`pacc remove`**: Safely remove extensions with dependency checking
- **`pacc info`**: Display detailed extension information and metadata
- **`pacc validate`**: Validate extensions without installing

### 🤝 Team Collaboration Features
- **`pacc init --project-config`**: Initialize project with shared extension configuration
- **`pacc sync`**: Synchronize extensions from project pacc.json configuration
- **Project Configuration**: pacc.json files for defining team extension standards

## Architecture

### Core Components

#### 1. Foundation Layer (`pacc/core/`)
- **FilePathValidator**: Cross-platform path validation with security
- **DirectoryScanner**: Efficient directory traversal and filtering
- **PathNormalizer**: Windows/Mac/Linux path compatibility
- **FileFilter**: Chainable filtering system
- **ProjectConfigManager**: Team configuration management with pacc.json schema validation

#### 2. UI Components (`pacc/ui/`)
- **MultiSelectList**: Interactive selection with keyboard navigation
- **SearchFilter**: Fuzzy and exact text matching
- **PreviewPane**: File and metadata preview
- **KeyboardHandler**: Cross-platform input handling

#### 3. Validation System (`pacc/validation/`)
- **BaseValidator**: Abstract foundation for all validators
- **FormatDetector**: Automatic file format detection
- **JSONValidator**: Complete JSON syntax validation
- **YAMLValidator**: YAML validation with optional PyYAML
- **MarkdownValidator**: Markdown structure validation

#### 4. Extension Validators (`pacc/validators/`)
- **HooksValidator**: JSON structure, event types, matchers, security scanning
- **MCPValidator**: Server configuration, executable checking, connection testing
- **AgentsValidator**: YAML frontmatter, tool validation, parameter schemas
- **CommandsValidator**: Markdown files, naming conventions, aliases

#### 5. Integration Layer (`pacc/selection/`, `pacc/packaging/`, `pacc/recovery/`, `pacc/performance/`)
- **Selection Workflow**: Interactive file selection with multiple strategies
- **Packaging Support**: Universal format conversion (ZIP, TAR, etc.)
- **Error Recovery**: Intelligent rollback with retry mechanisms
- **Performance Optimization**: Caching, lazy loading, background workers

#### 6. Error Handling (`pacc/errors/`)
- **Custom Exceptions**: Structured error types with context
- **ErrorReporter**: Centralized logging and user-friendly display
- **Security Features**: Path traversal protection, input sanitization

## Usage Examples

### Basic Validation
```python
from pacc.validators import ValidatorFactory

# Validate a hooks file
validator = ValidatorFactory.create_validator('hooks')
result = validator.validate('/path/to/hooks.json')

if result.is_valid:
    print("Validation passed!")
else:
    for error in result.errors:
        print(f"Error: {error.message}")
```

### Interactive Selection
```python
from pacc.selection import SelectionWorkflow

# Create interactive selection workflow
workflow = SelectionWorkflow()
selected_files = workflow.run_interactive_selection('/path/to/extensions/')
```

### Directory Scanning
```python
from pacc.core.file_utils import DirectoryScanner, FileFilter

# Scan directory for extension files
scanner = DirectoryScanner()
file_filter = FileFilter().by_extensions(['.json', '.md', '.yaml'])
files = scanner.scan('/path/to/directory', file_filter)
```

## Installation

### Quick Start

1. **Install from wheel** (recommended):
   ```bash
   pip install dist/pacc-1.0.0-py3-none-any.whl
   ```

2. **Verify installation**:
   ```bash
   pacc --version
   pacc --help
   ```

### Installation Options

#### Option 1: Wheel Installation (Production)
```bash
# Build the wheel
python scripts/build.py build --dist-type wheel

# Install the wheel
pip install dist/pacc-1.0.0-py3-none-any.whl
```

#### Option 2: Editable Installation (Development)
```bash
# Install in development mode
pip install -e .
```

#### Option 3: Build Everything
```bash
# Complete build and test workflow
python scripts/build.py build
python scripts/build.py check
python scripts/build.py test
```

### System Requirements

- **Python**: 3.8 or higher
- **Memory**: 50MB minimum
- **Storage**: 10MB for package
- **OS**: Windows, macOS, Linux

See [Package Installation Guide](docs/package_installation_guide.md) for detailed instructions.

## CLI Usage

PACC provides a complete package manager interface for Claude Code extensions:

### Installation
```bash
# Install from file or directory
pacc install /path/to/extension.json
pacc install /path/to/extension-directory/

# Install with options
pacc install extension.json --user --force
pacc install extensions/ --interactive --dry-run
```

### Listing Extensions
```bash
# List all installed extensions
pacc list

# Filter by type and scope
pacc list hooks --user
pacc list agents --project
pacc list --format json

# Search and filter
pacc list --search "code" --sort date
pacc list --filter "*-server" --format table
```

### Removing Extensions
```bash
# Remove extension safely
pacc remove my-hook

# Remove with options
pacc remove extension-name --user --dry-run
pacc remove extension-name --force --confirm
```

### Extension Information
```bash
# Show extension details
pacc info extension-name
pacc info /path/to/extension.json

# Detailed information with troubleshooting
pacc info extension-name --verbose --show-usage
pacc info extension-name --json --show-related
```

### Validation
```bash
# Validate extensions
pacc validate /path/to/extension.json
pacc validate extensions-directory/ --strict
```

## Development

### Prerequisites
- Python 3.8+
- uv (for dependency management)

### Setup
```bash
# Install dependencies
uv pip install -e .

# Run tests
uv run pytest

# Run type checking (if mypy is added)
uv run mypy pacc

# Run linting (if ruff is added)
uv run ruff check .
uv run ruff format .
```

### Testing
The project includes comprehensive testing:
- **Unit Tests**: 100+ test methods covering all components
- **Integration Tests**: Real-world workflows and multi-component interactions
- **E2E Tests**: Complete user journeys and cross-platform compatibility
- **Performance Tests**: Benchmarks for large-scale operations
- **Security Tests**: Protection against common vulnerabilities

### Performance Benchmarks
- **File Scanning**: >4,000 files/second
- **Validation**: >200 validations/second
- **Memory Usage**: <100MB for processing thousands of files
- **Cross-Platform**: Windows, Unix, Unicode support

## Security Features
- **Path Traversal Protection**: Prevents `../` attacks
- **Input Sanitization**: Blocks malicious patterns
- **Security Auditing**: File and directory security analysis
- **Policy Enforcement**: Configurable security levels

## Extension Types Supported

### 1. Hooks
- JSON structure validation
- Event type checking (PreToolUse, PostToolUse, Notification, Stop)
- Matcher validation (regex, glob patterns)
- Security analysis for command injection

### 2. MCP Servers
- Server configuration validation
- Executable path verification
- Environment variable validation
- Optional connection testing

### 3. Agents
- YAML frontmatter parsing
- Required field validation
- Tool and permission validation
- Parameter schema validation

### 4. Commands
- Markdown file validation
- Naming convention enforcement
- Parameter documentation checking
- Alias validation and duplicate detection

## Next Steps
1. **CLI Integration**: Connect existing components to command-line interface
2. **JSON Configuration**: Implement settings.json merge strategies
3. **Final Testing**: End-to-end CLI workflow validation

## Contributing
This project follows standard Python development practices:
- Type hints throughout
- Comprehensive error handling
- Cross-platform compatibility
- Security-first design
- Extensive testing

## License
[License information to be added]

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pacc-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "PACC Development Team <pacc@example.com>",
    "keywords": "claude, claude-code, package-manager, extensions, hooks, mcp, agents, commands, cli, developer-tools",
    "author": null,
    "author_email": "PACC Development Team <pacc@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/56/a6/e35b89b86f6b131b7b738b20ca3f582274bc0b19416515df488a117dedea/pacc_cli-0.1.0.tar.gz",
    "platform": null,
    "description": "# PACC CLI - Package Manager for Claude Code\n\nA Python CLI tool for managing Claude Code extensions including hooks, MCP servers, agents, and slash commands.\n\n**Note on Extension Types:**\n- **Hooks & MCP Servers**: Configuration-based, stored in `settings.json`\n- **Agents & Commands**: File-based, placed in directories and auto-discovered by Claude Code\n\n## Project Status\n\n**\ud83c\udfaf Production Ready - Version 1.0.0** \u2705\n\n### \u2705 Completed Features\n- **Wave 1-4 - MVP Foundation**: Complete core package management with >80% test coverage\n- **Phase 0 - Core CLI**: All basic package management commands implemented\n- **Phase 1 - Remote Sources**: Git and URL-based installation with security validation\n- **Phase 2 - Project Configuration**: Team collaboration via pacc.json project configs\n- **Phase 3 - Packaging & Distribution**: Production-ready package with full installation support\n\n### \ud83d\ude80 CLI Commands Ready for Production\n- **`pacc install`**: Install extensions from local sources, Git repos, or URLs\n- **`pacc list`**: List installed extensions with filtering and search\n- **`pacc remove`**: Safely remove extensions with dependency checking\n- **`pacc info`**: Display detailed extension information and metadata\n- **`pacc validate`**: Validate extensions without installing\n\n### \ud83e\udd1d Team Collaboration Features\n- **`pacc init --project-config`**: Initialize project with shared extension configuration\n- **`pacc sync`**: Synchronize extensions from project pacc.json configuration\n- **Project Configuration**: pacc.json files for defining team extension standards\n\n## Architecture\n\n### Core Components\n\n#### 1. Foundation Layer (`pacc/core/`)\n- **FilePathValidator**: Cross-platform path validation with security\n- **DirectoryScanner**: Efficient directory traversal and filtering\n- **PathNormalizer**: Windows/Mac/Linux path compatibility\n- **FileFilter**: Chainable filtering system\n- **ProjectConfigManager**: Team configuration management with pacc.json schema validation\n\n#### 2. UI Components (`pacc/ui/`)\n- **MultiSelectList**: Interactive selection with keyboard navigation\n- **SearchFilter**: Fuzzy and exact text matching\n- **PreviewPane**: File and metadata preview\n- **KeyboardHandler**: Cross-platform input handling\n\n#### 3. Validation System (`pacc/validation/`)\n- **BaseValidator**: Abstract foundation for all validators\n- **FormatDetector**: Automatic file format detection\n- **JSONValidator**: Complete JSON syntax validation\n- **YAMLValidator**: YAML validation with optional PyYAML\n- **MarkdownValidator**: Markdown structure validation\n\n#### 4. Extension Validators (`pacc/validators/`)\n- **HooksValidator**: JSON structure, event types, matchers, security scanning\n- **MCPValidator**: Server configuration, executable checking, connection testing\n- **AgentsValidator**: YAML frontmatter, tool validation, parameter schemas\n- **CommandsValidator**: Markdown files, naming conventions, aliases\n\n#### 5. Integration Layer (`pacc/selection/`, `pacc/packaging/`, `pacc/recovery/`, `pacc/performance/`)\n- **Selection Workflow**: Interactive file selection with multiple strategies\n- **Packaging Support**: Universal format conversion (ZIP, TAR, etc.)\n- **Error Recovery**: Intelligent rollback with retry mechanisms\n- **Performance Optimization**: Caching, lazy loading, background workers\n\n#### 6. Error Handling (`pacc/errors/`)\n- **Custom Exceptions**: Structured error types with context\n- **ErrorReporter**: Centralized logging and user-friendly display\n- **Security Features**: Path traversal protection, input sanitization\n\n## Usage Examples\n\n### Basic Validation\n```python\nfrom pacc.validators import ValidatorFactory\n\n# Validate a hooks file\nvalidator = ValidatorFactory.create_validator('hooks')\nresult = validator.validate('/path/to/hooks.json')\n\nif result.is_valid:\n    print(\"Validation passed!\")\nelse:\n    for error in result.errors:\n        print(f\"Error: {error.message}\")\n```\n\n### Interactive Selection\n```python\nfrom pacc.selection import SelectionWorkflow\n\n# Create interactive selection workflow\nworkflow = SelectionWorkflow()\nselected_files = workflow.run_interactive_selection('/path/to/extensions/')\n```\n\n### Directory Scanning\n```python\nfrom pacc.core.file_utils import DirectoryScanner, FileFilter\n\n# Scan directory for extension files\nscanner = DirectoryScanner()\nfile_filter = FileFilter().by_extensions(['.json', '.md', '.yaml'])\nfiles = scanner.scan('/path/to/directory', file_filter)\n```\n\n## Installation\n\n### Quick Start\n\n1. **Install from wheel** (recommended):\n   ```bash\n   pip install dist/pacc-1.0.0-py3-none-any.whl\n   ```\n\n2. **Verify installation**:\n   ```bash\n   pacc --version\n   pacc --help\n   ```\n\n### Installation Options\n\n#### Option 1: Wheel Installation (Production)\n```bash\n# Build the wheel\npython scripts/build.py build --dist-type wheel\n\n# Install the wheel\npip install dist/pacc-1.0.0-py3-none-any.whl\n```\n\n#### Option 2: Editable Installation (Development)\n```bash\n# Install in development mode\npip install -e .\n```\n\n#### Option 3: Build Everything\n```bash\n# Complete build and test workflow\npython scripts/build.py build\npython scripts/build.py check\npython scripts/build.py test\n```\n\n### System Requirements\n\n- **Python**: 3.8 or higher\n- **Memory**: 50MB minimum\n- **Storage**: 10MB for package\n- **OS**: Windows, macOS, Linux\n\nSee [Package Installation Guide](docs/package_installation_guide.md) for detailed instructions.\n\n## CLI Usage\n\nPACC provides a complete package manager interface for Claude Code extensions:\n\n### Installation\n```bash\n# Install from file or directory\npacc install /path/to/extension.json\npacc install /path/to/extension-directory/\n\n# Install with options\npacc install extension.json --user --force\npacc install extensions/ --interactive --dry-run\n```\n\n### Listing Extensions\n```bash\n# List all installed extensions\npacc list\n\n# Filter by type and scope\npacc list hooks --user\npacc list agents --project\npacc list --format json\n\n# Search and filter\npacc list --search \"code\" --sort date\npacc list --filter \"*-server\" --format table\n```\n\n### Removing Extensions\n```bash\n# Remove extension safely\npacc remove my-hook\n\n# Remove with options\npacc remove extension-name --user --dry-run\npacc remove extension-name --force --confirm\n```\n\n### Extension Information\n```bash\n# Show extension details\npacc info extension-name\npacc info /path/to/extension.json\n\n# Detailed information with troubleshooting\npacc info extension-name --verbose --show-usage\npacc info extension-name --json --show-related\n```\n\n### Validation\n```bash\n# Validate extensions\npacc validate /path/to/extension.json\npacc validate extensions-directory/ --strict\n```\n\n## Development\n\n### Prerequisites\n- Python 3.8+\n- uv (for dependency management)\n\n### Setup\n```bash\n# Install dependencies\nuv pip install -e .\n\n# Run tests\nuv run pytest\n\n# Run type checking (if mypy is added)\nuv run mypy pacc\n\n# Run linting (if ruff is added)\nuv run ruff check .\nuv run ruff format .\n```\n\n### Testing\nThe project includes comprehensive testing:\n- **Unit Tests**: 100+ test methods covering all components\n- **Integration Tests**: Real-world workflows and multi-component interactions\n- **E2E Tests**: Complete user journeys and cross-platform compatibility\n- **Performance Tests**: Benchmarks for large-scale operations\n- **Security Tests**: Protection against common vulnerabilities\n\n### Performance Benchmarks\n- **File Scanning**: >4,000 files/second\n- **Validation**: >200 validations/second\n- **Memory Usage**: <100MB for processing thousands of files\n- **Cross-Platform**: Windows, Unix, Unicode support\n\n## Security Features\n- **Path Traversal Protection**: Prevents `../` attacks\n- **Input Sanitization**: Blocks malicious patterns\n- **Security Auditing**: File and directory security analysis\n- **Policy Enforcement**: Configurable security levels\n\n## Extension Types Supported\n\n### 1. Hooks\n- JSON structure validation\n- Event type checking (PreToolUse, PostToolUse, Notification, Stop)\n- Matcher validation (regex, glob patterns)\n- Security analysis for command injection\n\n### 2. MCP Servers\n- Server configuration validation\n- Executable path verification\n- Environment variable validation\n- Optional connection testing\n\n### 3. Agents\n- YAML frontmatter parsing\n- Required field validation\n- Tool and permission validation\n- Parameter schema validation\n\n### 4. Commands\n- Markdown file validation\n- Naming convention enforcement\n- Parameter documentation checking\n- Alias validation and duplicate detection\n\n## Next Steps\n1. **CLI Integration**: Connect existing components to command-line interface\n2. **JSON Configuration**: Implement settings.json merge strategies\n3. **Final Testing**: End-to-end CLI workflow validation\n\n## Contributing\nThis project follows standard Python development practices:\n- Type hints throughout\n- Comprehensive error handling\n- Cross-platform compatibility\n- Security-first design\n- Extensive testing\n\n## License\n[License information to be added]\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Package manager for Claude Code - simplify installation and management of Claude Code extensions",
    "version": "0.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/anthropics/pacc/issues",
        "Changelog": "https://github.com/anthropics/pacc/blob/main/CHANGELOG.md",
        "Documentation": "https://pacc.readthedocs.io",
        "Homepage": "https://github.com/anthropics/pacc",
        "Repository": "https://github.com/anthropics/pacc"
    },
    "split_keywords": [
        "claude",
        " claude-code",
        " package-manager",
        " extensions",
        " hooks",
        " mcp",
        " agents",
        " commands",
        " cli",
        " developer-tools"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "712953338d591abb038b71cc6e756406e387cad7855e605f548d7cc3009b1a24",
                "md5": "ce38289b797dd4e639fbae5d1a59a334",
                "sha256": "727936aeb6fd0de53bb24cc5941c0c9da33ef0b0806d7a79869266f01e6899e8"
            },
            "downloads": -1,
            "filename": "pacc_cli-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce38289b797dd4e639fbae5d1a59a334",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 195501,
            "upload_time": "2025-08-17T01:50:18",
            "upload_time_iso_8601": "2025-08-17T01:50:18.621491Z",
            "url": "https://files.pythonhosted.org/packages/71/29/53338d591abb038b71cc6e756406e387cad7855e605f548d7cc3009b1a24/pacc_cli-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "56a6e35b89b86f6b131b7b738b20ca3f582274bc0b19416515df488a117dedea",
                "md5": "60873da49b380bf93ead89a53d6deb14",
                "sha256": "dfb6e5591d5a7c94767bc5b3b92e566e723d9f618ee5908479ba6aff33b55f37"
            },
            "downloads": -1,
            "filename": "pacc_cli-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "60873da49b380bf93ead89a53d6deb14",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 173991,
            "upload_time": "2025-08-17T01:50:20",
            "upload_time_iso_8601": "2025-08-17T01:50:20.562497Z",
            "url": "https://files.pythonhosted.org/packages/56/a6/e35b89b86f6b131b7b738b20ca3f582274bc0b19416515df488a117dedea/pacc_cli-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-17 01:50:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "anthropics",
    "github_project": "pacc",
    "github_not_found": true,
    "lcname": "pacc-cli"
}
        
Elapsed time: 2.04278s