Python component registry system inspired by shadcn/ui - install components from GitHub
Project description
zen
A Python component registry system inspired by shadcn/ui - install Python components from anywhere with a single command.
๐ Quick Start
Installation
pip install zen
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:
- Developers create components in GitHub repositories with separate files
- Users install components directly into their projects from GitHub URLs
- Files are copied into the project with automatic dependency management
- 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:
{
"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)
# 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!):
{
"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:
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 (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
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/yourusername/my-components/tree/main/text-utils
zen add https://github.com/yourusername/my-components/tree/main/config-loader
๐ Development Workflow
- Create component JSON with embedded Python code
- Host JSON file on GitHub, website, CDN, etc.
- Share URL with users
- Users install with
zen add <your-url> - Files copied directly into user projects
- 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:
- Animation Features - Beautiful CLI animations and visual effects
- Usage Guide - Comprehensive usage instructions
- Examples - Component examples and use cases
- API Reference - Complete API documentation
- Template Development - Creating custom templates
- Troubleshooting - Common issues and solutions
๐ค Contributing
zen is open source. Contributions welcome!
๐ License
MIT License - see LICENSE file for details.
zen - Python components made simple, inspired by shadcn/ui โจ
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 zenive-1.1.0.tar.gz.
File metadata
- Download URL: zenive-1.1.0.tar.gz
- Upload date:
- Size: 135.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a0a4c8a79e3207b7ffeec1d820eb7832fe1fa20008f3150d686338f8dde23e1
|
|
| MD5 |
e33300e83de13c0fa01e134197761df0
|
|
| BLAKE2b-256 |
60567a229a752a4067ed0df0a36fb304cae947fb034ea4a3bbeb0e33467c2d4a
|
File details
Details for the file zenive-1.1.0-py3-none-any.whl.
File metadata
- Download URL: zenive-1.1.0-py3-none-any.whl
- Upload date:
- Size: 128.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
397f48d7901ae7167e5c9f145eaced176d59b3ece9387469911db5643809ff11
|
|
| MD5 |
4ab1b80aea1be5f55c883403aaedbe30
|
|
| BLAKE2b-256 |
a66ace0353330113ab006e7c221b0de1c3c37c936917b0594b876eaaf45717aa
|