Skip to main content

zen

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

🚀 Quick Start

Installation

pip install zenive

Initialize a Project

zen init my-project
cd my-project

Install Components (shadcn/ui style!)

# 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

Components are organized with separate files and 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:

{
  "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"
    }
  ]
}

Reference your files with url paths for clean organization.

🏗️ 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

# 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>

# View available animations
zen animations

# Help
zen --help
zen add --help

📚 Creating Components

1. Component Structure

Create a directory with separate files:

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

component.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

Push your component directory to GitHub:

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

3. Sharing Components

Users install with any of these formats:

# 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
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

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

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

zen add https://github.com/TheRaj71/my-components/tree/main/text-utils
zen add https://github.com/TheRaj71/my-components/tree/main/config-loader

🔄 Development Workflow

  1. Create component directory with JSON config and Python files
  2. Host component on GitHub or any accessible URL
  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

{
  "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

{
  "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"
    }
  ]
}

📚 Documentation

For detailed documentation, see the docs folder:

🤝 Contributing

zen is open source. Contributions welcome!

📄 License

MIT License - see LICENSE file for details.


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

Metadata

Release files for zenive 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zenive 1.1.1
File Size Uploaded
zenive-1.1.1.tar.gz 68.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zenive 1.1.1
File Interpreter ABI Platform
zenive-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 95.6 kB

Release files / zenive-1.1.1.tar.gz

Download URL zenive-1.1.1.tar.gz
Size 68.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b092099e2997220423ae91699d07ae7ce2c350ab3c9bf3a831893511a4bd0ed4
BLAKE2b-256 checksum
How to use checksums
cd0fb28a4e5568ea008503564e2d2db44f954654f9731f2c77518e868dbe559d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / zenive-1.1.1-py3-none-any.whl

Download URL zenive-1.1.1-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f666fcd99cd6f1501d3810b4bb8d858ee09c3b8907926721044d69fcb37cdc2d
BLAKE2b-256 checksum
How to use checksums
bf3e8308453b722d56f33d4b6f5ba2aaca81f93f3b72aeeb2124e51ba6d02881
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page