Metadata-Version: 2.4
Name: zenive
Version: 1.0.0
Summary: Python component registry system inspired by shadcn/ui - install components from GitHub
Home-page: https://github.com/TheRaj71/Zenive
Author: TheRaj71
Author-email: TheRaj71 <theraj714@zohomail.com>
License: MIT License
        
        Copyright (c) 2024 TheRaj71
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/TheRaj71/Zenive
Project-URL: Bug Tracker, https://github.com/TheRaj71/Zenive/issues
Project-URL: Source Code, https://github.com/TheRaj71/Zenive
Project-URL: Documentation, https://github.com/TheRaj71/Zenive#readme
Keywords: components,registry,shadcn,python,cli,zen
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: System :: Software Distribution
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0.0
Requires-Dist: requests>=2.25.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: PyYAML>=6.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: packaging>=21.0.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# zen

A Python component registry system inspired by shadcn/ui - install Python components from anywhere with a single command.

## 🚀 Quick Start

### Installation

```bash
pip install zen
```

### Initialize a Project

```bash
zen init my-project
cd my-project
```

### Install Components (shadcn/ui style!)

```bash
# Install from GitHub repository (auto-discovers component.json)
zen add https://github.com/user/awesome-components

# Install from specific component directory
zen add https://github.com/user/components/tree/main/email-validator

# Install from direct JSON URL
zen add https://raw.githubusercontent.com/user/repo/main/component.json

# Install to custom path
zen add https://github.com/user/jwt-auth --path src/auth

# Skip confirmation prompts
zen add https://github.com/user/component --yes
```

## 🎯 How It Works

zen works exactly like shadcn/ui but for Python:

1. **Developers** create components in GitHub repositories with separate files
2. **Users** install components directly into their projects from GitHub URLs
3. **Files** are copied into the project with automatic dependency management
4. **No registry lock-in** - install from any GitHub repository or URL

## 📦 Component Format (New & Improved!)

Components are now organized like shadcn/ui - separate files with a simple JSON config:

**Directory Structure:**
```
email-validator/
├── component.json       # Component metadata
├── validator.py         # Main component code
├── __init__.py         # Module initialization  
└── requirements.txt    # Dependencies
```

**component.json:**
```json
{
  "name": "email-validator",
  "version": "1.0.0", 
  "description": "Simple email validation utility",
  "category": "utils",
  "dependencies": ["email-validator"],
  "files": [
    {
      "name": "validator.py",
      "path": "src/utils/validator.py",
      "url": "./validator.py"
    },
    {
      "name": "__init__.py",
      "path": "src/utils/__init__.py", 
      "url": "./__init__.py"
    }
  ]
}
```

**No more embedded content!** Just reference your files with `url` paths.

## 🏗️ Project Structure

zen creates organized Python projects:

```
my-project/
├── .zen/
│   └── config.yaml    # Project configuration
├── src/
│   ├── components/    # General components
│   ├── utils/         # Utility functions
│   ├── models/        # Data models
│   ├── services/      # Business logic
│   ├── auth/          # Authentication
│   └── data/          # Data processing
├── requirements.txt   # Auto-managed dependencies
└── README.md
```

## 🔧 CLI Commands (shadcn/ui inspired)

```bash
# Initialize new project
zen init [project-name]

# Install component from URL (with preview!)
zen add <component-url>

# Skip confirmation prompts
zen add <component-url> --yes

# Install to custom path
zen add <component-url> --path src/custom

# Overwrite existing files
zen add <component-url> --overwrite

# Dry run (show what would happen)
zen add <component-url> --dry-run

# List installed components
zen list

# Show component details
zen info <component-name>

# Remove component
zen remove <component-name>

# Help
zen --help
zen add --help
```

## 📚 Creating Components (The shadcn/ui Way!)

### 1. Component Structure (New!)

Create a directory with separate files (much cleaner!):

```
my-component/
├── component.json      # Metadata only
├── main.py            # Your Python code
├── utils.py           # Additional files
├── __init__.py        # Module init
└── requirements.txt   # Dependencies
```

**component.json** (no embedded content!):
```json
{
  "name": "my-component",
  "version": "1.0.0",
  "description": "What this component does",
  "category": "utils",
  "dependencies": ["requests", "pydantic"],
  "files": [
    {
      "name": "main.py",
      "path": "src/utils/main.py",
      "url": "./main.py"
    },
    {
      "name": "requirements.txt",
      "path": "requirements.txt", 
      "url": "./requirements.txt"
    }
  ]
}
```

### 2. Hosting Components (GitHub First!)

Push your component directory to GitHub:

```bash
git add .
git commit -m "Add my awesome component"
git push origin main
```

### 3. Sharing Components

Users install with any of these formats:
```bash
# Repository root (auto-finds component.json)
zen add https://github.com/user/my-component

# Specific directory in repo
zen add https://github.com/user/components/tree/main/my-component

# Direct JSON URL (still works)
zen add https://raw.githubusercontent.com/user/repo/main/component.json
```

## 🌟 Features

- **Zero Configuration**: Works out of the box
- **No Registry Lock-in**: Install from any URL
- **Automatic Dependencies**: Updates requirements.txt automatically
- **File Ownership**: Code is copied into your project (you own it)
- **Flexible Paths**: Install to any directory structure
- **Rich CLI**: Beautiful terminal interface with progress indicators

## 🎯 Use Cases

### Company Internal Components
```bash
zen add https://github.com/company/components/tree/main/auth/sso
zen add https://github.com/company/components/tree/main/data/processor
```

### Open Source Components
```bash
zen add https://github.com/TheRaj71/Zenive/tree/main/components/email-validator
zen add https://github.com/TheRaj71/Zenive/tree/main/components/jwt-auth
```

### Personal Collections
```bash
zen add https://github.com/yourusername/my-components/tree/main/text-utils
zen add https://github.com/yourusername/my-components/tree/main/config-loader
```

## 🔄 Development Workflow

1. **Create** component JSON with embedded Python code
2. **Host** JSON file on GitHub, website, CDN, etc.
3. **Share** URL with users
4. **Users install** with `zen add <your-url>`
5. **Files copied** directly into user projects
6. **Dependencies** automatically added to requirements.txt

## 🆚 Why zen?

| Feature | zen | pip packages | git submodules |
|---------|--------------|--------------|----------------|
| **Easy Installation** | ✅ `zen add <url>` | ✅ `pip install` | ❌ Complex setup |
| **Code Ownership** | ✅ Files in project | ❌ External dependency | ✅ Files in project |
| **No Registry Lock-in** | ✅ Any GitHub URL | ❌ PyPI only | ✅ Any git repo |
| **Dependency Management** | ✅ Auto-updates requirements.txt | ✅ Auto-installed | ❌ Manual |
| **Easy Customization** | ✅ Edit copied files | ❌ Hard to modify | ✅ Easy to modify |
| **Preview Before Install** | ✅ Shows what will be added | ❌ No preview | ❌ No preview |

## 📖 Examples

### Email Validator Component
```json
{
  "name": "email-validator", 
  "version": "1.0.0",
  "description": "Email validation utilities with multiple validation methods",
  "category": "utils",
  "dependencies": ["email-validator"],
  "files": [
    {
      "name": "validator.py",
      "path": "src/utils/validator.py",
      "url": "./validator.py"
    },
    {
      "name": "__init__.py",
      "path": "src/utils/__init__.py",
      "url": "./__init__.py"
    }
  ]
}
```

### JWT Auth Component
```json
{
  "name": "jwt-auth",
  "version": "2.0.0", 
  "description": "JWT authentication utilities with middleware support",
  "category": "auth",
  "dependencies": ["PyJWT", "cryptography"],
  "files": [
    {
      "name": "jwt_handler.py",
      "path": "src/auth/jwt_handler.py",
      "url": "./jwt_handler.py"
    },
    {
      "name": "middleware.py",
      "path": "src/auth/middleware.py",
      "url": "./middleware.py"
    }
  ]
}
```

## 🤝 Contributing

zen is open source. Contributions welcome!

- **GitHub**: https://github.com/TheRaj71/Zenive
- **Issues**: https://github.com/TheRaj71/Zenive/issues

## 📄 License

MIT License - see LICENSE file for details.

---

**zen** - Python components made simple, inspired by shadcn/ui ✨
