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/web/app/components/clone-box.tsx

47 lines1,864 bytesCodeBlame
1import { Link } from "react-router";
2
3import { CopyLine } from "./ui";
4import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs";
5
6/** The ways to get a repository onto a machine or in front of an agent. */
7export function CloneBox({ path }: { path: string }) {
8 return (
9 <Tabs defaultValue="https">
10 <TabsList>
11 <TabsTrigger value="https">HTTPS</TabsTrigger>
12 <TabsTrigger value="ssh">SSH</TabsTrigger>
13 <TabsTrigger value="agent">Agent</TabsTrigger>
14 </TabsList>
15 <TabsContent value="https">
16 <CopyLine text={`https://g1t.sh/${path}.git`} />
17 <p className="mt-2 text-xs text-muted">
18 To push, use your username and an{" "}
19 <Link to="/settings" className="text-fg underline underline-offset-4">
20 access token
21 </Link>{" "}
22 as the password.
23 </p>
24 </TabsContent>
25 <TabsContent value="ssh">
26 <p className="rounded-lg border border-dashed border-line p-3 text-xs text-muted">
27 Git over SSH is waiting on inbound TCP on Cloudflare, which g1t has applied for. Use HTTPS for now: it
28 clones, fetches and pushes the same. Keys you add under Settings will work as soon as SSH is on.
29 </p>
30 </TabsContent>
31 <TabsContent value="agent">
32 <CopyLine
33 prompt
34 text="claude mcp add --transport http g1t https://mcp.g1t.sh"
35 />
36 <p className="mt-2 text-xs text-muted">
37 Connects Claude Code to g1t; it signs in through your browser.
38 Then ask it to work on an issue in{" "}
39 <span className="font-mono text-fg">{path}</span>.{" "}
40 <Link to="https://docs.g1t.sh/guides/bring-your-own-agent/" className="text-fg underline underline-offset-4">
41 More
42 </Link>
43 </p>
44 </TabsContent>
45 </Tabs>
46 );
47}