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