docs/content/en/guides/configuration-management/creating-models/index.md
Meshery offers two primary ways to bring models into your system: Create and Import.
This section walks you through the Create workflow — perfect for users who want full control over naming, styling, and categorizing their models while sourcing CRDs from GitHub or ArtifactHub.
<div class="tab-container"> <!-- First Level Tab: Meshery UI --> <input type="radio" id="tab1" name="tabs" checked> <label for="tab1"> <i class="fa fa-desktop"></i> Meshery UI </label> <section class="tabbed"> <p>The URL Create feature allows you to create models in Meshery by providing URLs to source repositories or package registries. Here's how to use it:</p> <h4>Step 1: Open the Model Generation Interface</h4> <p>Go to the <a href="https://playground.meshery.io/settings?settingsCategory=Registry&tab=Models">Registry</a> section in the Meshery UI. Click the <strong>create</strong> button to start creating a new model.</p> <a href="./images/create-ui-where.gif">Tip: If you don’t have any files yet, start with Create. You can always export or re-import your model later.
</a>
</a>
</a>
</a>
Enter a URL using the following format:
<code>git://github.com/[organization]/[repository]/[branch]/path/to/crds</code>
Example:
<code>git://github.com/cert-manager/cert-manager/master/deploy/crds</code>
</li>
<li>
<strong>ArtifactHub Package:</strong>
Enter a URL in this format:
<code>https://artifacthub.io/packages/search?ts_query_web={model-name}</code>
</li>
</ul>
{{% alert color="light" title="Need a Source URL?" %}} Check the <code>sourceURL</code> column in the <a href='https://docs.google.com/spreadsheets/d/1DZHnzxYWOlJ69Oguz4LkRVTFM79kC2tuvdwizOJmeMw' target='_blank' rel='noopener'>Meshery Integration Sheet</a> and try one of the listed sources. {{% /alert %}}
<a href="./images/create-ui-source.png"></a>
</a>
{{% alert color="light" title="Visual Annotation Models" %}} When a model is marked for visual annotation only, it means the model will be used purely for visualization and diagramming purposes within Meshery's interface, rather than for actual infrastructure management. {{% /alert %}}
<h4>Step 7: Finalize and Create Your Model</h4> <p>Review your model details. If everything looks good, click "Generate" to create your model.</p> <p>Meshery will process the provided source URL, extract the necessary information, and create the model based on the specified details.</p> <p>If you want to make any changes before generation, you can go back to the previous steps using the navigation buttons and edit the details as needed.</p> <a href="./images/create-ui-finalize.png"></a>
{{% alert color="warning" title="Note on Deletion" %}} Once a model is generated, it cannot be deleted from the Meshery UI. If you no longer wish to use it, you may mark it as ignored instead. {{% /alert %}}
</section> <!-- Second Level Tab: mesheryctl --> <input type="radio" id="tab2" name="tabs"> <label for="tab2"> <i class="fa fa-terminal"></i> mesheryctl </label> <section class="tabbed"> <h3>Prerequisites:</h3> <ul> <li>Fork the <a href="https://github.com/meshery/meshery" target="_blank" rel="noopener">meshery/meshery repository.</a></li> <li>Install the Meshery CLI by following the <a href="/installation/" target="_blank" rel="noopener">installation instructions.</a></li> </ul>{{% alert color="info" title="Generating Models does not require Meshery Server" %}}
Meshery Server is not required to generate models. The Meshery CLI can be used to generate models. Model and Component generation logic is MeshKit. mesheryctl and Meshery Server both utilize MeshKit's libraries for ongoing programmatic generation of models and components.
{{% /alert %}}
<div class="tab-container">
<!-- CSV Method -->
<input type="radio" id="csv-tab" name="mesheryctl-tabs" checked>
<label for="csv-tab">
<i class="fa fa-list"></i> Using CSV
</label>
<section class="tabbed">
<h4>1. Understanding the Template Directory</h4>
<p>Inside your forked Meshery repository, you'll find the templates-csvs directory containing three essential CSV files:</p>
<code>
mesheryctl/templates/templates-csvs/
├── models.csv # Define model metadata and core properties
├── components.csv # Specify individual components and their characteristics
└── relationships.csv # Define how components interact and connect
</code>
<code>
base64 -b 0 -i /path/to/your-service-account-creds.json
</code>
[For MacOS users]
<code>
echo 'export SHEET_CRED="paste-base64-output-here"' >> ~/.bashrc
</code>
<code>
source ~/.bashrc
</code>
{{% alert color="info" title="Using Meshery CLI with the Meshery Registry and Meshery Models" %}} Meshery CLI has a set of commands that pertain to the lifecycle management of models:
mesheryctl registry - interact with and update spreadsheets
mesheryctl models - interact with and update Meshery Server
mesheryctl component - interact with and update Meshery Server
mesheryctl relationships - interact with and update Meshery Server
{{% /alert %}}