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