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.

328 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: ["@g1t/theme/fonts.css", "@g1t/theme/tokens.css", "./src/styles/light.css", "./src/styles/g1t.css"],
141 editLink: {
142 baseUrl: "https://g1t.sh/flagon-io/g1t/blob/main/apps/docs/",
143 },
144 lastUpdated: true,
145 head: [
146 { tag: "link", attrs: { rel: "icon", href: "/favicon.ico", sizes: "32x32" } },
147 { tag: "link", attrs: { rel: "icon", type: "image/png", sizes: "192x192", href: "/icon-192.png" } },
148 { tag: "link", attrs: { rel: "icon", type: "image/png", sizes: "512x512", href: "/icon-512.png" } },
149 { tag: "link", attrs: { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" } },
150 { tag: "link", attrs: { rel: "manifest", href: "/site.webmanifest" } },
151 // The browser's own bars, in the page's colour for the system's setting.
152 { tag: "meta", attrs: { name: "theme-color", content: "#0f0f11", media: "(prefers-color-scheme: dark)" } },
153 { tag: "meta", attrs: { name: "theme-color", content: "#fbfbfa", media: "(prefers-color-scheme: light)" } },
154 ],
155 sidebar: [
156 {
157 label: "Get started",
158 items: [
159 { label: "Quickstart", slug: "quickstart" },
160 { label: "How g1t works", slug: "concepts/overview" },
161 { label: "The g1t CLI", slug: "guides/cli" },
162 { label: "Home", slug: "guides/home" },
163 { label: "Ask g1t", slug: "guides/ask" },
164 { label: "AI providers", slug: "guides/ai" },
165 { label: "Notifications", slug: "guides/notifications" },
166 { label: "The desktop app", slug: "guides/desktop" },
167 { label: "The phone app", slug: "guides/mobile" },
168 { label: "Search and Explore", slug: "guides/search" },
169 { label: "Status and incidents", slug: "guides/status" },
170 ],
171 },
172 {
173 label: "Work",
174 items: [
175 { label: "Work", slug: "work" },
176 { label: "Work items", slug: "work/work-items" },
177 { label: "The Board", slug: "work/board" },
178 { label: "Closing work items", slug: "work/closing" },
179 { label: "Labels", slug: "work/labels" },
180 { label: "Milestones", slug: "work/milestones" },
181 { label: "Sessions", slug: "work/sessions" },
182 { label: "Session titles", slug: "work/session-titles" },
183 { label: "Claims and dependencies", slug: "work/claims-and-dependencies" },
184 { label: "Working with agents", slug: "work/agents" },
185 { label: "Issues became work items", slug: "work/from-issues" },
186 ],
187 },
188 {
189 label: "Chat",
190 items: [
191 { label: "Chat", slug: "guides/chat" },
192 { label: "Artifacts", slug: "guides/artifacts" },
193 ],
194 },
195 {
196 label: "Projects",
197 items: [
198 { label: "Projects", slug: "guides/projects" },
199 { label: "Deployments", slug: "guides/deployments" },
200 { label: "Deployments API", slug: "guides/deployments-api" },
201 { label: "Observability", slug: "guides/observability" },
202 { label: "Packages", slug: "guides/packages" },
203 { label: "Container images", slug: "guides/containers" },
204 { label: "npm", slug: "guides/npm" },
205 { label: "Cargo", slug: "guides/cargo" },
206 { label: "Composer", slug: "guides/composer" },
207 { label: "Maven", slug: "guides/maven" },
208 { label: "NuGet", slug: "guides/nuget" },
209 { label: "RubyGems", slug: "guides/rubygems" },
210 { label: "Go modules", slug: "guides/go" },
211 { label: "Secrets and variables", slug: "guides/secrets-and-variables" },
212 ],
213 },
214 {
215 label: "Security",
216 items: [
217 { label: "Security", slug: "guides/security" },
218 { label: "Dependency updates", slug: "guides/dependency-updates" },
219 { label: "Secret protection", slug: "guides/security/secret-protection" },
220 { label: "Code scanning", slug: "guides/security/code-scanning" },
221 { label: "Supply chain", slug: "guides/security/supply-chain" },
222 { label: "Advisories and reporting", slug: "guides/security/advisories" },
223 { label: "Security overview", slug: "guides/security/security-overview" },
224 { label: "What's free and what's paid", slug: "guides/security/pricing" },
225 ],
226 },
227 {
228 label: "Coding agents",
229 items: [
230 { label: "Connect a coding agent", slug: "guides/bring-your-own-agent" },
231 { label: "Build and ship an app with an agent", slug: "guides/build-and-ship" },
232 { label: "Claude Code plugin", slug: "guides/claude-code-plugin" },
233 { label: "Recording sessions", slug: "guides/sessions" },
234 { label: "Sessions and why-blame", slug: "guides/why-blame" },
235 ],
236 },
237 {
238 label: "Connect your tools",
239 items: [
240 { label: "Integrations", slug: "guides/integrations" },
241 { label: "Webhooks", slug: "guides/webhooks" },
242 { label: "GitHub Actions", slug: "guides/actions" },
243 { label: "Self-hosted runners", slug: "guides/self-hosted-runners" },
244 { label: "Guardrails", slug: "guides/guardrails" },
245 ],
246 },
247 {
248 label: "Landing changes",
249 items: [
250 { label: "Pull requests and checks", slug: "guides/pull-requests" },
251 { label: "Checks", slug: "guides/checks" },
252 { label: "Pull requests into other branches", slug: "guides/base-branches" },
253 { label: "The merge queue", slug: "guides/merge-queue" },
254 { label: "Rules", slug: "guides/rules" },
255 { label: "CODEOWNERS", slug: "guides/codeowners" },
256 { label: "Forks and working copies", slug: "concepts/forks" },
257 ],
258 },
259 {
260 label: "Workspaces",
261 items: [
262 { label: "Accounts and sign-in", slug: "guides/authentication" },
263 { label: "GitHub", slug: "guides/github" },
264 { label: "Workspaces and tokens", slug: "guides/workspaces" },
265 { label: "Access and roles", slug: "guides/access-and-roles" },
266 { label: "Permissions", slug: "guides/permissions" },
267 { label: "Single sign-on", slug: "guides/single-sign-on" },
268 { label: "Teams", slug: "guides/teams" },
269 { label: "People and teams", slug: "guides/people-and-teams" },
270 { label: "Managing a repository", slug: "guides/managing-repositories" },
271 { label: "Releases", slug: "guides/releases" },
272 { label: "Forking a repository", slug: "guides/forking-repositories" },
273 { label: "Transferring a repository", slug: "guides/transferring-repositories" },
274 { label: "Audit log", slug: "guides/audit-log" },
275 { label: "Usage and billing", slug: "guides/usage-and-billing" },
276 { label: "Git", slug: "guides/git" },
277 ],
278 },
279 {
280 label: "Run g1t yourself",
281 items: [
282 { label: "With Docker Compose", slug: "guides/self-hosting" },
283 { label: "How a self-hosted g1t runs", slug: "guides/self-hosting-architecture" },
284 { label: "Deploy to Cloudflare", slug: "guides/deploy-to-cloudflare" },
285 ],
286 },
287 {
288 label: "Architecture",
289 items: [
290 { label: "Overview", slug: "architecture/overview" },
291 { label: "How a request is served", slug: "architecture/requests" },
292 { label: "Services and contracts", slug: "architecture/services" },
293 { label: "Git", slug: "architecture/git" },
294 { label: "Events", slug: "architecture/events" },
295 { label: "Work and the merge queue", slug: "architecture/work" },
296 { label: "Actions, runners and sandboxes", slug: "architecture/compute" },
297 { label: "Deployments and telemetry", slug: "architecture/deployments" },
298 { label: "Data and storage", slug: "architecture/data" },
299 { label: "Identity and access", slug: "architecture/identity" },
300 { label: "How g1t ships", slug: "architecture/shipping" },
301 ],
302 },
303 {
304 label: "Reference",
305 items: [
306 { label: "API overview", slug: "reference/api" },
307 { label: "MCP tools", slug: "reference/mcp" },
308 { label: "CLI commands", slug: "reference/cli" },
309 { label: "Developer resources", slug: "reference/developers" },
310 { label: "Versioning policy", slug: "reference/versioning" },
311 { label: "Rate limits", slug: "reference/rate-limits" },
312 { label: "Try it in the explorer", link: "/api/reference/", attrs: { target: "_self" } },
313 { label: "OpenAPI document", link: "https://api.g1t.sh/openapi.json" },
314 { label: "llms.txt", link: "https://g1t.sh/llms.txt" },
315 ],
316 },
317 {
318 label: "About",
319 items: [
320 { label: "What g1t can't do yet", slug: "about/limitations" },
321 { label: "An open letter to Cloudflare", slug: "about/open-letter-to-cloudflare" },
322 ],
323 },
324 ...apiGroups,
325 ],
326 }),
327 ],
328});