Freestyle Docs

Freestyle / Docs

Git CLI

Use Freestyle CLI commands for Git repository lifecycle operations.

Use the CLI for quick repository operations. Use native Git for clone, push, and fetch.

Prerequisites

export FREESTYLE_API_KEY="your-api-key"

Run commands with npx freestyle.

Create Repositories

npx freestyle git create

Create with options:

npx freestyle git create \
  --name my-repo \
  --public \
  --default-branch main

Create from an existing source:

npx freestyle git create \
  --source-url https://github.com/owner/repo.git \
  --source-rev main

List Repositories

npx freestyle git list --limit 20
npx freestyle git list --json

Delete A Repository

npx freestyle git delete <repo-id>

Use Native Git

git clone https://x-access-token:<token>@git.freestyle.sh/<repo-id>
git push origin main

For hooks, GitHub Sync, repository contents, and search, use the SDK/API docs.

esc