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.

333 linesCodeBlameRaw
1// @ts-check
2import starlight from '@astrojs/starlight';
3import { defineConfig } from 'astro/config';
4
5import { generateApiReference } from './scripts/api-reference.mjs';
6import { movedParts, pages } from './scripts/moved.mjs';
7
8// A page per REST operation, written from the OpenAPI document.
9const apiGroups = generateApiReference();
10
11// Pages that moved, so links already shared still arrive. A key with a
12// #heading is a part of a page that moved on its own (scripts/moved.mjs).
13const moved = {
14 '/guides/inbox/': '/guides/notifications/',
15 '/guides/mirroring/': '/guides/github/',
16 '/guides/today/': '/guides/home/',
17 // g1t no longer runs agents of its own: coding agents connect to it.
18 '/guides/g1t-agents/': '/guides/bring-your-own-agent/',
19 '/guides/working-with-g1t/': '/guides/bring-your-own-agent/',
20 '/guides/agents/': '/guides/bring-your-own-agent/',
21 '/guides/agent-abilities/': '/guides/bring-your-own-agent/',
22 '/guides/agent-access/': '/guides/bring-your-own-agent/',
23 '/guides/agent-memory/': '/guides/bring-your-own-agent/',
24 '/guides/agent-routines/': '/guides/bring-your-own-agent/',
25 '/guides/agent-sessions/': '/guides/why-blame/',
26 '/guides/agent-skills/': '/guides/bring-your-own-agent/',
27 '/guides/agent-budgets/': '/guides/usage-and-billing/',
28 '/guides/agents-and-memory/': '/guides/bring-your-own-agent/',
29 '/guides/talking-to-agents/': '/guides/bring-your-own-agent/',
30 '/guides/chat-app/': '/guides/chat/',
31 '/guides/customize/': '/guides/bring-your-own-agent/',
32 '/guides/marketplace/': '/guides/bring-your-own-agent/',
33 '/guides/models/': '/guides/ai/',
34 '/guides/ai-gateway/': '/guides/ai/',
35 '/guides/context-hub/': '/guides/bring-your-own-agent/',
36 // Project and workspace memory is gone: harnesses keep their own.
37 '/guides/memory/': '/guides/bring-your-own-agent/',
38 '/guides/spend/': '/guides/usage-and-billing/',
39 '/guides/outcomes/': '/work/milestones/',
40 // Issues became workspace work items: their operations moved with them.
41 '/reference/api/issues/list-issues/': '/reference/api/work-items/list-work-items/',
42 '/reference/api/issues/create-issue/': '/reference/api/work-items/open-work-item/',
43 '/reference/api/issues/get-issue/': '/reference/api/work-items/get-work-item/',
44 '/reference/api/issues/update-issue/': '/reference/api/work-items/update-work-item/',
45 '/reference/api/issues/close-issue/': '/reference/api/work-items/close-work-item/',
46 '/reference/api/issues/reopen-issue/': '/reference/api/work-items/reopen-work-item/',
47 '/reference/api/integrations/import-issue/': '/reference/api/work-items/import-work-items/',
48 '/reference/api/issues/list-issue-labels/': '/reference/api/work-items/list-work-item-labels/',
49 '/reference/api/issues/add-issue-labels/': '/reference/api/work-items/add-work-item-labels/',
50 '/reference/api/issues/set-issue-labels/': '/reference/api/work-items/set-work-item-labels/',
51 '/reference/api/issues/remove-issue-labels/': '/reference/api/work-items/remove-work-item-labels/',
52 '/reference/api/issues/remove-issue-label/': '/reference/api/work-items/remove-work-item-label/',
53 '/reference/api/issues/add-comment/': '/reference/api/work-items/add-work-item-comment/',
54 '/reference/api/issues/edit-comment/': '/reference/api/work-items/edit-work-item-comment/',
55 '/reference/api/issues/delete-comment/': '/reference/api/work-items/delete-work-item-comment/',
56 '/reference/api/issues/react/': '/reference/api/work-items/react-to-work-item/',
57 '/reference/api/issues/upload-attachment/': '/reference/api/work-items/upload-attachment/',
58 '/reference/api/decisions-and-why/list-issue-decisions/': '/reference/api/work-items/list-work-item-decisions/',
59 '/reference/api/claims-and-work/get-work/': '/reference/api/work-items/get-work/',
60 '/reference/api/claims-and-work/claim-issue/': '/reference/api/work-items/claim-work-item/',
61 '/reference/api/claims-and-work/claim-new-issue/': '/reference/api/work-items/claim-new-work-item/',
62 '/reference/api/claims-and-work/list-claims/': '/reference/api/work-items/list-claims/',
63 '/reference/api/claims-and-work/release-claim/': '/reference/api/work-items/release-claim/',
64 '/reference/api/claims-and-work/hand-off-issue/': '/reference/api/work-items/hand-off-work-item/',
65 '/reference/api/notifications/get-issue-subscription/': '/reference/api/notifications/get-work-item-subscription/',
66 '/reference/api/notifications/set-issue-subscription/': '/reference/api/notifications/set-work-item-subscription/',
67 '/reference/api/notifications/delete-issue-subscription/': '/reference/api/notifications/delete-work-item-subscription/',
68 // Work has a section of its own, as it has in the app.
69 '/guides/work-items/': '/work/work-items/',
70 '/guides/work-items/#open-a-work-item': '/work/work-items/#file-a-work-item',
71 '/guides/work-items/#the-work-list': '/work/#the-work-list',
72 '/guides/work-items/#the-board': '/work/board/',
73 '/guides/work-items/#closing-a-work-item': '/work/closing/',
74 '/guides/work-items/#labels-and-milestones': '/work/labels/',
75 '/guides/work-items/#work-on-one': '/work/agents/',
76 '/guides/work-items/#the-cli': '/work/agents/#the-cli',
77 '/guides/work-items/#mcp-and-the-api': '/work/agents/#mcp-and-the-api',
78 '/guides/labels/': '/work/labels/',
79 '/guides/milestones/': '/work/milestones/',
80 '/about/issues-became-work-items/': '/work/from-issues/',
81 // Sessions' pages, titles and claims moved to Work; recording a
82 // session from a harness stayed.
83 '/guides/sessions/#sessions': '/guides/sessions/#record-a-session',
84 '/guides/sessions/#the-sessions-page': '/work/sessions/',
85 '/guides/sessions/#on-the-site': '/work/sessions/#sessions-elsewhere-on-the-site',
86 '/guides/sessions/#session-titles': '/work/session-titles/',
87 '/guides/sessions/#picking-up-a-work-item': '/work/agents/#pick-up-a-work-item',
88 '/guides/sessions/#what-a-session-worked-on': '/work/sessions/#what-a-session-records',
89 '/guides/sessions/#claims': '/work/claims-and-dependencies/#claims',
90 '/guides/sessions/#dependencies': '/work/claims-and-dependencies/#dependencies',
91 '/guides/sessions/#overlaps': '/work/claims-and-dependencies/#overlaps',
92 '/guides/sessions/#events': '/work/claims-and-dependencies/#events',
93 '/guides/sessions/#who-sees-what': '/work/sessions/#who-sees-what',
94 '/guides/sessions/#who-may-do-what': '/work/claims-and-dependencies/#who-may-do-what',
95 '/guides/sessions/#pending-coordination-updates': '/work/claims-and-dependencies/#coordination-updates',
96};
97
98export default defineConfig({
99 site: 'https://docs.g1t.sh',
100 redirects: pages(moved),
101 integrations: [
102 movedParts(moved),
103 starlight({
104 title: 'g1t docs',
105 description: 'Guides and reference for g1t, the code platform for your team and its coding agents.',
106 components: {
107 Footer: './src/components/Footer.astro',
108 Head: './src/components/Head.astro',
109 Header: './src/components/Header.astro',
110 PageTitle: './src/components/PageTitle.astro',
111 SiteTitle: './src/components/SiteTitle.astro',
112 SocialIcons: './src/components/SocialIcons.astro',
113 },
114 // Each tab under the header shows its own part of the sidebar.
115 routeMiddleware: './src/route-data.ts',
116 expressiveCode: {
117 // Dark first, as the base; the light one where the page is light.
118 // Starlight switches between them by <html data-theme>.
119 themes: ['github-dark-default', 'github-light-default'],
120 useDarkModeMediaQuery: false,
121 // Plain panels with a copy button, without window chrome.
122 defaultProps: { frame: 'none' },
123 styleOverrides: {
124 borderRadius: '0.75rem',
125 borderColor: 'var(--g1t-line)',
126 codeBackground: 'var(--g1t-surface)',
127 codeFontSize: '0.8125rem',
128 frames: {
129 editorBackground: 'var(--g1t-surface)',
130 terminalBackground: 'var(--g1t-surface)',
131 terminalTitlebarBackground: 'var(--g1t-raised)',
132 terminalTitlebarBorderBottomColor: 'var(--g1t-line)',
133 editorTabBarBackground: 'var(--g1t-raised)',
134 shadowColor: 'transparent',
135 },
136 },
137 },
138 logo: { src: '@g1t/theme/mark.svg', alt: '' },
139 favicon: '/favicon.svg',
140 customCss: [
141 '@g1t/theme/fonts.css',
142 '@g1t/theme/tokens.css',
143 './src/styles/light.css',
144 './src/styles/g1t.css',
145 ],
146 editLink: {
147 baseUrl: 'https://g1t.sh/flagon-io/g1t/blob/main/apps/docs/',
148 },
149 lastUpdated: true,
150 head: [
151 { tag: 'link', attrs: { rel: 'icon', href: '/favicon.ico', sizes: '32x32' } },
152 { tag: 'link', attrs: { rel: 'icon', type: 'image/png', sizes: '192x192', href: '/icon-192.png' } },
153 { tag: 'link', attrs: { rel: 'icon', type: 'image/png', sizes: '512x512', href: '/icon-512.png' } },
154 { tag: 'link', attrs: { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' } },
155 { tag: 'link', attrs: { rel: 'manifest', href: '/site.webmanifest' } },
156 // The browser's own bars, in the page's colour for the system's setting.
157 { tag: 'meta', attrs: { name: 'theme-color', content: '#0f0f11', media: '(prefers-color-scheme: dark)' } },
158 { tag: 'meta', attrs: { name: 'theme-color', content: '#fbfbfa', media: '(prefers-color-scheme: light)' } },
159 ],
160 sidebar: [
161 {
162 label: 'Get started',
163 items: [
164 { label: 'Quickstart', slug: 'quickstart' },
165 { label: 'How g1t works', slug: 'concepts/overview' },
166 { label: 'The g1t CLI', slug: 'guides/cli' },
167 { label: 'Home', slug: 'guides/home' },
168 { label: 'Ask g1t', slug: 'guides/ask' },
169 { label: 'AI providers', slug: 'guides/ai' },
170 { label: 'Notifications', slug: 'guides/notifications' },
171 { label: 'The desktop app', slug: 'guides/desktop' },
172 { label: 'The phone app', slug: 'guides/mobile' },
173 { label: 'Search and Explore', slug: 'guides/search' },
174 { label: 'Status and incidents', slug: 'guides/status' },
175 ],
176 },
177 {
178 label: 'Work',
179 items: [
180 { label: 'Work', slug: 'work' },
181 { label: 'Work items', slug: 'work/work-items' },
182 { label: 'The Board', slug: 'work/board' },
183 { label: 'Closing work items', slug: 'work/closing' },
184 { label: 'Labels', slug: 'work/labels' },
185 { label: 'Milestones', slug: 'work/milestones' },
186 { label: 'Sessions', slug: 'work/sessions' },
187 { label: 'Session titles', slug: 'work/session-titles' },
188 { label: 'Claims and dependencies', slug: 'work/claims-and-dependencies' },
189 { label: 'Working with agents', slug: 'work/agents' },
190 { label: 'Issues became work items', slug: 'work/from-issues' },
191 ],
192 },
193 {
194 label: 'Chat',
195 items: [
196 { label: 'Chat', slug: 'guides/chat' },
197 { label: 'Artifacts', slug: 'guides/artifacts' },
198 ],
199 },
200 {
201 label: 'Projects',
202 items: [
203 { label: 'Projects', slug: 'guides/projects' },
204 { label: 'Deployments', slug: 'guides/deployments' },
205 { label: 'Deployments API', slug: 'guides/deployments-api' },
206 { label: 'Observability', slug: 'guides/observability' },
207 { label: 'Packages', slug: 'guides/packages' },
208 { label: 'Container images', slug: 'guides/containers' },
209 { label: 'npm', slug: 'guides/npm' },
210 { label: 'Cargo', slug: 'guides/cargo' },
211 { label: 'Composer', slug: 'guides/composer' },
212 { label: 'Maven', slug: 'guides/maven' },
213 { label: 'NuGet', slug: 'guides/nuget' },
214 { label: 'RubyGems', slug: 'guides/rubygems' },
215 { label: 'Go modules', slug: 'guides/go' },
216 { label: 'Secrets and variables', slug: 'guides/secrets-and-variables' },
217 ],
218 },
219 {
220 label: 'Security',
221 items: [
222 { label: 'Security', slug: 'guides/security' },
223 { label: 'Dependency updates', slug: 'guides/dependency-updates' },
224 { label: 'Secret protection', slug: 'guides/security/secret-protection' },
225 { label: 'Code scanning', slug: 'guides/security/code-scanning' },
226 { label: 'Supply chain', slug: 'guides/security/supply-chain' },
227 { label: 'Advisories and reporting', slug: 'guides/security/advisories' },
228 { label: 'Security overview', slug: 'guides/security/security-overview' },
229 { label: "What's free and what's paid", slug: 'guides/security/pricing' },
230 ],
231 },
232 {
233 label: 'Coding agents',
234 items: [
235 { label: 'Connect a coding agent', slug: 'guides/bring-your-own-agent' },
236 { label: 'Build and ship an app with an agent', slug: 'guides/build-and-ship' },
237 { label: 'Claude Code plugin', slug: 'guides/claude-code-plugin' },
238 { label: 'Recording sessions', slug: 'guides/sessions' },
239 { label: 'Sessions and why-blame', slug: 'guides/why-blame' },
240 ],
241 },
242 {
243 label: 'Connect your tools',
244 items: [
245 { label: 'Integrations', slug: 'guides/integrations' },
246 { label: 'Webhooks', slug: 'guides/webhooks' },
247 { label: 'GitHub Actions', slug: 'guides/actions' },
248 { label: 'Self-hosted runners', slug: 'guides/self-hosted-runners' },
249 { label: 'Guardrails', slug: 'guides/guardrails' },
250 ],
251 },
252 {
253 label: 'Landing changes',
254 items: [
255 { label: 'Pull requests and checks', slug: 'guides/pull-requests' },
256 { label: 'Checks', slug: 'guides/checks' },
257 { label: 'Pull requests into other branches', slug: 'guides/base-branches' },
258 { label: 'The merge queue', slug: 'guides/merge-queue' },
259 { label: 'Rules', slug: 'guides/rules' },
260 { label: 'CODEOWNERS', slug: 'guides/codeowners' },
261 { label: 'Forks and working copies', slug: 'concepts/forks' },
262 ],
263 },
264 {
265 label: 'Workspaces',
266 items: [
267 { label: 'Accounts and sign-in', slug: 'guides/authentication' },
268 { label: 'GitHub', slug: 'guides/github' },
269 { label: 'Workspaces and tokens', slug: 'guides/workspaces' },
270 { label: 'Access and roles', slug: 'guides/access-and-roles' },
271 { label: 'Permissions', slug: 'guides/permissions' },
272 { label: 'Single sign-on', slug: 'guides/single-sign-on' },
273 { label: 'Teams', slug: 'guides/teams' },
274 { label: 'People and teams', slug: 'guides/people-and-teams' },
275 { label: 'Managing a repository', slug: 'guides/managing-repositories' },
276 { label: 'Releases', slug: 'guides/releases' },
277 { label: 'Forking a repository', slug: 'guides/forking-repositories' },
278 { label: 'Transferring a repository', slug: 'guides/transferring-repositories' },
279 { label: 'Audit log', slug: 'guides/audit-log' },
280 { label: 'Usage and billing', slug: 'guides/usage-and-billing' },
281 { label: 'Git', slug: 'guides/git' },
282 ],
283 },
284 {
285 label: 'Run g1t yourself',
286 items: [
287 { label: 'With Docker Compose', slug: 'guides/self-hosting' },
288 { label: 'How a self-hosted g1t runs', slug: 'guides/self-hosting-architecture' },
289 { label: 'Deploy to Cloudflare', slug: 'guides/deploy-to-cloudflare' },
290 ],
291 },
292 {
293 label: 'Architecture',
294 items: [
295 { label: 'Overview', slug: 'architecture/overview' },
296 { label: 'How a request is served', slug: 'architecture/requests' },
297 { label: 'Services and contracts', slug: 'architecture/services' },
298 { label: 'Git', slug: 'architecture/git' },
299 { label: 'Events', slug: 'architecture/events' },
300 { label: 'Work and the merge queue', slug: 'architecture/work' },
301 { label: 'Actions, runners and sandboxes', slug: 'architecture/compute' },
302 { label: 'Deployments and telemetry', slug: 'architecture/deployments' },
303 { label: 'Data and storage', slug: 'architecture/data' },
304 { label: 'Identity and access', slug: 'architecture/identity' },
305 { label: 'How g1t ships', slug: 'architecture/shipping' },
306 ],
307 },
308 {
309 label: 'Reference',
310 items: [
311 { label: 'API overview', slug: 'reference/api' },
312 { label: 'MCP tools', slug: 'reference/mcp' },
313 { label: 'CLI commands', slug: 'reference/cli' },
314 { label: 'Developer resources', slug: 'reference/developers' },
315 { label: 'Versioning policy', slug: 'reference/versioning' },
316 { label: 'Rate limits', slug: 'reference/rate-limits' },
317 { label: 'Try it in the explorer', link: '/api/reference/', attrs: { target: '_self' } },
318 { label: 'OpenAPI document', link: 'https://api.g1t.sh/openapi.json' },
319 { label: 'llms.txt', link: 'https://g1t.sh/llms.txt' },
320 ],
321 },
322 {
323 label: 'About',
324 items: [
325 { label: "What g1t can't do yet", slug: 'about/limitations' },
326 { label: 'An open letter to Cloudflare', slug: 'about/open-letter-to-cloudflare' },
327 ],
328 },
329 ...apiGroups,
330 ],
331 }),
332 ],
333});