Skip to content

Import a GitHub repository

Start a freecode project from a copy of a repository’s default branch and check which commit was imported.

Choose a repository

  1. In the workspace, choose New project, then Import from GitHub under the prompt. On the home page, choose Connect GitHub instead. Sign in when prompted and pick the repositories freecode can read.
  2. Under Choose a repository, type part of the repository name. Each entry shows the owner, repository, visibility, and branch.
  3. Select the repository and choose Import repository. Wait for the import to finish before asking the agent to edit anything.

Check the source

Choose + beside the workspace tabs and open Project. GitHub source shows the repository and the commit that was imported. The project gets its own copy of the default branch, and edits in freecode stay in that project.

To bring edits back to your repository, download the source and review the changes locally before committing.

If a repository is missing

The search box filters the repositories already loaded. Choose Load more repositories if it appears. If the repository isn’t in the selection you shared, choose Choose more on GitHub, grant access, and return to freecode.

If a project opens with an unfinished import, choose Retry import in the notice above the conversation.

Share a template

Add a license that GitHub recognizes as OSI-approved and a freecode.jsonc file at the root of the default branch of a public GitHub repository. Freecode verifies both before the template enters review. This example starts in a Dynamic Worker.

Terminal
{
  "template": {
    "slug": "worker-starter",
    "title": "Worker starter",
    "description": "A small HTTP API built with web standards.",
    "cover": { "path": "docs/catalog-cover.webp", "caption": "API Starter cover art" },
    "screenshots": [
      {
        "path": "docs/screenshots/api-overview.webp",
        "darkPath": "docs/screenshots/api-overview-dark.webp",
        "caption": "API overview",
        "dimensions": { "width": 1620, "height": 1080 }
      }
    ]
  },
  "workspace": {
    "runtime": "worker"
  }
}

Set workspace.runtime to "vm" if development requires Linux. You can add a template.homepage with an HTTPS URL for a live example or project website.

If your template needs Worker credentials, declare the required binding names in the root wrangler.jsonc. People who start from the template set their own values in Secrets or in the secure form when publishing. See the Worker secret configuration example.

Freecode gets the listing name and description from template.title and template.description. Add promotional artwork as template.cover for the catalog card. Keep important details near the center so they stay visible in the wide crop. For the gallery on the template page, add up to four app screenshots under template.screenshots. Both fields are optional. Without a cover, Freecode displays artwork for the template’s category.

ImageRecommended export
Catalog cover1440 × 600 px (12:5)
Gallery screenshot1600 × 900 px (16:9), or 1620 × 1080 px (3:2) for a taller gallery
Mobile screenshotNative portrait aspect ratio, such as 1260 × 2736 px for iPhone Air

Export mobile screenshots as portrait images at the phone viewport's proportions. Lead with a desktop screenshot in a mixed gallery. The first screenshot's dimensions set the frame size for every slide, with 16:9 as the default. Freecode scales each screenshot proportionally to fill the frame height, or fits it to the available width if it is wider than the frame.

To enable the appearance switch, give every slide a darkPath and use path for the matching light screenshot. Keep both captures at the same dimensions and show the same view in each.

Commit PNG, JPEG, WebP, or AVIF images to the repository and reference them by relative path. Freecode loads them from GitHub’s raw content host at the same commit as the listing. Each path can be up to 180 characters and use letters, numbers, periods, underscores, and hyphens, with / between folders. Each caption can be up to 120 characters.

Sign in and choose Submit a template in the Templates catalog. You can suggest up to two tags in the form. Reviewers choose the tags that appear in the catalog. You can submit two repositories per 24 hours and have up to two waiting for review. After the template is approved, anyone can start a project from it. A sync from GitHub updates the revision available for new projects. Existing projects keep the copy they started with.