Home App Docs Blog Github

Using the CLI to import builder spaces to your filesystem

There are many reasons why you may want to import a space to your filesystem:

  • Archiving a snapshot of your space at a moment in time that you can spin to a new space
  • Building space templates for specific codebases

To import a space to your filesystem:

  1. Copy your space private key from account settings ( or generate one if you don’t have one already)

  2. Install @builder.io/cli globally using npm:

npm install @builder.io/cli -g
  1. Use the cli to import your space from the command line, by passing the private key and your output directory in the next command
builder import -k [PRIVATE KEY] -o [OUTPUT DIRECTORY]

And now you’re done! You can take this space and commit it along your code if you’re building a starter template, or just save it for archiving purposes.