LogoFreestyle

Getting Started

Get started with Freestyle's hosted Git service for managing repositories with identity-based access control and automation.

Getting Started

Freestyle provides a hosted Git service with identity-based access control, automation triggers, and GitHub synchronization. You can create repositories, grant granular permissions, set up webhooks, and access repository contents programmatically.

Creating Your First Repository

import { FreestyleSandboxes } from "freestyle-sandboxes";

const sandboxes = new FreestyleSandboxes({
  apiKey: "your-api-key",
});

// Create a basic repository
const repo = await sandboxes.createGitRepository({
  name: "my-first-repo",
});

console.log(`Repository created: ${repo.repoId}`);

Once created, you can push code to your repository:

git remote add freestyle https://git.freestyle.sh/your-repo-id
git push freestyle main

You can also create repositories by forking existing Git repositories or importing static content from archives. See Managing Repositories for more options.

Next Steps

Authentication

To use Git CLI operations with Freestyle repositories:

git config --global credential.helper store
echo "https://x-access-token:your-token@git.freestyle.sh" >> ~/.git-credentials

This will set your git credentails globally. On a shared machine or personal computer, use --local instead of --global to scope configuration to the current repository.

For server-side authentication with your Freestyle API key:

git -c http.extraHeader "Authorization: Bearer <your-api-key>" clone https://git.freestyle.sh/your-repo-id

API Reference

See the API Reference for complete endpoint documentation.

Freestyle AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details with the official documentation.

How can I help?

Ask me about Freestyle while you browse the docs.