>mir

Submission Guide

// How to submit your snippet to the official registry

Before You Submit

Ensure your snippet:

  • - Has a clear, descriptive name
  • - Includes comprehensive documentation
  • - Has well-defined variables
  • - Follows community standards

Create Your Snippet Locally

// terminal
$ mir init
$ mir create my-awesome-snippet
$ # Edit .mir/snippets/my-awesome-snippet.yaml
$ # Add template files to .mir/snippets/my-awesome-snippet/
$ mir sync my-awesome-snippet

Submit via GitHub

1. Create a GitHub issue or discussion

2. Include:

  • - Snippet YAML content
  • - Description and use cases
  • - Template files (if applicable)

3. Wait for review and integration

Build Custom Registry

Want to maintain your own registry? Use @tbsten/mir-registry-sdk:

// registry.ts
import { createRegistryRoutes } from "@tbsten/mir-registry-sdk";

// Implement your own RegistryProvider
const provider = {
  list: async () => [ /* snippet names */ ],
  get: async (name) => [ /* snippet definition and files */ ],
  search: async (query) => [ /* matching snippets */ ],
};

// Use with Hono or your preferred framework
app.route("/registry", createRegistryRoutes(provider));