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