Sanity Pioneers: Get early access to betas, extra AI credits, and a direct line to the engineering team. Apply now

How to clone/retrieve schema from deployed Sanity Studio?

5 repliesLast updated: Nov 29, 2025

Hi! I have a question: If I have a project that is deployed to *.sanity.studio and I remove the development files from my local machine, is there a way of “cloning” the project (including schemas etc…) from the deployment server? Or should I make sure to track the changes with git or similar (probably a good idea anyway… :))?
AI Update

Unfortunately, you cannot retrieve your source code, schemas, or configuration files from a deployed *.sanity.studio instance. When you run sanity deploy, it compiles your Studio into a static bundle (HTML, CSS, and JavaScript) that gets hosted on Sanity's infrastructure. This is a built production artifact, not your original source code.

Think of it like this: the deployed Studio is similar to a compiled application - you can use it, but you can't "decompile" it back into your original schema definitions, custom components, or configuration files.

What You Should Do

Yes, you absolutely should use Git or another version control system to track your Sanity Studio project! This is considered a best practice for several reasons:

What IS Available from Sanity

While you can't retrieve your Studio source code, you can access:

Recovery Options

If you've lost your local files but have a deployed Studio:

Bottom line: Always use version control for your Sanity Studio project. The deployed *.sanity.studio is just the compiled output, not a backup of your source code.

Show original thread
5 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions