flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/apps/docs/src/pages/api/reference.astro

167 lines4,741 bytesCodeBlame
1---
2// The interactive API reference: Scalar's explorer over g1t's OpenAPI
3// document. It is a standalone page because the explorer brings its own
4// layout.
5import '@g1t/theme/tokens.css';
6
7const configuration = {
8 theme: 'none',
9 darkMode: true,
10 hideDarkModeToggle: true,
11 hideClientButton: true,
12 hideModels: true,
13 defaultHttpClient: { targetKey: 'shell', clientKey: 'curl' },
14};
15---
16
17<!doctype html>
18<html lang="en">
19 <head>
20 <meta charset="utf-8" />
21 <meta name="viewport" content="width=device-width, initial-scale=1" />
22 <title>API reference · g1t docs</title>
23 <meta
24 name="description"
25 content="Every g1t API endpoint, with an explorer to call them from the page."
26 />
27 <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
28 <link rel="canonical" href="https://docs.g1t.sh/api/reference/" />
29 <link rel="preconnect" href="https://fonts.googleapis.com" />
30 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
31 <link
32 rel="stylesheet"
33 href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&family=JetBrains+Mono:wght@400;500;600&display=swap"
34 />
35 </head>
36 <body>
37 <header class="bar">
38 <a class="brand" href="/" aria-label="g1t docs home">
39 <svg viewBox="0 0 32 32" aria-hidden="true">
40 <path d="M16 2.5 28 9.4 16 16.3 4 9.4Z" fill="currentColor"></path>
41 <path d="M4 10.9 15.3 17.4V30.2L4 23.7Z" fill="currentColor" fill-opacity="0.55"></path>
42 <path d="M28 10.9 16.7 17.4V30.2L28 23.7Z" fill="currentColor" fill-opacity="0.25"></path>
43 </svg>
44 <b>g1t</b>
45 <span class="pill">Docs</span>
46 </a>
47 <nav>
48 <a href="/">Guides</a>
49 <a href="/reference/api/">API overview</a>
50 <a href="/reference/mcp/">MCP tools</a>
51 <a href="https://api.g1t.sh/openapi.json">OpenAPI</a>
52 <a href="https://g1t.sh/register" class="cta">Sign up</a>
53 </nav>
54 </header>
55 <script
56 is:inline
57 id="api-reference"
58 data-url="https://api.g1t.sh/openapi.json"
59 data-configuration={JSON.stringify(configuration)}></script>
60 <script is:inline src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
61 </body>
62</html>
63
64<style is:global>
65 body {
66 margin: 0;
67 background: var(--g1t-bg);
68 }
69
70 /* Scalar's names for the shared g1t tokens. */
71 :root {
72 /* The g1t header above: Scalar's sticky sidebar starts below it. */
73 --scalar-custom-header-height: 56px;
74 --scalar-font: var(--g1t-font-sans);
75 --scalar-font-code: var(--g1t-font-mono);
76 }
77 .dark-mode {
78 --scalar-background-1: var(--g1t-bg);
79 --scalar-background-2: var(--g1t-surface);
80 --scalar-background-3: var(--g1t-raised);
81 --scalar-border-color: var(--g1t-line);
82 --scalar-color-1: var(--g1t-fg);
83 --scalar-color-2: var(--g1t-muted);
84 --scalar-color-3: var(--g1t-faint);
85 --scalar-color-accent: #cfc6ff;
86 --scalar-background-accent: color-mix(in srgb, var(--g1t-merged) 12%, transparent);
87 --scalar-button-1: var(--g1t-fg);
88 --scalar-button-1-color: var(--g1t-bg);
89 --scalar-button-1-hover: #ffffff;
90 --scalar-color-green: var(--g1t-accent);
91 --scalar-color-blue: var(--g1t-info);
92 --scalar-color-red: var(--g1t-danger);
93 --scalar-color-orange: var(--g1t-warn);
94 --scalar-sidebar-background-1: var(--g1t-bg);
95 --scalar-sidebar-color-1: var(--g1t-fg);
96 --scalar-sidebar-color-2: var(--g1t-muted);
97 --scalar-sidebar-border-color: var(--g1t-line);
98 --scalar-sidebar-item-hover-background: var(--g1t-surface);
99 --scalar-sidebar-item-active-background: var(--g1t-raised);
100 --scalar-sidebar-color-active: var(--g1t-fg);
101 }
102
103 .bar {
104 position: sticky;
105 top: 0;
106 z-index: 10;
107 display: flex;
108 align-items: center;
109 justify-content: space-between;
110 height: 56px;
111 padding: 0 20px;
112 background: color-mix(in srgb, var(--g1t-bg) 88%, transparent);
113 backdrop-filter: blur(10px);
114 border-bottom: 1px solid var(--g1t-line);
115 font: 14px var(--g1t-font-sans);
116 }
117 .bar a {
118 color: var(--g1t-muted);
119 text-decoration: none;
120 }
121 .bar .brand {
122 display: inline-flex;
123 align-items: center;
124 gap: 9px;
125 color: var(--g1t-fg);
126 }
127 .bar .brand svg {
128 width: 21px;
129 height: 21px;
130 }
131 .bar .brand b {
132 font-size: 17px;
133 letter-spacing: -0.035em;
134 }
135 .bar .pill {
136 border-radius: 999px;
137 padding: 1px 8px;
138 font-size: 11.5px;
139 color: var(--g1t-muted);
140 box-shadow: inset 0 0 0 1px var(--g1t-line-strong);
141 }
142 .bar nav {
143 display: flex;
144 align-items: center;
145 gap: 4px;
146 }
147 .bar nav a {
148 border-radius: 6px;
149 padding: 5px 10px;
150 font-size: 13.5px;
151 }
152 .bar nav a:hover {
153 background: var(--g1t-raised);
154 color: var(--g1t-fg);
155 }
156 .bar nav a.cta {
157 margin-left: 4px;
158 background: var(--g1t-fg);
159 color: var(--g1t-bg);
160 font-weight: 500;
161 }
162 @media (max-width: 760px) {
163 .bar nav a:not(.cta) {
164 display: none;
165 }
166 }
167</style>