Git CLI
Use the Git CLI commands for repository lifecycle operations.
Prerequisites
- Set
FREESTYLE_API_KEYin your environment. - Run commands as
npx freestyle ....
Create repositories
Create an empty repository
npx freestyle git createCreate with options
npx freestyle git create \
--name my-repo \
--public \
--default-branch mainCreate from an existing source URL
npx freestyle git create \
--source-url https://github.com/owner/repo.git \
--source-rev mainList repositories
npx freestyle git list --limit 20JSON output:
npx freestyle git list --jsonDelete a repository
npx freestyle git delete <repo-id>Notes
-
These commands manage repository lifecycle only.
-
Use native Git for clone/push/fetch against
https://git.freestyle.sh/<repo-id>. -
For hooks, sync, and advanced operations, use the service docs below.