Repositories
Repositories are the core of Statly Code. Each repository stores your code using Git with objects stored in S3.
Creating a Repository
- Navigate to Dashboard → Code
- Click New Repository
- Enter repository name and settings
- Click Create
Repository Settings
| Setting | Description | Default |
|---|---|---|
name | Repository name (URL slug) | Required |
description | Optional description | None |
visibility | private or public | private |
defaultBranch | Default branch name | main |
allowForking | Allow internal forks | false |
Cloning
HTTPS Clone
# Using API key
git clone https://code.statly.live/org-slug/repo-name.git
# Git will prompt for credentials
# Username: token (or anything)
# Password: your API key (sk_live_xxx)Credential Storage
# Use macOS Keychain
git config --global credential.helper osxkeychainFile Browser
The dashboard includes a full file browser:
- Syntax highlighting for 40+ languages
- Markdown rendering with GitHub-flavored markdown
- Image preview for PNG, JPG, GIF, SVG
- Git blame view showing line-by-line history
- Commit history for each file
Branches
Branch Management
# List branches via API
curl "https://statly.live/api/v1/code/repos/org/repo/branches" \
-H "Authorization: Bearer sk_live_xxx"Default Branch
The default branch is used for:
- Initial clone checkout
- PR target (if not specified)
- Search indexing
To change:
- Go to Repository Settings → Branches
- Select new default branch
- Click Save
Tags
Create annotated or lightweight tags:
# Annotated tag
git tag -a v1.0.0 -m "Release 1.0.0"
git push origin v1.0.0
# All tags
git push origin --tagsStorage
S3 Object Storage
Git objects are stored in S3 with the following structure:
s3://statly-code-git-objects/
└── {org-id}/
└── {repo-id}/
└── objects/
├── pack/
└── info/Storage Limits
| Plan | Storage | Max File Size |
|---|---|---|
| Free | 1 GB | 25 MB |
| Pro | 10 GB | 100 MB |
| Enterprise | 100 GB+ | 250 MB |
Storage is measured at 80% (warning) and 100% (soft block). At 100%, pushes are blocked but pulls continue to work.
Large File Storage (LFS)
For files larger than the limit, use Git LFS:
# Install LFS
git lfs install
# Track large files
git lfs track "*.zip"
git lfs track "*.pdf"
git lfs track "assets/**"
# Commit .gitattributes
git add .gitattributes
git commit -m "Add LFS tracking"Submodules
Statly Code supports Git submodules:
# Add a Statly Code submodule
git submodule add https://code.statly.live/org/shared-lib.git libs/shared
# Add an external submodule
git submodule add https://github.com/example/repo.git libs/externalRepository Transfer
Repository transfer requires admin permissions on both source and target organizations.
- Go to Repository Settings → Danger Zone
- Click Transfer Repository
- Select target organization
- Confirm transfer
The target org admin must accept the transfer within 7 days.
Archive & Delete
Archive
Archiving makes a repository read-only:
- Existing clones continue to work
- New pushes are blocked
- PRs are closed
Delete
Deleted repositories go to trash for 30 days, then are permanently deleted.
- Go to Repository Settings → Danger Zone
- Click Delete Repository
- Type the repository name to confirm
- Click Delete
Admins can restore from trash within 30 days.
API Reference
List Repositories
GET /api/v1/code/repos
# Response
{
"repositories": [
{
"id": "repo_xxx",
"name": "my-app",
"slug": "my-app",
"visibility": "private",
"defaultBranch": "main",
"createdAt": "2024-01-01T00:00:00Z"
}
]
}Get Repository
GET /api/v1/code/repos/{org}/{repo}Create Repository
POST /api/v1/code/repos
Content-Type: application/json
{
"name": "my-app",
"description": "My application",
"visibility": "private"
}Update Repository
PATCH /api/v1/code/repos/{org}/{repo}
Content-Type: application/json
{
"description": "Updated description"
}Delete Repository
DELETE /api/v1/code/repos/{org}/{repo}