Implements jeaddons CLI tool
Adds a CLI tool to copy files or folders from a git repository into the current project based on a registry. The tool provides commands to: - `add`: Copies files/folders based on registry entries. - `list`: Lists available registry entries. Registry entries are defined in `jeAddons/registry.py`. The tool supports overriding the registry's ref and destination.
This commit is contained in:
@@ -1,2 +1,39 @@
|
||||
# jeAddons
|
||||
|
||||
Clone a file or folder from Git repositories into your current project.
|
||||
|
||||
`add` is registry-based (like `shadcn add`): you manage entries in a dict.
|
||||
|
||||
## Usage with uvx
|
||||
|
||||
1. Edit `jeAddons/registry.py` and add entries to `REGISTRY`.
|
||||
2. Run:
|
||||
|
||||
```bash
|
||||
uvx jeaddons add <name> [--ref <branch-or-tag>] [--dest <target-dir>] [--force]
|
||||
```
|
||||
|
||||
3. See available names:
|
||||
|
||||
```bash
|
||||
uvx jeaddons list
|
||||
```
|
||||
|
||||
## Registry example
|
||||
|
||||
```python
|
||||
REGISTRY = {
|
||||
"button": {
|
||||
"repo": "https://github.com/user/templates.git",
|
||||
"path": "src/components/Button.tsx",
|
||||
"ref": "main",
|
||||
"dest": "src/components",
|
||||
},
|
||||
"ui": {
|
||||
"repo": "https://github.com/user/templates.git",
|
||||
"path": "src/components/ui",
|
||||
"ref": "v1.2.0",
|
||||
"dest": "src/components",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user