Add-ons
Add-ons are folder-based repo adapters. They let ChunkyMonkey call focused tooling for a repo type without hard-coding everything into the main app.
Built-in Hugging Face and Unity adapters use the same contract local add-ons use.
Included Add-ons
Hub model, dataset, Space, and Storage Bucket workflows through local HF tooling.
- Detect model, dataset, and Space remotes.
- Check local HF CLI auth and tooling.
- Create/check buckets, parse names/URLs/handles, scan candidates, dry-run, sync, and optionally ignore synced source files.
Unity repo hygiene and a free Unity Editor extension.
- Detect Unity project shape and editor version.
- Find missing `.meta` files and generated folders.
- Preview/apply `.gitignore` and Git LFS rules.
User Controls
- Settings > Add-ons: enable included add-ons, add local folders, trust local backend code, refresh status, run actions, and remove local add-ons.
- Add-on status controls show whether an adapter detected the current repo and which actions are available.
Manifest data can be read without running code. Local backend code runs only after you explicitly trust that add-on.
Folder Layout
my-addon/
chunkymonkey-addon.json
backend/
chunkymonkey_addon.py
README.mdSupported manifest file names:
chunkymonkey-addon.jsonaddon.jsonpackage.jsonwithchunkymonkeyAddonorchunkymonkey.addon
Local add-ons can live in:
- A folder selected from Settings > Add-ons.
%APPDATA%\ChunkyMonkey\addons~/.chunkymonkey/addonsCHUNKYMONKEY_ADDONS_DIR
Manifest
{
"id": "repo-linter",
"name": "Repo Linter",
"description": "Checks repo-specific generated files and release hygiene.",
"version": "0.1.0",
"apiVersion": 1,
"kind": "repo-adapter",
"entry": "backend/chunkymonkey_addon.py",
"capabilities": ["detect", "status", "actions", "run"]
}Rules:
apiVersionmust be1.idis normalized to lowercase letters, numbers, hyphen, or underscore.entrymust stay inside the add-on folder.entryis optional for manifest-only add-ons.capabilitiesare descriptive. The actual callable backend methods decide what works.
Backend
from pathlib import Path
def detect(repo: str) -> dict:
root = Path(repo or ".")
return {"ok": True, "data": {"detected": (root / "pyproject.toml").exists()}}
def status(repo: str) -> dict:
return {"ok": True, "text": "Repo Linter is ready."}
def actions(repo: str) -> dict:
return {
"ok": True,
"actions": [
{
"id": "scan",
"label": "Scan",
"description": "Run the repo linter.",
"fields": [
{"id": "strict", "label": "Strict mode", "type": "boolean"}
]
}
]
}
def run(repo: str, args: dict) -> dict:
if args.get("action") != "scan":
return {"ok": False, "error": "Unknown action.", "category": "unknown_action"}
return {"ok": True, "text": "Scan complete.", "data": {"strict": bool(args.get("strict"))}}Methods:
detect(repo: str) -> dictstatus(repo: str) -> dictactions(repo: str) -> dictrun(repo: str, args: dict) -> dict
Missing status and actions methods are allowed. Missing run fails when an action is called.
Results
Return dictionaries:
{ "ok": true, "text": "Done.", "data": {}, "actions": [] }Failures should be explicit:
{ "ok": false, "error": "Tool is not installed.", "category": "tool_missing" }Useful keys:
ok: boolean success flag.text: human-readable result.data: structured data for the UI.actions: action list returned fromactions.error: failure text.category: stable failure category.output,warning,gitOutput,debugOutput: optional diagnostic text.
Long diagnostic text is capped by ChunkyMonkey so a bad add-on cannot flood the UI.
Action Fields
Actions can request simple user input:
{
"id": "clone_space",
"label": "Clone Space",
"fields": [
{ "id": "repo_id", "label": "Repo ID", "required": true },
{ "id": "private", "label": "Private", "type": "boolean" },
{ "id": "sdk", "label": "SDK", "options": ["docker", "static"], "default": "docker" }
]
}Field rules:
idmust match[A-Za-z][A-Za-z0-9_]{0,39}.type: "boolean"uses a confirmation.optionscreates a constrained text prompt.required: truerejects an empty value.
Action fields are rendered as small inputs or constrained choices. Keep actions small and explicit.
Security Model
- Built-in add-ons are trusted only when loaded from the packaged built-in add-on folders.
- Local add-ons are untrusted by default.
- Local backend code runs out of process after explicit trust.
- Backend entries cannot point outside the add-on folder.
- Unsupported API versions fail before code runs.
- Common secret environment variables are stripped before local add-on code starts.
- stdout/stderr are captured and shown as diagnostics, not streamed into the app.
Add-ons are still trusted local code after you enable backend execution. Do not trust add-ons from people you do not trust.
Built-ins
Hugging Face:
- Detect Hub model, dataset, and Space remotes.
- Check local HF auth/tooling.
- List visible Hub repos where supported.
- Inspect repo and Space status where supported.
- Run clone/create actions through local tooling.
- Use HF Storage Buckets from the Commit panel Bucket tab: create private buckets, parse bucket names/URLs/handles, check access, scan candidates, dry-run sync, run the matched sync, and optionally ignore synced source files.
Bucket setup:
- Install or upgrade the HF CLI:
pip install -U huggingface_hub[cli]. - Authenticate once with
hf auth loginusing a token fromhttps://huggingface.co/settings/tokens, or exposeHF_TOKENto the built-in Hugging Face add-on process. - Paste a bucket name,
owner/name,hf://buckets/owner/name, or a Hugging Face bucket URL into the Bucket field. - Use Check before Dry run when you are using an existing bucket or org bucket.
Unity:
- Detect Unity projects.
- Find missing
.metafiles. - Flag generated folders.
- Preview and apply
.gitignoreand Git LFS rules. - Support the free Unity Editor extension.
Unity Package Manager Git URL:
https://github.com/pwlot/ChunkyMonkey.git?path=addons/unity/EditorPackage