Creating a themed repo without local project

Hi there,

This might be asked earlier, but I couldn't find it. I want to create a new repo from a .zip file, which works fine, but I do not want to create a local project for it. In our setup, our .zip template creates the prismic repo, and then the project is connected via a new project on vercel. Nothing is needed locally. This happens often, so I wonder is there a flag to not create a project locally? I tried --no-config thinking this might do something along those lines, but no dice.

Further, there are some initial boilerplate documents that I would like to use in conjunction with the command to create the prismic repo. Is there a way to include some boilerplate? I realize that there is the enterprise level for cloning repo's, but that cant be required for a wee bit of boilerplate right?


Hey @andrew.wynyard,

Welcome to the Prismic community :slight_smile:

These are great questions! I'll answer them in order.

Creating a repo without a local project

This is possible. You can create a theme with one folder inside of it: custom-types/, which contains your JSON models. When you want to create a Prismic repo using those models, you can run:

prismic theme --theme-url <your-theme-url> --ignore-conf --folder custom-types

The theme command looks for a configuration file, and, if there isn't one, the theme creation will fail. The --ignore-conf flag overrides that.

The command will still download the theme files and add them to your project. The --folder flag lets you specify where to put those files. You can delete them afterwards if you like.

Boilerplate documents

No, this is not possible. As you note, we have Import/Export available starting on our Medium plans, which is what we recommend for something like this.

We're always evaluating feature ideas when we hear about use cases like this, so I'll flag this one for our product team.

Please let me know if you have any other questions!


Hi Sam,

Thanks for your quick reply, super appreciate it.

Creating a repo without a local project

This is how we are doing it, as we have the JSON theme deployed within our master project. This has a .zip file attached. running prismic theme --theme-url <your-theme-url>.zip works to create the repository, and does not throw an error/fail at all, but askes for a repo name and folder name (wizard instead of flags).

However, I think I might have worded my question ambiguously. Essentially I don't want to create the local folder at all. I don't need anything locally. I want to automate this as a part of a greater cli (including vercel and DB stuff), and don't want to have to delete random folders that are created through the script. The repo will be connected to a vercel project through env vars and not a local project.

Boilerplate documents

This is as I thought. Unfortunate, but it is what it is. On this note, however, If we were to upgrade our template repo to medium, would that grant us access to more cli features also? For example, is this import/export feature able to be achieved through the cli?
Maybe: prismic clone <template-repo-name> <new-repo-name> --include-docs or something like this?

Thanks again,

@samlittlefair any more info on this one?