Skip to content
217 linesCodeBlameRaw
1// @ts-check
2import starlight from '@astrojs/starlight';
3import { defineConfig } from 'astro/config';
4
5import { generateApiReference } from './scripts/api-reference.mjs';
6
7// A page per REST operation, written from the OpenAPI document.
8const apiGroups = generateApiReference();
9
10export default defineConfig({
11 site: 'https://docs.g1t.sh',
12 // Pages that moved, so links already shared still arrive.
13 redirects: {
14 '/guides/g1t-agents/': '/guides/working-with-g1t/',
15 '/guides/inbox/': '/guides/notifications/',
16 },
17 integrations: [
18 starlight({
19 title: 'g1t docs',
20 description: 'Guides and reference for g1t, the workspace where a team and its agents talk, work and ship.',
21 components: {
22 Footer: './src/components/Footer.astro',
23 Head: './src/components/Head.astro',
24 Header: './src/components/Header.astro',
25 PageTitle: './src/components/PageTitle.astro',
26 SiteTitle: './src/components/SiteTitle.astro',
27 SocialIcons: './src/components/SocialIcons.astro',
28 },
29 // Each tab under the header shows its own part of the sidebar.
30 routeMiddleware: './src/route-data.ts',
31 expressiveCode: {
32 // Dark first, as the base; the light one where the page is light.
33 // Starlight switches between them by <html data-theme>.
34 themes: ['github-dark-default', 'github-light-default'],
35 useDarkModeMediaQuery: false,
36 // Plain panels with a copy button, without window chrome.
37 defaultProps: { frame: 'none' },
38 styleOverrides: {
39 borderRadius: '0.75rem',
40 borderColor: 'var(--g1t-line)',
41 codeBackground: 'var(--g1t-surface)',
42 codeFontSize: '0.8125rem',
43 frames: {
44 editorBackground: 'var(--g1t-surface)',
45 terminalBackground: 'var(--g1t-surface)',
46 terminalTitlebarBackground: 'var(--g1t-raised)',
47 terminalTitlebarBorderBottomColor: 'var(--g1t-line)',
48 editorTabBarBackground: 'var(--g1t-raised)',
49 shadowColor: 'transparent',
50 },
51 },
52 },
53 logo: { src: '@g1t/theme/mark.svg', alt: '' },
54 favicon: '/favicon.svg',
55 customCss: [
56 '@g1t/theme/fonts.css',
57 '@g1t/theme/tokens.css',
58 './src/styles/light.css',
59 './src/styles/g1t.css',
60 ],
61 editLink: {
62 baseUrl: 'https://g1t.sh/flagon-io/g1t/blob/main/apps/docs/',
63 },
64 lastUpdated: true,
65 head: [
66 { tag: 'link', attrs: { rel: 'icon', href: '/favicon.ico', sizes: '32x32' } },
67 { tag: 'link', attrs: { rel: 'icon', type: 'image/png', sizes: '192x192', href: '/icon-192.png' } },
68 { tag: 'link', attrs: { rel: 'icon', type: 'image/png', sizes: '512x512', href: '/icon-512.png' } },
69 { tag: 'link', attrs: { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' } },
70 { tag: 'link', attrs: { rel: 'manifest', href: '/site.webmanifest' } },
71 // The browser's own bars, in the page's colour for the system's setting.
72 { tag: 'meta', attrs: { name: 'theme-color', content: '#0f0f11', media: '(prefers-color-scheme: dark)' } },
73 { tag: 'meta', attrs: { name: 'theme-color', content: '#fbfbfa', media: '(prefers-color-scheme: light)' } },
74 ],
75 sidebar: [
76 {
77 label: 'Get started',
78 items: [
79 { label: 'Quickstart', slug: 'quickstart' },
80 { label: 'How g1t works', slug: 'concepts/overview' },
81 { label: 'Today', slug: 'guides/today' },
82 { label: 'Notifications', slug: 'guides/notifications' },
83 { label: 'Search and Explore', slug: 'guides/search' },
84 { label: 'Status and incidents', slug: 'guides/status' },
85 ],
86 },
87 {
88 label: 'Chat and agents',
89 items: [
90 { label: 'Chat', slug: 'guides/chat' },
91 { label: 'Agents', slug: 'guides/agents' },
92 { label: 'Sessions', slug: 'guides/agent-sessions' },
93 { label: 'Agent memory', slug: 'guides/agent-memory' },
94 { label: 'Routines', slug: 'guides/agent-routines' },
95 { label: 'Spend', slug: 'guides/spend' },
96 { label: 'Agent budgets and spend', slug: 'guides/agent-budgets' },
97 { label: 'What agents can do for whom', slug: 'guides/agent-access' },
98 { label: 'Artifacts', slug: 'guides/artifacts' },
99 { label: 'Agents in your chat app', slug: 'guides/chat-app', badge: { text: 'Soon', variant: 'default' } },
100 ],
101 },
102 {
103 label: 'Projects',
104 items: [
105 { label: 'Projects', slug: 'guides/projects' },
106 { label: 'Deployments', slug: 'guides/deployments' },
107 { label: 'Deployments API', slug: 'guides/deployments-api' },
108 { label: 'Packages', slug: 'guides/packages' },
109 { label: 'Container images', slug: 'guides/containers' },
110 { label: 'npm', slug: 'guides/npm' },
111 { label: 'Cargo', slug: 'guides/cargo' },
112 { label: 'Composer', slug: 'guides/composer' },
113 { label: 'Maven', slug: 'guides/maven' },
114 { label: 'NuGet', slug: 'guides/nuget' },
115 { label: 'RubyGems', slug: 'guides/rubygems' },
116 { label: 'Go modules', slug: 'guides/go' },
117 { label: 'Secrets and variables', slug: 'guides/secrets-and-variables' },
118 ],
119 },
120 {
121 label: 'Security',
122 items: [
123 { label: 'Security', slug: 'guides/security' },
124 { label: 'Dependency updates', slug: 'guides/dependency-updates' },
125 { label: 'Secret protection', slug: 'guides/security/secret-protection' },
126 { label: 'Code scanning', slug: 'guides/security/code-scanning' },
127 { label: 'Supply chain', slug: 'guides/security/supply-chain' },
128 { label: 'Security overview', slug: 'guides/security/security-overview' },
129 { label: "What's free and what's paid", slug: 'guides/security/pricing' },
130 ],
131 },
132 {
133 label: 'Agents on code',
134 items: [
135 { label: "g1t's agent", slug: 'guides/working-with-g1t' },
136 { label: 'Guardrails', slug: 'guides/guardrails' },
137 { label: 'Outcomes and plans', slug: 'guides/outcomes' },
138 { label: 'Talking to agents', slug: 'guides/talking-to-agents' },
139 { label: 'Agents, sessions and memory', slug: 'guides/agents-and-memory' },
140 { label: 'Context hub', slug: 'guides/context-hub' },
141 { label: 'Bring your own agent', slug: 'guides/bring-your-own-agent' },
142 ],
143 },
144 {
145 label: 'Connect your tools',
146 items: [
147 { label: 'Integrations', slug: 'guides/integrations' },
148 { label: 'Model providers', slug: 'guides/models' },
149 { label: 'AI Gateway', slug: 'guides/ai-gateway' },
150 { label: 'Webhooks', slug: 'guides/webhooks' },
151 { label: 'GitHub Actions', slug: 'guides/actions' },
152 { label: 'Self-hosted runners', slug: 'guides/self-hosted-runners' },
153 ],
154 },
155 {
156 label: 'Landing changes',
157 items: [
158 { label: 'Pull requests and checks', slug: 'guides/pull-requests' },
159 { label: 'Checks', slug: 'guides/checks' },
160 { label: 'Pull requests into other branches', slug: 'guides/base-branches' },
161 { label: 'Labels', slug: 'guides/labels' },
162 { label: 'Milestones', slug: 'guides/milestones' },
163 { label: 'The merge queue', slug: 'guides/merge-queue' },
164 { label: 'Rules', slug: 'guides/rules' },
165 { label: 'CODEOWNERS', slug: 'guides/codeowners' },
166 { label: 'Sessions and why-blame', slug: 'guides/why-blame' },
167 { label: 'Forks and branches', slug: 'concepts/forks' },
168 ],
169 },
170 {
171 label: 'Workspaces',
172 items: [
173 { label: 'Accounts and sign-in', slug: 'guides/authentication' },
174 { label: 'GitHub', slug: 'guides/github' },
175 { label: 'Mirroring', slug: 'guides/mirroring' },
176 { label: 'Workspaces and tokens', slug: 'guides/workspaces' },
177 { label: 'Access and roles', slug: 'guides/access-and-roles' },
178 { label: 'Teams', slug: 'guides/teams' },
179 { label: 'Managing a repository', slug: 'guides/managing-repositories' },
180 { label: 'Releases', slug: 'guides/releases' },
181 { label: 'Transferring a repository', slug: 'guides/transferring-repositories' },
182 { label: 'Audit log', slug: 'guides/audit-log' },
183 { label: 'Usage and billing', slug: 'guides/usage-and-billing' },
184 { label: 'Git', slug: 'guides/git' },
185 ],
186 },
187 {
188 label: 'Run g1t yourself',
189 items: [
190 { label: 'With Docker Compose', slug: 'guides/self-hosting' },
191 { label: 'How a self-hosted g1t runs', slug: 'guides/self-hosting-architecture' },
192 { label: 'Deploy to Cloudflare', slug: 'guides/deploy-to-cloudflare' },
193 ],
194 },
195 {
196 label: 'Reference',
197 items: [
198 { label: 'API overview', slug: 'reference/api' },
199 { label: 'MCP tools', slug: 'reference/mcp' },
200 { label: 'Rate limits', slug: 'reference/rate-limits' },
201 { label: 'Try it in the explorer', link: '/api/reference/', attrs: { target: '_self' } },
202 { label: 'OpenAPI document', link: 'https://api.g1t.sh/openapi.json' },
203 { label: 'llms.txt', link: 'https://g1t.sh/llms.txt' },
204 ],
205 },
206 {
207 label: 'About',
208 items: [
209 { label: "What g1t can't do yet", slug: 'about/limitations' },
210 { label: 'An open letter to Cloudflare', slug: 'about/open-letter-to-cloudflare' },
211 ],
212 },
213 ...apiGroups,
214 ],
215 }),
216 ],
217});