git0 0.3.16 → 0.3.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/docs/README.md +20 -0
  2. package/docs/app/(home)/docs-home.css +235 -0
  3. package/docs/app/(home)/layout.tsx +12 -0
  4. package/docs/app/(home)/page.tsx +27 -0
  5. package/docs/app/docs/[[...slug]]/page.tsx +84 -0
  6. package/docs/app/docs/api/docs-search/route.ts +11 -0
  7. package/docs/app/docs/layout.tsx +16 -0
  8. package/docs/app/docs/llms-full.txt/route.ts +15 -0
  9. package/docs/app/docs/llms.mdx/docs/[[...slug]]/route.ts +24 -0
  10. package/docs/app/globals.css +814 -0
  11. package/docs/app/layout.config.tsx +32 -0
  12. package/docs/app/layout.tsx +22 -0
  13. package/docs/app/provider.tsx +20 -0
  14. package/docs/cli.json +11 -0
  15. package/docs/components/DocsHomepage/code-example.tsx +123 -0
  16. package/docs/components/DocsHomepage/features-grid.tsx +92 -0
  17. package/docs/components/DocsHomepage/footer.tsx +58 -0
  18. package/docs/components/DocsHomepage/hero-section.tsx +114 -0
  19. package/docs/components/DocsHomepage/project-types.tsx +114 -0
  20. package/docs/components/fumadocs/ai/ask-ai-dropdown.tsx +299 -0
  21. package/docs/components/fumadocs/ai/llm-copy-button.tsx +61 -0
  22. package/docs/components/fumadocs/api/api-page.client.tsx +7 -0
  23. package/docs/components/fumadocs/api/api-page.tsx +7 -0
  24. package/docs/components/fumadocs/layout/breadcrumb.tsx +36 -0
  25. package/docs/components/fumadocs/layout/search.tsx +55 -0
  26. package/docs/components/fumadocs/layout/theme-dropdown.tsx +3 -0
  27. package/docs/components/fumadocs/layout/theme-provider.tsx +15 -0
  28. package/docs/components/fumadocs/layout/theme-toggle.tsx +40 -0
  29. package/docs/components/ui/badge.tsx +50 -0
  30. package/docs/components/ui/button.tsx +66 -0
  31. package/docs/components/ui/collapsible.tsx +44 -0
  32. package/docs/components/ui/slider.tsx +36 -0
  33. package/docs/components/ui/tooltip.tsx +63 -0
  34. package/docs/components/ui/video-modal.tsx +238 -0
  35. package/docs/content/docs/fm.mdx +11 -0
  36. package/docs/content/docs/git0.mdx +104 -0
  37. package/docs/content/docs/github-api.mdx +764 -0
  38. package/docs/content/docs/index.mdx +98 -0
  39. package/docs/content/docs/meta.json +15 -0
  40. package/docs/content/docs/modules.mdx +10 -0
  41. package/docs/lib/fumadocs/customize-docs.ts +47 -0
  42. package/docs/lib/fumadocs/generate-api-docs.ts +73 -0
  43. package/docs/lib/fumadocs/source.tsx +50 -0
  44. package/docs/lib/utils.ts +10 -0
  45. package/docs/mdx-components.tsx +21 -0
  46. package/docs/next-env.d.ts +7 -0
  47. package/docs/next.config.ts +35 -0
  48. package/docs/package.json +61 -0
  49. package/docs/postcss.config.mjs +5 -0
  50. package/docs/public/apple-touch-icon.png +0 -0
  51. package/docs/public/favicon-192.png +0 -0
  52. package/docs/public/favicon-512.png +0 -0
  53. package/docs/public/favicon.ico +0 -0
  54. package/docs/public/manifest.webmanifest +14 -0
  55. package/docs/source.config.ts +29 -0
  56. package/docs/tsconfig.json +50 -0
  57. package/docs/vite.config.ts +2 -0
  58. package/docs/wrangler.jsonc +13 -0
  59. package/package.json +1 -1
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @file layout.config.tsx
3
+ * @description Configuration for the documentation layout, including navigation and links.
4
+ */
5
+ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
6
+ import { BookOpen, Link2 } from 'lucide-react';
7
+ import { docsConfig } from '@/lib/fumadocs/customize-docs';
8
+ import { ThemeDropdown } from '@/components/fumadocs/layout/theme-dropdown';
9
+
10
+ export const baseOptions: BaseLayoutProps = {
11
+ nav: {
12
+ title: (
13
+ <span className="inline-flex items-center gap-2">
14
+ { docsConfig.favicon ? <img src={docsConfig.favicon} alt="Logo" /> : <Link2 />}
15
+ {docsConfig.title}
16
+ </span>
17
+ ),
18
+ },
19
+ links: [
20
+ {
21
+ label: 'Docs',
22
+ icon: <BookOpen />,
23
+ text: 'Docs',
24
+ url: '/docs',
25
+ },
26
+ {
27
+ type: 'custom' as const,
28
+ children: <ThemeDropdown />,
29
+ },
30
+ ],
31
+ githubUrl: docsConfig.github,
32
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @file layout.tsx
3
+ * @description Root layout component that wraps the entire application.
4
+ */
5
+ import type { ReactNode } from 'react';
6
+ import { Provider } from './provider';
7
+ import './globals.css';
8
+
9
+
10
+ export default function Layout({ children }: { children: ReactNode }) {
11
+ return (
12
+ <html
13
+ lang="en"
14
+ suppressHydrationWarning
15
+ >
16
+ <body className="flex flex-col min-h-screen">
17
+ <Provider>{children}</Provider>
18
+ {/* <RootProvider>{children}</RootProvider> */}
19
+ </body>
20
+ </html>
21
+ );
22
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @file provider.tsx
3
+ * @description Root provider component that sets up Fumadocs and search functionality.
4
+ */
5
+ 'use client';
6
+ import { RootProvider } from 'fumadocs-ui/provider/next';
7
+ import SearchDialog from '@/components/fumadocs/layout/search';
8
+ import type { ReactNode } from 'react';
9
+
10
+ export function Provider({ children }: { children: ReactNode }) {
11
+ return (
12
+ <RootProvider
13
+ search={{
14
+ SearchDialog,
15
+ }}
16
+ >
17
+ {children}
18
+ </RootProvider>
19
+ );
20
+ }
package/docs/cli.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "aliases": {
3
+ "uiDir": "./components/ui",
4
+ "componentsDir": "./components",
5
+ "blockDir": "./components",
6
+ "cssDir": "./styles",
7
+ "libDir": "./lib"
8
+ },
9
+ "baseDir": "",
10
+ "commands": {}
11
+ }
@@ -0,0 +1,123 @@
1
+ /**
2
+ * @file code-example.tsx
3
+ * @description Interactive component displaying git0 usage examples.
4
+ */
5
+ "use client"
6
+
7
+ import { useState, useEffect, useRef } from "react"
8
+ import { Button } from "@/components/ui/button"
9
+ import { Copy, Check } from "lucide-react"
10
+ import hljs from 'highlight.js/lib/core'
11
+ import bash from 'highlight.js/lib/languages/bash'
12
+ import 'highlight.js/styles/github-dark.css'
13
+
14
+ // Register languages
15
+ hljs.registerLanguage('bash', bash)
16
+
17
+ const codeExamples = {
18
+ search: `# Search for repositories by name
19
+ g react starter
20
+
21
+ # g and git0 both work
22
+ git0 react starter`,
23
+ download: `# Direct download from GitHub URL
24
+ g https://github.com/facebook/react
25
+
26
+ # Download using owner/repo shorthand
27
+ git0 facebook/react
28
+
29
+ # Use git0 without installing (only node needed)
30
+ npx git0 facebook/react`,
31
+ paths: `# Download only one folder — paste the GitHub link as you copied it
32
+ g https://github.com/facebook/react/tree/main/packages/react-dom
33
+
34
+ # ...or one file
35
+ g https://github.com/debate/debate-ai.com/blob/master/.continue/agents/new-config.yaml
36
+
37
+ # Same thing, without a URL
38
+ git0 facebook/react/packages/react-dom
39
+ git0 facebook/react --path=packages/react-dom`,
40
+ history: `# A specific branch, tag or commit
41
+ git0 facebook/react --branch=v18.2.0
42
+
43
+ # With the full .git history attached after the download
44
+ git0 facebook/react --history
45
+
46
+ # History only — no working files at all
47
+ git0 facebook/react --history-only --mirror`,
48
+ releases: `# Download the latest release for your system
49
+ gg user/repo`,
50
+ }
51
+
52
+ type TabKey = keyof typeof codeExamples
53
+
54
+ const tabLabels: Record<TabKey, string> = {
55
+ search: "Search",
56
+ download: "Download",
57
+ paths: "Partial Paths",
58
+ history: "History",
59
+ releases: "Releases",
60
+ }
61
+
62
+ export function CodeExample() {
63
+ const [activeTab, setActiveTab] = useState<TabKey>("search")
64
+ const [copied, setCopied] = useState(false)
65
+ const codeRef = useRef<HTMLElement>(null)
66
+
67
+ const copyCode = () => {
68
+ navigator.clipboard.writeText(codeExamples[activeTab])
69
+ setCopied(true)
70
+ setTimeout(() => setCopied(false), 2000)
71
+ }
72
+
73
+ useEffect(() => {
74
+ if (codeRef.current) {
75
+ // Remove previous highlighting before applying new highlighting
76
+ delete codeRef.current.dataset.highlighted
77
+ hljs.highlightElement(codeRef.current)
78
+ }
79
+ }, [activeTab])
80
+
81
+ return (
82
+ <section className="py-20 md:py-32 border-b border-border">
83
+ <div className="container mx-auto px-4">
84
+ <div className="text-center mb-12">
85
+ <h2 className="text-3xl md:text-4xl font-bold mb-4">
86
+ Usage <span className="text-primary">Examples</span>
87
+ </h2>
88
+ <p className="text-muted-foreground text-lg max-w-2xl mx-auto">
89
+ One command to find a repo, download exactly what you need, install it and open it in your editor.
90
+ </p>
91
+ </div>
92
+
93
+ <div className="max-w-4xl mx-auto">
94
+ <div className="bg-card border border-border rounded-xl overflow-hidden">
95
+ <div className="flex items-center justify-between border-b border-border px-4 py-3 overflow-x-auto">
96
+ <div className="flex gap-1">
97
+ {(Object.keys(codeExamples) as TabKey[]).map((tab) => (
98
+ <button
99
+ key={tab}
100
+ onClick={() => setActiveTab(tab)}
101
+ className={`px-3 py-1.5 text-sm rounded-md transition-colors whitespace-nowrap ${activeTab === tab
102
+ ? "bg-primary text-primary-foreground"
103
+ : "text-muted-foreground hover:text-foreground hover:bg-secondary"
104
+ }`}
105
+ >
106
+ {tabLabels[tab]}
107
+ </button>
108
+ ))}
109
+ </div>
110
+ <Button variant="ghost" size="sm" onClick={copyCode} className="gap-2 ml-2 flex-shrink-0">
111
+ {copied ? <Check className="h-4 w-4" /> : <Copy className="h-4 w-4" />}
112
+ {copied ? "Copied" : "Copy"}
113
+ </Button>
114
+ </div>
115
+ <pre className="p-6 overflow-x-auto text-sm max-h-[400px] overflow-y-auto">
116
+ <code ref={codeRef} className={`font-mono language-bash`} style={{ fontFamily: 'var(--font-mono)' }}>{codeExamples[activeTab]}</code>
117
+ </pre>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </section>
122
+ )
123
+ }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @file features-grid.tsx
3
+ * @description Grid of git0's core features, each with an example command.
4
+ */
5
+ import Image from "next/image"
6
+ import { Search, Download, Package, Zap, Code, Shield } from "lucide-react"
7
+
8
+ const coreFeatures = [
9
+ {
10
+ icon: Search,
11
+ title: "Search GitHub Repositories",
12
+ description: "Search repositories by name with intelligent fuzzy matching and instant results",
13
+ example: "git0 react starter",
14
+ },
15
+ {
16
+ icon: Download,
17
+ title: "Direct Repository Download",
18
+ description: "Download from GitHub URLs or owner/repo shortcuts. Skip the manual git clone dance",
19
+ example: "git0 facebook/react",
20
+ },
21
+ {
22
+ icon: Package,
23
+ title: "Git Release Package Manager",
24
+ description: "Instantly download latest release binaries for your system or all platforms",
25
+ example: "gg user/repo",
26
+ },
27
+ {
28
+ icon: Zap,
29
+ title: "Automatic Dependency Installation",
30
+ description: "Smart detection and installation of dependencies for multiple project types",
31
+ example: "Auto-detects package.json, requirements.txt, Cargo.toml",
32
+ },
33
+ {
34
+ icon: Code,
35
+ title: "Smart IDE Integration",
36
+ description: "Automatically opens projects in Cursor, Windsurf, VS Code, or your preferred editor",
37
+ example: "Opens in cursor, windsurf, code, nvim",
38
+ },
39
+ {
40
+ icon: Shield,
41
+ title: "Conflict Resolution",
42
+ description: "Handles directory naming conflicts automatically with smart numbering",
43
+ example: "react → react-2 → react-3",
44
+ },
45
+ ]
46
+
47
+ export function FeaturesGrid() {
48
+ return (
49
+ <section id="features" className="relative py-20 md:py-32 border-b border-border overflow-hidden">
50
+ <div className="absolute inset-0 animated-grid-bg opacity-30" />
51
+
52
+ <div className="container mx-auto px-4 relative">
53
+ <div className="flex flex-col md:flex-row items-center justify-center gap-8 md:gap-12 mb-16">
54
+ <div className="relative" style={{ animation: "float 6s ease-in-out infinite" }}>
55
+ <Image
56
+ src="https://i.imgur.com/857meew.png"
57
+ alt="git0 logo"
58
+ width={160}
59
+ height={160}
60
+ className="drop-shadow-2xl"
61
+ />
62
+ </div>
63
+ <div className="text-center md:text-left max-w-2xl">
64
+ <h2 className="text-3xl md:text-4xl font-bold mb-4">
65
+ The Proper Protocol to Download a Git Repo
66
+ </h2>
67
+ <p className="text-muted-foreground text-lg">
68
+ Skip the manual &quot;git clone, cd, install&quot; dance.
69
+ </p>
70
+ </div>
71
+ </div>
72
+
73
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
74
+ {coreFeatures.map((feature, index) => (
75
+ <div
76
+ key={feature.title}
77
+ className="animated-border-card group p-6 hover:bg-card/80 transition-all duration-300"
78
+ style={{ animationDelay: `${index * 0.05}s` }}
79
+ >
80
+ <div className="relative z-10">
81
+ <feature.icon className="h-8 w-8 text-primary mb-4 group-hover:scale-110 transition-transform duration-300" />
82
+ <h3 className="font-semibold mb-2 text-foreground text-lg">{feature.title}</h3>
83
+ <p className="text-sm text-muted-foreground leading-relaxed mb-4">{feature.description}</p>
84
+ <code className="text-xs text-primary bg-secondary px-2 py-1 rounded font-mono">{feature.example}</code>
85
+ </div>
86
+ </div>
87
+ ))}
88
+ </div>
89
+ </div>
90
+ </section>
91
+ )
92
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @file footer.tsx
3
+ * @description Footer component for the git0 landing page.
4
+ */
5
+ import Link from "next/link"
6
+ import { Button } from "@/components/ui/button"
7
+ import { Github, BookOpen, MessageCircle, GitBranch } from "lucide-react"
8
+
9
+ export function Footer() {
10
+ return (
11
+ <footer className="py-20 md:py-32">
12
+ <div className="container mx-auto px-4">
13
+ <div className="text-center max-w-3xl mx-auto">
14
+ <h2 className="text-3xl md:text-5xl font-bold mb-6 text-balance">
15
+ Download Git Repo on <span className="text-primary">Step Zero</span>
16
+ </h2>
17
+ <p className="text-xl text-muted-foreground mb-8">
18
+ Skip the manual &quot;git clone, cd, install&quot; dance.
19
+ </p>
20
+
21
+ <div className="flex flex-col sm:flex-row items-center justify-center gap-4 mb-16">
22
+ <Link href="/docs">
23
+ <Button size="lg" className="gap-2 bg-primary text-primary-foreground hover:bg-primary/90">
24
+ <BookOpen className="h-4 w-4" />
25
+ Read the Docs
26
+ </Button>
27
+ </Link>
28
+ <Link href="https://github.com/OpenSourceAGI/dev-tools-starter-agent" target="_blank" rel="noopener noreferrer">
29
+ <Button variant="outline" size="lg" className="gap-2 bg-transparent">
30
+ <Github className="h-4 w-4" />
31
+ Star on GitHub
32
+ </Button>
33
+ </Link>
34
+ <Link href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/discussions" target="_blank" rel="noopener noreferrer">
35
+ <Button variant="outline" size="lg" className="gap-2 bg-transparent">
36
+ <GitBranch className="h-4 w-4" />
37
+ Discussions
38
+ </Button>
39
+ </Link>
40
+ <Link href="https://discord.gg/SJdBqBz3tV" target="_blank" rel="noopener noreferrer">
41
+ <Button variant="outline" size="lg" className="gap-2 bg-transparent">
42
+ <MessageCircle className="h-4 w-4" />
43
+ Discord
44
+ </Button>
45
+ </Link>
46
+ </div>
47
+
48
+ <div className="border-t border-border pt-8">
49
+ <p className="text-muted-foreground text-sm">🌟 Star this repo so it will grow and get updates!</p>
50
+ <p className="text-muted-foreground text-sm mt-2">
51
+ MIT License — Made by <a href="https://github.com/vtempest" className="text-primary hover:underline">vtempest</a> with ❤️ for the developer community
52
+ </p>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </footer>
57
+ )
58
+ }
@@ -0,0 +1,114 @@
1
+ /**
2
+ * @file hero-section.tsx
3
+ * @description Hero section for the git0 landing page: tagline, preview media and install commands.
4
+ */
5
+ "use client"
6
+
7
+ import { Button } from "@/components/ui/button"
8
+ import { Badge } from "@/components/ui/badge"
9
+ import { Copy, Github, BookOpen, Check, Sparkles } from "lucide-react"
10
+ import { useState } from "react"
11
+
12
+ const installCommands = {
13
+ bun: "bun install -g git0",
14
+ npm: "npm install -g git0",
15
+ npx: "npx git0 react starter",
16
+ }
17
+
18
+ type InstallTab = keyof typeof installCommands
19
+
20
+ export function HeroSection() {
21
+ const [activeTab, setActiveTab] = useState<InstallTab>("bun")
22
+ const [copied, setCopied] = useState(false)
23
+
24
+ const copyCommand = () => {
25
+ navigator.clipboard.writeText(installCommands[activeTab])
26
+ setCopied(true)
27
+ setTimeout(() => setCopied(false), 2000)
28
+ }
29
+
30
+ return (
31
+ <section id="installation" className="relative overflow-hidden border-b border-border">
32
+ <div className="absolute inset-0 animated-grid-bg" />
33
+ <div className="absolute inset-0 grid-glow" />
34
+ <div className="absolute inset-0 bg-gradient-to-b from-transparent via-background/50 to-background" />
35
+
36
+ <div className="container mx-auto px-4 pt-12 relative">
37
+ <div className="flex flex-col items-center text-center max-w-5xl mx-auto">
38
+ <Badge variant="outline" className="mb-6 px-4 py-1.5 border-primary/30 text-primary gap-2">
39
+ <Sparkles className="h-4 w-4" />
40
+ Download Git Repo on Step Zero
41
+ </Badge>
42
+
43
+ <h1 className="text-5xl md:text-7xl lg:text-8xl font-bold tracking-tight mb-6">
44
+ <span className="shimmer-text">git0</span>
45
+ </h1>
46
+
47
+ <p className="text-lg md:text-2xl text-muted-foreground max-w-3xl mb-6 text-pretty">
48
+ CLI tool to search GitHub repositories, download source &amp; releases, and instantly set up projects with{" "}
49
+ <span className="text-primary font-semibold">automatic dependency installation and editor opening</span>
50
+ </p>
51
+
52
+ <div className="flex flex-wrap justify-center gap-2 mb-8">
53
+ <a href="https://www.npmjs.com/package/git0" target="_blank" rel="noreferrer">
54
+ <img alt="NPM Version" src="https://img.shields.io/npm/v/git0.svg" />
55
+ </a>
56
+ <a href="https://www.npmjs.com/package/git0" target="_blank" rel="noreferrer">
57
+ <img alt="NPM Monthly Downloads" src="https://img.shields.io/npm/dm/git0.svg" />
58
+ </a>
59
+ <a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/discussions" target="_blank" rel="noreferrer">
60
+ <img alt="GitHub Discussions" src="https://img.shields.io/github/discussions/OpenSourceAGI/dev-tools-starter-agent" />
61
+ </a>
62
+ <a href="https://github.blog/developer-skills/github/beginners-guide-to-github-creating-a-pull-request/" target="_blank" rel="noreferrer">
63
+ <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" />
64
+ </a>
65
+ </div>
66
+
67
+ <div className="flex flex-col items-center gap-3 mb-8 w-full max-w-xl">
68
+ <div className="flex gap-1 bg-card border border-border rounded-lg p-1">
69
+ {(Object.keys(installCommands) as InstallTab[]).map((tab) => (
70
+ <button
71
+ key={tab}
72
+ onClick={() => setActiveTab(tab)}
73
+ className={`px-4 py-1.5 text-sm font-semibold rounded-md transition-colors ${activeTab === tab
74
+ ? "bg-primary text-primary-foreground"
75
+ : "text-muted-foreground hover:text-foreground hover:bg-secondary"
76
+ }`}
77
+ >
78
+ {tab.toUpperCase()}
79
+ </button>
80
+ ))}
81
+ </div>
82
+ <div
83
+ onClick={copyCommand}
84
+ className="flex w-full items-center justify-between gap-3 bg-card border border-border rounded-lg px-4 py-3 cursor-pointer hover:border-primary/50 transition-colors group"
85
+ >
86
+ <code className="font-mono text-base text-foreground">{installCommands[activeTab]}</code>
87
+ {copied ? (
88
+ <Check className="h-4 w-4 text-primary" />
89
+ ) : (
90
+ <Copy className="h-4 w-4 text-muted-foreground group-hover:text-primary transition-colors" />
91
+ )}
92
+ </div>
93
+ </div>
94
+
95
+ <div className="flex flex-col sm:flex-row items-center gap-4 mb-12">
96
+ <Button onClick={() => window.location.href = "/docs"} size="lg" className="gap-2 bg-primary text-primary-foreground hover:bg-primary/90">
97
+ <BookOpen className="h-4 w-4" />
98
+ Documentation
99
+ </Button>
100
+ <Button onClick={() => window.location.href = "https://github.com/OpenSourceAGI/dev-tools-starter-agent/tree/master/packages/git0-repo-downloader"} variant="outline" size="lg" className="gap-2 bg-transparent">
101
+ <Github className="h-4 w-4" />
102
+ GitHub
103
+ </Button>
104
+ </div>
105
+
106
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4 w-full mb-12">
107
+ <img src="https://i.imgur.com/Io3ukRC.gif" alt="git0 live preview" className="w-full rounded-xl border border-border" />
108
+ <img src="https://i.imgur.com/6l9esbL.png" alt="git0 preview" className="w-full rounded-xl border border-border" />
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </section>
113
+ )
114
+ }
@@ -0,0 +1,114 @@
1
+ /**
2
+ * @file project-types.tsx
3
+ * @description Supported project types, supported IDEs and the post-download workflow.
4
+ */
5
+ import { Package, Layers, FileCode, Settings, Play, Download, Search, Code } from "lucide-react"
6
+
7
+ const projectTypes = [
8
+ { name: "Node.js", file: "package.json", install: "bun install (fallback to npm)", icon: Package },
9
+ { name: "Docker", file: "Dockerfile, docker-compose.yml", install: "docker-compose up -d", icon: Layers },
10
+ { name: "Python", file: "requirements.txt, setup.py", install: "Virtual env + pip install", icon: FileCode },
11
+ { name: "Rust", file: "Cargo.toml", install: "cargo build", icon: Settings },
12
+ { name: "Go", file: "go.mod", install: "go mod tidy", icon: Play },
13
+ ]
14
+
15
+ const supportedIDEs = [
16
+ { name: "Cursor", command: "cursor" },
17
+ { name: "Windsurf", command: "windsurf" },
18
+ { name: "VS Code", command: "code" },
19
+ { name: "Code Server", command: "code-server" },
20
+ { name: "Neovim", command: "nvim" },
21
+ ]
22
+
23
+ const workflowSteps = [
24
+ { step: "1", title: "Repository Downloaded", desc: "To your current directory", icon: Download },
25
+ { step: "2", title: "Project Type Detected", desc: "Automatically identified", icon: Search },
26
+ { step: "3", title: "Dependencies Installed", desc: "Based on project type", icon: Package },
27
+ { step: "4", title: "IDE Launched", desc: "Opens in preferred editor", icon: Code },
28
+ { step: "5", title: "Dev Server Started", desc: "For Node.js projects", icon: Play },
29
+ ]
30
+
31
+ export function ProjectTypes() {
32
+ return (
33
+ <section id="workflow" className="py-20 md:py-32 border-b border-border">
34
+ <div className="container mx-auto px-4">
35
+ <div className="text-center mb-12">
36
+ <h2 className="text-3xl md:text-4xl font-bold mb-4">
37
+ Supported <span className="text-primary">Project Types</span>
38
+ </h2>
39
+ <p className="text-muted-foreground text-lg max-w-2xl mx-auto">
40
+ git0 detects the project and runs the right installer for it.
41
+ </p>
42
+ </div>
43
+
44
+ <div className="max-w-4xl mx-auto overflow-x-auto mb-16">
45
+ <table className="w-full border-collapse">
46
+ <thead>
47
+ <tr className="border-b border-border">
48
+ <th className="text-left py-4 px-4 font-semibold text-foreground">Project Type</th>
49
+ <th className="text-left py-4 px-4 font-semibold text-foreground">Detection</th>
50
+ <th className="text-left py-4 px-4 font-semibold text-foreground">Installation</th>
51
+ </tr>
52
+ </thead>
53
+ <tbody>
54
+ {projectTypes.map((type, rowIndex) => (
55
+ <tr key={type.name} className={`border-b border-border ${rowIndex % 2 === 0 ? "bg-card/50" : ""}`}>
56
+ <td className="py-4 px-4 font-semibold text-foreground">
57
+ <span className="inline-flex items-center gap-2">
58
+ <type.icon className="h-5 w-5 text-primary" />
59
+ {type.name}
60
+ </span>
61
+ </td>
62
+ <td className="py-4 px-4 text-muted-foreground"><code className="text-sm">{type.file}</code></td>
63
+ <td className="py-4 px-4 text-muted-foreground"><code className="text-sm">{type.install}</code></td>
64
+ </tr>
65
+ ))}
66
+ </tbody>
67
+ </table>
68
+ </div>
69
+
70
+ <div className="text-center mb-8">
71
+ <h3 className="text-2xl md:text-3xl font-bold mb-4">Supported IDEs</h3>
72
+ <div className="flex flex-wrap justify-center gap-3">
73
+ {supportedIDEs.map((ide) => (
74
+ <div key={ide.name} className="bg-card border border-border rounded-lg px-4 py-2">
75
+ <span className="font-semibold text-foreground">{ide.name}</span>{" "}
76
+ <code className="text-xs text-primary">{ide.command}</code>
77
+ </div>
78
+ ))}
79
+ </div>
80
+ </div>
81
+
82
+ <div className="text-center mt-16 mb-10">
83
+ <h3 className="text-2xl md:text-3xl font-bold mb-4">What Happens After Download</h3>
84
+ </div>
85
+ <div className="grid grid-cols-1 md:grid-cols-5 gap-8 max-w-5xl mx-auto">
86
+ {workflowSteps.map((step) => (
87
+ <div key={step.step} className="text-center group">
88
+ <div className="relative mb-4 w-16 h-16 mx-auto">
89
+ <div className="w-16 h-16 bg-primary rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-300">
90
+ <step.icon className="w-8 h-8 text-primary-foreground" />
91
+ </div>
92
+ <div className="absolute -top-2 -right-2 w-7 h-7 bg-card border border-border rounded-full flex items-center justify-center text-sm font-bold text-foreground">
93
+ {step.step}
94
+ </div>
95
+ </div>
96
+ <h4 className="font-semibold mb-1 text-foreground">{step.title}</h4>
97
+ <p className="text-sm text-muted-foreground">{step.desc}</p>
98
+ </div>
99
+ ))}
100
+ </div>
101
+
102
+ <div className="mt-12 text-center">
103
+ <div className="bg-card border border-border rounded-xl p-6 max-w-2xl mx-auto">
104
+ <p className="text-muted-foreground mb-4">
105
+ <strong className="text-primary">Conflict Resolution:</strong> If a directory with the same name exists,
106
+ git0 automatically appends a number
107
+ </p>
108
+ <code className="text-sm bg-secondary px-4 py-2 rounded">react-app → react-app-2 → react-app-3</code>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </section>
113
+ )
114
+ }