Statly Code
Repositories

Repositories

Repositories are the core of Statly Code. Each repository stores your code using Git with objects stored in S3.

Creating a Repository

  1. Navigate to Dashboard → Code
  2. Click New Repository
  3. Enter repository name and settings
  4. Click Create

Repository Settings

SettingDescriptionDefault
nameRepository name (URL slug)Required
descriptionOptional descriptionNone
visibilityprivate or publicprivate
defaultBranchDefault branch namemain
allowForkingAllow internal forksfalse

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 osxkeychain

File 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:

  1. Go to Repository Settings → Branches
  2. Select new default branch
  3. 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 --tags

Storage

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

PlanStorageMax File Size
Free1 GB25 MB
Pro10 GB100 MB
Enterprise100 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/external

Repository Transfer

Repository transfer requires admin permissions on both source and target organizations.

  1. Go to Repository Settings → Danger Zone
  2. Click Transfer Repository
  3. Select target organization
  4. 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.

  1. Go to Repository Settings → Danger Zone
  2. Click Delete Repository
  3. Type the repository name to confirm
  4. 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}