# Resource technologies as code

> Synchronize custom resource technologies with a remote source code repository

---

Site [llms.txt](/llms.txt)

---

Custom resource technologies are those [built with an AI client](/docs/cmp/configure/infrastructure/resource-handlers/ai-built-resource-handlers/). You can push one to a repository, preview the changes, and refresh it from the repository. You can also create a technology from one already in a repository, for example to copy it to another CMP instance. This requires a repository linked to Cloud Management Platform (CMP) and repository credentials on your profile so commits are attributed to you. See [Integrate a remote source code repository](/docs/cmp/configure/integrations/source-code-repository/).

## What CMP stores in the repository

Each technology gets its own folder, `resource_technologies/<global ID>/`, holding:

- `<global ID>_metadata.json`: the technology's global ID, name, slug, contract version, and definition.
- `<global ID>_wrapper.py`: the technology's Python code.
- `<global ID>_icon.png` or `<global ID>_icon.svg`: the icon, if the technology has one.

Resource handler endpoints and credentials are stored on the handlers, so they never reach the repository.

## Push and refresh a resource technology

Go to **Admin** > **Resource Technologies**, select the **Custom** tab, open the technology, then select its **Repository** tab.

**Push to Remote Source** opens a form for a **Repository**, **Branch**, and **Commit Message**. For **Branch**, select an existing branch or enter the name of a new one. If the technology has been pushed before, select **Preview** to see what changed.

**Refresh from Remote Source** appears once the technology has been pushed or created from a repository. It prompts for a **Repository** and **Branch**, then updates the technology in CMP. Resource handlers use the refreshed code from their next call.

The tab also shows the repository, the remote source URL, and when the technology was last refreshed.

Nothing is pushed or refreshed automatically.

<div class="alert alert-info" role="alert">


A technology linked to a repository is read-only unless **Remote Content Mode** in [Miscellaneous Settings](/docs/cmp/configure/administration/system/miscellaneous-settings/) allows editing. While it is read-only, the **Code** tab can't be saved, **Push to Remote Source** is disabled, and an AI client can't change the technology. Change it in the repository, then refresh it in CMP.
</div>


## Create a resource technology from a repository

1. Go to **Admin** > **Resource Technologies** and select the **Custom** tab.
1. Select **Create from Repository**.
1. Provide a **Repository**, **Branch**, and **Resource Technology JSON File**. The list shows the `_metadata.json` files in the repository's `resource_technologies/` folder.
1. Select **Create**.

Creating a technology doesn't create a resource handler for it. See [Add a resource handler for the new technology](/docs/cmp/configure/infrastructure/resource-handlers/ai-built-resource-handlers/#add-a-resource-handler-for-the-new-technology).

## Related

- [Integrate a remote source code repository](/docs/cmp/configure/integrations/source-code-repository/): Linking a repository and setting credentials for your commits.
- [AI-built resource handlers](/docs/cmp/configure/infrastructure/resource-handlers/ai-built-resource-handlers/): Building, testing, and managing custom technologies.
