| 1 | --- |
| 2 | title: Projects |
| 3 | description: A project is what you build and run. Its code lives in its source; its deployments, secrets and variables belong to the project. |
| 4 | --- |
| 5 | |
| 6 | A project is the thing you are building and running: a site, an API, a |
| 7 | worker, a library. Every project has one **source**, where its code lives, |
| 8 | and everything about running it belongs to the project: |
| 9 | |
| 10 | | Belongs to the project | Belongs to its repository | |
| 11 | | --- | --- | |
| 12 | | [Deployments](/guides/deployments/): production and previews | Branches and commits | |
| 13 | | Its address on g1t.page | Issues and pull requests | |
| 14 | | [Secrets and variables](/guides/secrets-and-variables/) | Review, merge rules and the [merge queue](/guides/merge-queue/) | |
| 15 | | Its name, description and root directory | Webhooks | |
| 16 | |
| 17 | That split is what lets the code live anywhere while the project stays the |
| 18 | same. |
| 19 | |
| 20 | ## Your projects |
| 21 | |
| 22 | Every repository on g1t is a project of its own name, with nothing to set |
| 23 | up: `g1t.sh/acme/web` is the `web` project, built from the `acme/web` |
| 24 | repository. Repositories made before projects existed became projects the |
| 25 | first time their workspace was opened. |
| 26 | |
| 27 | A workspace's page, `g1t.sh/<workspace>`, shows your pinned projects and |
| 28 | its most active ones, each with where it is deployed, its latest build, and |
| 29 | its open issues and pull requests. **All projects** in the sidebar lists |
| 30 | every one, with search, filters and sorting; see |
| 31 | [the Projects page](/guides/workspaces/#the-projects-page). The sidebar keeps |
| 32 | your [pinned and recent projects](/guides/workspaces/#pinned-and-recent-projects). |
| 33 | |
| 34 | ## A project's pages |
| 35 | |
| 36 | | Page | Address | | |
| 37 | | --- | --- | --- | |
| 38 | | **Overview** | `g1t.sh/<workspace>/<project>` | Production with a screenshot, or for a library its packages; the steps left to get to production or to a first release; what is in progress, active branches, live previews, recent builds, and the source. See [the overview](#the-overview). | |
| 39 | | **Code** | `…/code` | The repository's files, commits and branches. | |
| 40 | | **Issues**, **Pull requests**, **Merge queue**, **Plan** | `…/issues` and so on | As they always were. | |
| 41 | | **Actions** | `…/actions` | [GitHub Actions workflows](/guides/actions/). | |
| 42 | | **Deployments** | `…/deployments` | What is up now and every build. | |
| 43 | | **Settings** | `…/settings` | See below. | |
| 44 | |
| 45 | Every address that pointed into a repository before still works: the |
| 46 | project has the repository's name. |
| 47 | |
| 48 | ## The overview |
| 49 | |
| 50 | A project's overview is the first page you see. People with a |
| 51 | [role](/guides/access-and-roles/) on its repository see all of it; anyone |
| 52 | else sees what the project shares publicly. |
| 53 | |
| 54 | | Part | What it shows | |
| 55 | | --- | --- | |
| 56 | | **Production** | For an app: a screenshot of the live site, which opens it; its address, the commit it runs and when it went up; **Visit** and **Redeploy**. See [the production screenshot](/guides/deployments/#the-production-screenshot). | |
| 57 | | **Packages** | For a [library or a tool](#apps-and-libraries), in place of Production: the packages its repository publishes, each with its latest version and how to install it, or how to publish a first one. | |
| 58 | | **Get to production**, or **Ship a release** for a library | The checklists below, until every step is done or you dismiss it. | |
| 59 | | **Right now** | Agents at work, and open pull requests moving from working to landed. | |
| 60 | | **Needs you** | What is waiting on a person: a failed production build, a pull request to merge or review, a stuck run. | |
| 61 | | **Active branches** | Branches other than the default, newest first. See [active branches](#active-branches). | |
| 62 | | **Recent changes**, **Activity**, **Previews** | What landed, everything that happened, and the previews that are up. | |
| 63 | | **Health**, **Dependencies**, **Clone** | How often checks pass, recent builds and open issues by age; what it uses and what uses it; the clone address. | |
| 64 | |
| 65 | ### Get to production |
| 66 | |
| 67 | People with a role on its repository see a card that counts what the project has done towards |
| 68 | production, such as **3/6**. Each step is worked out from the project |
| 69 | itself, and each links to where you do it: |
| 70 | |
| 71 | | Step | Done when | Links to | |
| 72 | | --- | --- | --- | |
| 73 | | Connect a source or push code | The default branch has a commit, or the source is a mirror. | **Code**, which shows how to push, or how to have your coding agent start the project. | |
| 74 | | Deploy to production | A production build has gone live. | Deployments settings, or **Deployments** once they are on. | |
| 75 | | Add a custom domain | The project has a [custom domain](/guides/deployments/#custom-domains). | Domain settings. | |
| 76 | | Open a preview | A branch or pull request has had a [preview](/guides/deployments/#previews-of-branches). | A new pull request. | |
| 77 | | Set up repository instructions | `AGENTS.md` or `CLAUDE.md` is at the root of the default branch. | The instructions on the **Agents** page. See [repository instructions](/guides/working-with-g1t/#repository-instructions). | |
| 78 | | Assign a first issue to g1t | g1t has had a run, a pull request or an issue here. | A new issue. | |
| 79 | |
| 80 | The card goes away when every step is done. To hide it sooner, choose |
| 81 | **×** on it. That hides it for this project in this browser only. |
| 82 | |
| 83 | ### Ship a release |
| 84 | |
| 85 | A [library or a tool](#apps-and-libraries) does not deploy, so its card |
| 86 | counts the steps to a first release instead: |
| 87 | |
| 88 | | Step | Done when | Links to | |
| 89 | | --- | --- | --- | |
| 90 | | Connect a source or push code | As above. | **Code**. | |
| 91 | | Add checks on pull requests | The repository has a workflow in `.g1t/workflows`. Its runs are every pull request's checks. | **Actions**, which offers to add a starter workflow. | |
| 92 | | Tag a release or publish a package | A package its repository publishes has a version. For [Composer](/guides/composer/) and [Go](/guides/go/), pushing a tag such as `v1.0.0` is the release. | The package's page, or the guide for its registry. | |
| 93 | | Set up repository instructions | As above. | The **Agents** page. | |
| 94 | | Assign a first issue to g1t | As above. | A new issue. | |
| 95 | |
| 96 | ## Apps and libraries |
| 97 | |
| 98 | Every project is either an **app**, which deploys, or a **library or a |
| 99 | tool**, which is published and installed. An app's overview shows |
| 100 | production and the steps to get there; a library's shows its packages |
| 101 | and the steps to a first release, and never offers to turn on |
| 102 | deployments. Its **Deployments** page stays in the sidebar either way. |
| 103 | |
| 104 | g1t works it out for itself, in this order: |
| 105 | |
| 106 | 1. If [Deployments](/guides/deployments/) are on for the project, it is an app. |
| 107 | 2. If its repository publishes a package other than a container image, |
| 108 | such as a [Composer](/guides/composer/) or [npm](/guides/npm/) |
| 109 | package, it is a library. |
| 110 | 3. If the files at the root of its default branch (or of its root |
| 111 | directory) say it is a library, it is one: |
| 112 | |
| 113 | | File | A library when | |
| 114 | | --- | --- | |
| 115 | | `composer.json` | Its `type` is anything but `project`, such as `library`; or it has no `type`, has `autoload`, and has no `public/index.php`. | |
| 116 | | `Cargo.toml` | It builds a library (`[lib]` or `src/lib.rs`) and no binary (`[[bin]]` or `src/main.rs`). | |
| 117 | | `go.mod` | No `.go` file at the root is `package main`. | |
| 118 | | `pyproject.toml` | It has a build backend and depends on no app framework, such as Django, Flask or FastAPI. | |
| 119 | | `package.json` | It has `main`, `exports`, `module`, `files` or `bin`, no `start` or `dev` script, and no app framework such as Next.js, Astro, Nuxt, Remix or SvelteKit. | |
| 120 | |
| 121 | The language's own manifest is read before `package.json`, which many |
| 122 | projects carry only for tooling. A Workers config (`wrangler.jsonc`, |
| 123 | `wrangler.json` or `wrangler.toml`) or an `index.html` at the root |
| 124 | makes it an app. |
| 125 | 4. Anything else is an app. |
| 126 | |
| 127 | The files are read again on every push to the default branch. |
| 128 | |
| 129 | To decide for yourself, open **Settings**, then **General**, and under |
| 130 | **Deployments for this project** choose: |
| 131 | |
| 132 | - **Detect automatically**: the rules above. It shows what was detected |
| 133 | and why. |
| 134 | - **Deploys**: an app, whatever its files say. |
| 135 | - **Doesn't deploy**: a library or a tool. Its overview offers no |
| 136 | deploying. If Deployments are on for it, turn them off first under |
| 137 | **Settings**, then **Deployments**; g1t does not turn them off for you. |
| 138 | While it is set this way, Deployments cannot be turned on. |
| 139 | |
| 140 | ### Active branches |
| 141 | |
| 142 | Up to five branches other than the default, the most recently changed |
| 143 | first. Each shows its last commit and who made it, how many commits it is |
| 144 | ahead of the default branch and behind it, and its open pull request, |
| 145 | with its checks, and preview, if it has them. A branch with no pull |
| 146 | request links to opening one, unless it has nothing the default branch |
| 147 | lacks, which says **Nothing to merge**. |
| 148 | |
| 149 | Ahead and behind are exact, merges included. g1t reads up to 1,000 |
| 150 | commits of each history to find where the two meet; a branch that left |
| 151 | the default branch further back than that shows no counts. Ten branches |
| 152 | are read, those with open pull requests first; a project with more says |
| 153 | how many it has. |
| 154 | |
| 155 | ## Settings |
| 156 | |
| 157 | A project's **Settings** has a tab for each part: |
| 158 | |
| 159 | | Tab | What it holds | |
| 160 | | --- | --- | |
| 161 | | **General** | The project's name and description, its source, its **root directory**, and whether it deploys (see [apps and libraries](#apps-and-libraries)). A project shows its repository's description, and follows it as it changes, until you give the project one of its own; **Use the repository's description** goes back. | |
| 162 | | **Deployments** | Production, previews, build command, output directory and idle days. See [Deployments](/guides/deployments/#settings). | |
| 163 | | **Domains** | Custom domains for production. See [custom domains](/guides/deployments/#custom-domains). | |
| 164 | | **Dependencies** | The projects this one uses, and the ones that use it. See [Dependencies](#dependencies). | |
| 165 | | **Agents** | How g1t's agents pick up work here, and what they read first. | |
| 166 | | **Guardrails** | What agents may reach, run and spend while they work here. See [guardrails](/guides/guardrails/). | |
| 167 | | **Repository** | The repository's name, description, website, [topics](/guides/search/#what-is-indexed) and default branch, and its danger zone: visibility, archive, transfer and delete. See [Managing a repository](/guides/managing-repositories/). | |
| 168 | | **Access** | Who has a [role](/guides/access-and-roles/) on the repository, and invitations. | |
| 169 | | **Branches and merging** | Branch protection, [required status checks](/guides/pull-requests/#required-status-checks), required approvals, the merge queue, auto-merge and how g1t's agents review. | |
| 170 | | **Secrets and variables** | The project's rows. See [Secrets and variables](/guides/secrets-and-variables/). | |
| 171 | | **Runners** | The project's own [self-hosted runners](/guides/self-hosted-runners/), and where its agents' work runs. | |
| 172 | | **Webhooks** | The repository's [webhooks](/guides/webhooks/). | |
| 173 | |
| 174 | The **root directory** says where in the repository the project lives, |
| 175 | such as `apps/web`. Builds run there. Leave it empty for the whole |
| 176 | repository. |
| 177 | |
| 178 | Each tab needs a [role](/guides/access-and-roles/) on the project's |
| 179 | repository: |
| 180 | |
| 181 | | Tab | Needs | |
| 182 | | --- | --- | |
| 183 | | **General**, **Dependencies**, **Agents**, and on **Repository** its description, website and topics | Maintain | |
| 184 | | **Branches and merging**, **Guardrails** | Maintain | |
| 185 | | **Access**: seeing who has a role; changing it | Write; Admin | |
| 186 | | **Deployments**, **Domains**, **Secrets and variables**, **Runners**, **Webhooks** | Admin | |
| 187 | | On **Repository**: its name, default branch, and the danger zone (visibility, archive) | Admin | |
| 188 | | Transfer and delete | An owner of the workspace | |
| 189 | |
| 190 | Someone without the role does not see the tab. |
| 191 | |
| 192 | ## Create a project |
| 193 | |
| 194 | 1. Choose **New project** in the sidebar, or go to `g1t.sh/new`. |
| 195 | 2. Choose where its code comes from: |
| 196 | - **Start empty**: a new repository on g1t. |
| 197 | - **Import code**: copy a public repository from GitHub or any git host |
| 198 | into a new one on g1t, with every branch and tag (up to 40 MB of |
| 199 | history). |
| 200 | - **Import from GitHub**: import, mirror or move repositories you can |
| 201 | reach on GitHub, private ones too, with every branch and tag and, |
| 202 | if you like, their issues. See [GitHub](/guides/github/). |
| 203 | 3. Give it a name and say who can see it, then choose **Create project**. |
| 204 | |
| 205 | Pushing a repository that does not exist yet makes one, and with it a |
| 206 | project: |
| 207 | |
| 208 | ```sh |
| 209 | git push https://g1t.sh/acme/my-app.git main |
| 210 | ``` |
| 211 | |
| 212 | ## Sources |
| 213 | |
| 214 | A project's source is a repository hosted on g1t. A repository can be a |
| 215 | **mirror of one on GitHub**: the code stays there, every push to GitHub is |
| 216 | fetched into g1t, and the project gets g1t's deployments, secrets and |
| 217 | agents on it. See [GitHub](/guides/github/#import-mirror-or-move-a-repository). |
| 218 | |
| 219 | Coming next: |
| 220 | |
| 221 | - **Mirrored from GitLab or Bitbucket**, and previews on GitHub's own pull |
| 222 | requests. |
| 223 | - **Several projects on one repository**, each from its own root |
| 224 | directory, with a push building only the projects it touched. |
| 225 | |
| 226 | |
| 227 | ## Dependencies |
| 228 | |
| 229 | A project can depend on others in its workspace: `web` calls `api`'s HTTP |
| 230 | API, or consumes `ui-kit`'s package. Declare it under **Settings → |
| 231 | Dependencies**, or in a `.g1t/project.yml` in the project's root |
| 232 | directory: |
| 233 | |
| 234 | ```yaml |
| 235 | dependsOn: |
| 236 | - project: api |
| 237 | as: API_URL |
| 238 | - project: ui-kit |
| 239 | ``` |
| 240 | |
| 241 | The file is read on every push to the default branch, and its dependencies |
| 242 | replace the ones it declared before; those are marked **project.yml** and |
| 243 | changed only in the file. A dependency that would make a cycle, or names a |
| 244 | project that does not exist, is left out. |
| 245 | |
| 246 | What g1t does with them: |
| 247 | |
| 248 | | | | |
| 249 | | --- | --- | |
| 250 | | **Addresses in builds and apps** | With `as: API_URL`, `web`'s builds and its running app get `API_URL` set to `api`'s address for the same environment: production gets `api`'s production; a preview gets the preview of `api` on the same branch if one is up, else `api`'s production. A secret or variable of the same name on `web` wins. | |
| 251 | | **Preview stacks** | On a pull request of `api` whose preview is up, **Preview them against this change** builds a preview of every project that uses `api`, from its default branch, under the same branch name, so each reaches the change through its variable. A reviewer clicks through the whole change. | |
| 252 | | **Affects** | A pull request lists the projects that use its project, so reviewers see what else a change can break. | |
| 253 | | **Agents** | An agent working on a project is told what it uses and what uses it. If its change alters what those rely on, it keeps it working for them or opens an issue on each saying what to change, and says so in its summary. | |
| 254 | | **The overview** | Each project's overview shows what it depends on and what uses it. | |
| 255 | |
| 256 | ## From the API |
| 257 | |
| 258 | Projects keep their repository's routes: `/repos/{workspace}/{project}/…` |
| 259 | reaches the project's repository, and its secrets and variables are the |
| 260 | project's. See the [API reference](/reference/api/). |