Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh
209 linesCodeBlameRaw
1---
2title: The phone app
3description: g1t on Android and iOS, built with Expo. Chat with your team, live, with notifications on your phone, and Code, signed in with g1t's own OAuth. Android first, downloaded from g1t.sh while it waits for Google Play.
4---
5
6The phone app is g1t on Android and iOS, with its own screens for what
7you do away from a desk: talking with your team in Chat, with
8notifications on your phone, and reviewing pull requests in Code.
9Everything else opens on the site, in your phone's browser.
10
11## Install it
12
13Android comes first. Get it from [g1t.sh/download](https://g1t.sh/download),
14under **On your phone**:
15
161. On your Android phone, choose **Download for Android**. On a computer,
17 scan the code there with the phone's camera instead.
182. Open the downloaded file. Android asks once to allow your browser to
19 install apps: allow it.
203. Open **g1t (beta)** and choose **Sign in with g1t**.
21
22The page shows each release's SHA-256, to check the file you have is the
23one g1t published.
24
25**Why a download, and not Google Play?** Google Play and the App Store
26publish a company's apps only once it is verified with a D-U-N-S number,
27and Flagon's is on its way. Until then the Android app is published on
28g1t.sh, signed by g1t, as [the desktop app](/guides/desktop/) is. It moves
29into Google Play as soon as it can. iOS has no way in but the App Store,
30so it follows then.
31
32**Updates** reach the app by themselves: most arrive the next time you
33open it, with nothing to install. A change that needs a new install is a
34new release on the download page; installing it over the one you have
35keeps you signed in.
36
37The bar along the bottom is the site's phone bar:
38
39| Tab | What is on it |
40| --- | --- |
41| **Home** | Coming. Opens Home on the site meanwhile. |
42| **Chat** | Your starred conversations, channels and direct messages, with what is unread, moving live. See [Chat](#chat). |
43| **Notifications** | Coming. Opens your notifications on the site meanwhile; messages to you already arrive [on the phone](#notifications). |
44| **Code** | The workspace's repositories, each with its pull requests and issues. A pull request shows its description, checks, conversation and changed files, and you can approve it or ask for changes. An issue shows the pull requests made for it, and you can comment. Shown when you use Code in the workspace. |
45| **More** | Whether this phone gets notifications, your workspaces, how you signed in, and **Sign out**. |
46
47## Chat
48
49Chat on the phone is the site's Chat: the same conversations, as they
50happen.
51
52- **Conversations** show messages as the site draws them: bold, italic,
53 code, lists, quotes, tables and links, with `@mentions`, `#channels`
54 and `#123` references standing out. Messages by one person a few minutes
55 apart run together, and each day is marked.
56- **Live.** New messages, edits, deletions and reactions appear as they
57 happen, and the line above the box says who is typing. Unread counts in
58 the list and on the **Chat** tab move as messages arrive anywhere.
59- **Sending** shows your message at once. If it doesn't reach g1t, it
60 stays, marked **Not sent**: tap it to try again.
61- **Long-press a message** to react, reply in a thread, copy it, or edit
62 or delete your own. Tap a reaction to add yours or take it back.
63- **Threads** open from a message's replies, with the message they are
64 under at the top.
65- **⋯** on a conversation stars, mutes or leaves it.
66- **New message** (the pen at the top of Chat) messages a person, or a few
67 people together, or makes a channel. **Browse** at the
68 foot of the list joins public channels.
69
70A notification for a conversation you have open is not shown; one for
71another shows as a banner at the top of the screen.
72
73## Notifications
74
75The phone gets the same notifications as [browser push](/guides/notifications/#on-your-phone):
76messages to you, mentions and replies in threads you are in, under the
77same rules. Nothing comes while you are using
78g1t in a browser or in the app itself, and nothing in
79[Do not disturb](/guides/chat/#sounds-and-do-not-disturb). Tapping one
80opens the conversation or thread it is about.
81
82The app asks to notify you the first time you sign in. To change it
83later, use **More → Notifications on this phone**, or the phone's own
84settings for g1t, where Android lists the **Messages** channel. Signing
85out stops them on that phone.
86
87## Signing in
88
89**Sign in with g1t** opens g1t.sh in your phone's browser, where you sign
90in as usual (with your password, GitHub, two-factor) and approve the app.
91The browser sends you back to the app, signed in. The app never sees your
92password. This is [OAuth](/guides/authentication/#signing-in-with-oauth):
93the app is listed as **g1t for Android** or **g1t for iOS** in
94[Settings → Connected applications](https://g1t.sh/settings/applications),
95where **Change access** narrows what it can do and **Sign out** ends it at
96once.
97
98The approval page lists what the app asks for: reading your account,
99workspaces, repositories, checks and workflows, reading and writing
100issues, pull requests and notifications, recalling memory, and reading
101artifacts. Untick what you would rather it
102could not do.
103
104**Use an access token** signs in with a
105[personal access token](/guides/authentication/#access-tokens) you paste
106in instead. The token stays on your phone, in its keystore.
107
108The app asks for `chat:read` and `chat:write` too. They let it use
109Chat's routes and live connections on the site, and register for
110notifications, and nothing else there: the app's sign-in cannot open the
111site's pages as you.
112
113## Links
114
115A `g1t://` link opens the app, as it opens [the desktop app](/guides/desktop/#links):
116`g1t://acme/-/chat/dm/chn_1` is that conversation. The app shows the
117pages it has screens for:
118
119| Link | Opens |
120| --- | --- |
121| `g1t://<workspace>/-/chat`, `…/-/chat/<channel>`, `…/-/chat/dm/<id>` | Chat, or the conversation, in that workspace |
122| `g1t://<owner>/<repo>` | The repository |
123| `g1t://<owner>/<repo>/pull/<number>`, `…/issues/<number>` | The pull request or issue |
124
125Any other page opens on the site, in the browser.
126
127## Your own g1t
128
129The app works with a g1t you [run yourself](/guides/self-hosting/) as well
130as with g1t.sh. It talks to one g1t at a time, and opens on g1t.sh unless
131you point it elsewhere. Two ways to point it at yours:
132
133- **Scan its code.** Your g1t's download page, `<your g1t>/download`, has
134 a QR code under **On your phone**. Scan it with the phone's camera, or
135 open the page on the phone and choose **Open in the g1t app**. The app
136 asks **Use g1t.example.com?**, then signs you in there.
137- **Type its address.** On the sign-in screen, choose **Using your own
138 g1t? Sign in there** and enter the address you open it at in a browser,
139 such as `g1t.example.com`.
140
141Either way the app reads `<your g1t>/.well-known/g1t.json`, where your g1t
142says where its API is, so you never type that. A g1t from before the phone
143app has no such file: the app then takes the API to be `api.` in front of
144the site, and offers **Its API is at another address** if it is not.
145
146The sign-in screen then says **Signing in to g1t.example.com**, with
147**Change** and **Use g1t.sh**. Switching signs you out of the g1t you were
148on.
149
150| Your g1t | What to know |
151| --- | --- |
152| Reached by the phone | `PUBLIC_URL` and `API_URL` must be addresses the phone can open. `localhost` on a phone is the phone itself: use your computer's address on the network, or a domain. |
153| `https` | Store builds of the app open `https` addresses only, as Android requires. A development build also opens `http`, for a g1t on your own network. |
154| Notifications | Work with no setup: your g1t sends them through Expo's push service, as g1t.sh does. To keep notifications' words off Expo's, Google's and Apple's services, set `PHONE_PUSH=off` ([self-hosting](/guides/self-hosting/#the-phone-app)); the app then says your g1t sends no notifications, and Chat still updates while it is open. |
155| Older versions | A g1t from before the phone app does not let the app's sign-in into Chat. Upgrade it, or sign in with an access token that has **Use the website as you**. |
156
157## What's not there yet
158
159- **Google Play and the App Store**, once Flagon's D-U-N-S number
160 arrives ([above](#install-it)). Until then, Android from the download
161 page; iOS waits for the App Store.
162- **Home, Notifications and Artifacts** as tabs of their own.
163 Their pages open on the site meanwhile.
164- **Formatting in Code.** Descriptions and comments show their Markdown
165 as written; messages in Chat are formatted.
166- **Attachments and custom emoji.** Files in messages, and a
167 workspace's own `:emoji:`, show as their names.
168- **Replying from a notification**, without opening the app.
169- **https links.** `g1t.sh` addresses open the site in the browser, not
170 the app, until g1t.sh publishes the files Android and iOS check first.
171
172## For operators: building and releasing
173
174The app lives in `apps/mobile`: [Expo](https://expo.dev) with Expo
175Router, in TypeScript, sharing types with the site through
176`@g1t/contracts`. It builds with EAS Build. `apps/mobile/README.md` has
177the commands for running it on a phone and the first-time setup.
178
179| Build | Command | What it makes |
180| --- | --- | --- |
181| Development | `eas build --profile development --platform android` | An APK of `g1t (dev)` (`sh.g1t.app.dev`) that loads its code from your computer. |
182| Preview | `npm run build:android:apk -w @g1t/mobile` | An APK of `g1t (beta)` (`sh.g1t.app.preview`) to install on testers' phones. |
183| Production | `npm run build:android -w @g1t/mobile` | An Android App Bundle of `g1t` (`sh.g1t.app`) for Google Play. |
184
185The three install side by side. `eas submit --platform android` sends
186the latest production build to Google Play's internal testing track as a
187draft, once there is a Play account to send it to.
188
189### Releasing on g1t.sh/download
190
191Until the app is in Google Play, the `preview` build is the one people
192install, from g1t.sh/download. A release is a tag `mobile-v<version>`,
193where the version is `version` in `apps/mobile/app.config.ts`: push it,
194and the `Mobile release` workflow (`.g1t/workflows/mobile-release.yml`)
195has EAS build the APK, then publishes it to the `g1t-downloads` bucket
196at `g1t.sh/downloads/mobile/<version>/` and points `mobile/latest.json`
197at it, which the download page reads. `scripts/mobile-release.mjs` does
198the same by hand (`build`, `fetch`, `manifest`, `publish`).
199
200| Secret or variable | What it is |
201| --- | --- |
202| `EXPO_TOKEN` | An Expo access token with access to the g1t project, from expo.dev |
203| `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID` | As the deploy has them |
204
205Most changes need no release: `eas update --channel preview` in
206`apps/mobile` sends the app's new code to every installed copy of that
207version, which takes it the next time it opens. A release is for a change
208to the app's native side (a new native module, `app.config.ts`) or its
209`version`, which is also what decides which updates a copy takes.