Registry API
// Protocol for accessing registry snippets
GET /registry/index.json
List all available snippets in the registry.
// response
{
"snippets": [
{
"name": "react-hook",
"description": "Custom React hook template"
},
{
"name": "api-client",
"description": "API client generator"
}
]
}GET /registry/:name.yaml
Get snippet definition in YAML format.
// example
curl https://mir.tbsten.me/registry/react-hook.yamlGET /registry/:name/*
Get template file content.
// example
# Get template file for react-hook
curl https://mir.tbsten.me/registry/react-hook/{{ name }}.tsUsing with CLI
// terminal
# Add registry to mirconfig.yaml
registries:
- name: official
url: https://mir.tbsten.me/registry
# Install from registry
mir install react-hook --registry=official