git0 0.2.13 → 0.2.14

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 (71) hide show
  1. package/dist/cli.js +27780 -0
  2. package/dist/cli.js.map +331 -0
  3. package/docs/404.html +2 -2
  4. package/docs/Footer/index.html +2 -2
  5. package/docs/assets/js/1df93b7f.1385eba0.js +2 -0
  6. package/docs/assets/js/22dd74f7.e13ac7a4.js +1 -0
  7. package/docs/assets/js/28ab763d.192aa3bb.js +1 -0
  8. package/docs/assets/js/299d276b.c9496717.js +1 -0
  9. package/docs/assets/js/{68cef36b.c312447e.js → 68cef36b.e5b1975b.js} +1 -1
  10. package/docs/assets/js/a9cef9d5.a7253e41.js +1 -0
  11. package/docs/assets/js/c3a618e1.1c56fb03.js +590 -0
  12. package/docs/assets/js/{main.cf858a7d.js → main.1f646b09.js} +2 -2
  13. package/docs/assets/js/runtime~main.f69f8f44.js +1 -0
  14. package/docs/functions/fm/index.html +26 -0
  15. package/docs/functions/git0/index.html +6 -6
  16. package/docs/functions/github-api/index.html +20 -20
  17. package/docs/functions/index.html +889 -71
  18. package/docs/functions/modules/index.html +4 -3
  19. package/docs/index.html +2 -2
  20. package/docs/lunr-index-1749760982052.json +1 -0
  21. package/docs/lunr-index.json +1 -1
  22. package/docs/search-doc-1749760982052.json +1 -0
  23. package/docs/search-doc.json +1 -1
  24. package/docs/sitemap.xml +1 -1
  25. package/docs-config/.docusaurus/client-manifest.json +36 -24
  26. package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/p/index-466.json +1 -1
  27. package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-fm-md-a9c.json +19 -0
  28. package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-git-0-md-299.json +4 -0
  29. package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-index-md-c3a.json +1 -1
  30. package/docs-config/.docusaurus/globalData.json +10 -5
  31. package/docs-config/.docusaurus/registry.js +1 -0
  32. package/docs-config/.docusaurus/routes.js +9 -3
  33. package/docs-config/.docusaurus/routesChunkNames.json +7 -3
  34. package/docs-config/src/functions/fm.md +1 -0
  35. package/docs-config/src/functions/git0.md +2 -2
  36. package/docs-config/src/functions/github-api.md +34 -17
  37. package/docs-config/src/functions/index.md +19 -30
  38. package/docs-config/src/functions/modules.md +1 -0
  39. package/docs-config/src/functions/typedoc-sidebar.cjs +5 -0
  40. package/docs-config/src/pages/index.tsx +2 -3
  41. package/package.json +20 -10
  42. package/readme.md +19 -21
  43. package/src/cli.ts +150 -0
  44. package/src/download.ts +240 -0
  45. package/src/fm.js +0 -0
  46. package/src/github-api.ts +237 -0
  47. package/src/ide.ts +141 -0
  48. package/src/install.ts +147 -0
  49. package/src/package-menu.ts +183 -0
  50. package/src/platform.ts +53 -0
  51. package/src/releases.ts +159 -0
  52. package/src/setup.ts +9 -0
  53. package/src/types.ts +97 -0
  54. package/src/utils.ts +49 -0
  55. package/test/download.test.ts +48 -0
  56. package/test/github-api.test.ts +79 -0
  57. package/test/package-menu.test.ts +134 -0
  58. package/test/platform.test.ts +64 -0
  59. package/test/releases.test.ts +169 -0
  60. package/docs/assets/js/1df93b7f.d8c05d2c.js +0 -2
  61. package/docs/assets/js/22dd74f7.237398b4.js +0 -1
  62. package/docs/assets/js/28ab763d.5714aa16.js +0 -1
  63. package/docs/assets/js/299d276b.1a1baa1c.js +0 -1
  64. package/docs/assets/js/c3a618e1.965a31da.js +0 -1
  65. package/docs/assets/js/runtime~main.7520dc36.js +0 -1
  66. package/docs/lunr-index-1749613752315.json +0 -1
  67. package/docs/search-doc-1749613752315.json +0 -1
  68. package/src/git0.js +0 -379
  69. package/src/github-api.js +0 -472
  70. /package/docs/assets/js/{1df93b7f.d8c05d2c.js.LICENSE.txt → 1df93b7f.1385eba0.js.LICENSE.txt} +0 -0
  71. /package/docs/assets/js/{main.cf858a7d.js.LICENSE.txt → main.1f646b09.js.LICENSE.txt} +0 -0
@@ -0,0 +1,134 @@
1
+ import { describe, test, expect } from 'bun:test';
2
+ import { buildReleaseChoices } from '../src/package-menu.ts';
3
+ import type { CategorizedRelease, PlatformInfo } from '../src/types.ts';
4
+
5
+ const LINUX: PlatformInfo = { os: 'linux', arch: 'x86_64', platform: 'linux', architecture: 'x64' };
6
+ const MACOS: PlatformInfo = { os: 'macos', arch: 'arm64', platform: 'darwin', architecture: 'arm64' };
7
+
8
+ function makeRelease(tag: string, overrides: Partial<CategorizedRelease['platformAssets']> = {}): CategorizedRelease {
9
+ const base = { windows: [], macos: [], linux: [], universal: [] };
10
+ return {
11
+ tag_name: tag,
12
+ assets: [],
13
+ platformAssets: { ...base, ...overrides },
14
+ };
15
+ }
16
+
17
+ function makeAsset(name: string): any {
18
+ return {
19
+ name,
20
+ size: 10 * 1024 * 1024,
21
+ browser_download_url: `https://example.com/${name}`,
22
+ detectedArch: 'x86_64',
23
+ platform: 'linux',
24
+ };
25
+ }
26
+
27
+ describe('buildReleaseChoices', () => {
28
+ test('returns empty array when releases have no assets', () => {
29
+ const release = makeRelease('v1');
30
+ expect(buildReleaseChoices([release], LINUX)).toHaveLength(0);
31
+ });
32
+
33
+ test('includes a disabled header for each non-empty platform section', () => {
34
+ const release = makeRelease('v1', { linux: [makeAsset('app-linux-x64.tar.gz')] });
35
+ const choices = buildReleaseChoices([release], LINUX);
36
+ const headers = choices.filter(c => c.disabled === true && c.name?.includes('v1'));
37
+ expect(headers.length).toBeGreaterThan(0);
38
+ });
39
+
40
+ test('includes a selectable choice for each asset', () => {
41
+ const release = makeRelease('v1', {
42
+ linux: [makeAsset('app-linux-x64.tar.gz'), makeAsset('app-linux-arm64.tar.gz')],
43
+ });
44
+ const choices = buildReleaseChoices([release], LINUX);
45
+ const selectable = choices.filter(c => c.value);
46
+ expect(selectable).toHaveLength(2);
47
+ });
48
+
49
+ test('selectable choice value contains release and asset', () => {
50
+ const a = makeAsset('app-linux-x64.tar.gz');
51
+ const release = makeRelease('v1', { linux: [a] });
52
+ const choices = buildReleaseChoices([release], LINUX);
53
+ const choice = choices.find(c => c.value);
54
+ expect(choice?.value?.asset?.name).toBe('app-linux-x64.tar.gz');
55
+ expect(choice?.value?.release?.tag_name).toBe('v1');
56
+ });
57
+
58
+ test('renders asset size in MB', () => {
59
+ const a = makeAsset('app.tar.gz');
60
+ const release = makeRelease('v1', { linux: [a] });
61
+ const choices = buildReleaseChoices([release], LINUX);
62
+ const assetChoice = choices.find(c => c.value);
63
+ // 10 MB asset
64
+ expect(assetChoice?.name).toContain('10.00 MB');
65
+ });
66
+
67
+ test('inserts separators between platform sections', () => {
68
+ const release = makeRelease('v1', {
69
+ linux: [makeAsset('app-linux.tar.gz')],
70
+ macos: [makeAsset('app.dmg')],
71
+ });
72
+ const choices = buildReleaseChoices([release], LINUX);
73
+ const separators = choices.filter(c => c.disabled && c.name?.includes('────'));
74
+ expect(separators.length).toBeGreaterThan(0);
75
+ });
76
+
77
+ test('respects the limit parameter (default 2)', () => {
78
+ const releases = [
79
+ makeRelease('v3', { linux: [makeAsset('a.tar.gz')] }),
80
+ makeRelease('v2', { linux: [makeAsset('b.tar.gz')] }),
81
+ makeRelease('v1', { linux: [makeAsset('c.tar.gz')] }),
82
+ ];
83
+ // default limit=2 → only v3 and v2 appear
84
+ const choices = buildReleaseChoices(releases, LINUX);
85
+ const names = choices.map(c => c.name ?? '').join(' ');
86
+ expect(names).toContain('v3');
87
+ expect(names).toContain('v2');
88
+ expect(names).not.toContain('v1');
89
+ });
90
+
91
+ test('custom limit=1 shows only the first release', () => {
92
+ const releases = [
93
+ makeRelease('v2', { linux: [makeAsset('b.tar.gz')] }),
94
+ makeRelease('v1', { linux: [makeAsset('a.tar.gz')] }),
95
+ ];
96
+ const choices = buildReleaseChoices(releases, LINUX, 1);
97
+ const names = choices.map(c => c.name ?? '').join(' ');
98
+ expect(names).toContain('v2');
99
+ expect(names).not.toContain('v1');
100
+ });
101
+
102
+ test('universal section appears for all platforms', () => {
103
+ const universalAsset = { ...makeAsset('app-universal'), detectedArch: 'universal', platform: 'universal' };
104
+ const release = makeRelease('v1', { universal: [universalAsset] });
105
+
106
+ const linuxChoices = buildReleaseChoices([release], LINUX);
107
+ const macChoices = buildReleaseChoices([release], MACOS);
108
+
109
+ expect(linuxChoices.filter(c => c.value)).toHaveLength(1);
110
+ expect(macChoices.filter(c => c.value)).toHaveLength(1);
111
+ });
112
+
113
+ test('platform order is windows → macos → linux → universal', () => {
114
+ const release = makeRelease('v1', {
115
+ windows: [makeAsset('app.exe')],
116
+ macos: [makeAsset('app.dmg')],
117
+ linux: [makeAsset('app.tar.gz')],
118
+ universal: [{ ...makeAsset('app'), detectedArch: 'universal', platform: 'universal' }],
119
+ });
120
+ const choices = buildReleaseChoices([release], LINUX);
121
+ const headerNames = choices
122
+ .filter(c => c.disabled && !c.name?.includes('────'))
123
+ .map(c => c.name ?? '');
124
+
125
+ const winIdx = headerNames.findIndex(n => n.includes('Windows'));
126
+ const macIdx = headerNames.findIndex(n => n.includes('macOS'));
127
+ const linIdx = headerNames.findIndex(n => n.includes('Linux'));
128
+ const uniIdx = headerNames.findIndex(n => n.includes('Universal'));
129
+
130
+ expect(winIdx).toBeLessThan(macIdx);
131
+ expect(macIdx).toBeLessThan(linIdx);
132
+ expect(linIdx).toBeLessThan(uniIdx);
133
+ });
134
+ });
@@ -0,0 +1,64 @@
1
+ import { describe, test, expect, mock, beforeEach, afterEach } from 'bun:test';
2
+ import os from 'os';
3
+
4
+ // We re-import after mocking, so keep a reference to the real values.
5
+ const realPlatform = os.platform();
6
+ const realArch = os.arch();
7
+
8
+ describe('getCurrentPlatform', () => {
9
+ // Helper: dynamically re-import the module so mocks apply fresh each time.
10
+ async function load() {
11
+ const mod = await import('../src/platform.ts?t=' + Date.now());
12
+ return mod.getCurrentPlatform;
13
+ }
14
+
15
+ test('maps darwin/x64 → macos/x86_64', async () => {
16
+ mock.module('os', () => ({ default: { platform: () => 'darwin', arch: () => 'x64' } }));
17
+ const fn = await load();
18
+ const p = fn();
19
+ expect(p.os).toBe('macos');
20
+ expect(p.arch).toBe('x86_64');
21
+ expect(p.platform).toBe('darwin');
22
+ expect(p.architecture).toBe('x64');
23
+ });
24
+
25
+ test('maps win32/ia32 → windows/i386', async () => {
26
+ mock.module('os', () => ({ default: { platform: () => 'win32', arch: () => 'ia32' } }));
27
+ const fn = await load();
28
+ const p = fn();
29
+ expect(p.os).toBe('windows');
30
+ expect(p.arch).toBe('i386');
31
+ });
32
+
33
+ test('maps linux/arm64 → linux/arm64', async () => {
34
+ mock.module('os', () => ({ default: { platform: () => 'linux', arch: () => 'arm64' } }));
35
+ const fn = await load();
36
+ const p = fn();
37
+ expect(p.os).toBe('linux');
38
+ expect(p.arch).toBe('arm64');
39
+ });
40
+
41
+ test('maps darwin/arm64 → macos/arm64 (Apple Silicon)', async () => {
42
+ mock.module('os', () => ({ default: { platform: () => 'darwin', arch: () => 'arm64' } }));
43
+ const fn = await load();
44
+ const p = fn();
45
+ expect(p.os).toBe('macos');
46
+ expect(p.arch).toBe('arm64');
47
+ });
48
+
49
+ test('passes through unknown platform/arch as-is', async () => {
50
+ mock.module('os', () => ({ default: { platform: () => 'freebsd', arch: () => 'mips' } }));
51
+ const fn = await load();
52
+ const p = fn();
53
+ expect(p.os).toBe('freebsd');
54
+ expect(p.arch).toBe('mips');
55
+ });
56
+
57
+ test('returns raw platform and architecture fields alongside mapped ones', async () => {
58
+ mock.module('os', () => ({ default: { platform: () => 'linux', arch: () => 'x64' } }));
59
+ const fn = await load();
60
+ const p = fn();
61
+ expect(p.platform).toBe('linux');
62
+ expect(p.architecture).toBe('x64');
63
+ });
64
+ });
@@ -0,0 +1,169 @@
1
+ import { describe, test, expect } from 'bun:test';
2
+ import { categorizeReleasesByPlatform, filterReleasesByPlatform } from '../src/releases.ts';
3
+ import type { PlatformInfo } from '../src/types.ts';
4
+
5
+ /** Minimal asset factory. size/url are arbitrary but required by the type. */
6
+ function asset(name: string) {
7
+ return {
8
+ name,
9
+ size: 1024 * 1024,
10
+ browser_download_url: `https://example.com/${name}`,
11
+ detectedArch: '',
12
+ platform: '',
13
+ };
14
+ }
15
+
16
+ function release(tag: string, assets: ReturnType<typeof asset>[]) {
17
+ return { tag_name: tag, assets, [Symbol.iterator]: undefined };
18
+ }
19
+
20
+ const LINUX: PlatformInfo = { os: 'linux', arch: 'x86_64', platform: 'linux', architecture: 'x64' };
21
+ const MACOS: PlatformInfo = { os: 'macos', arch: 'arm64', platform: 'darwin', architecture: 'arm64' };
22
+ const WINDOWS: PlatformInfo = { os: 'windows', arch: 'x86_64', platform: 'win32', architecture: 'x64' };
23
+
24
+ // ─── categorizeReleasesByPlatform ────────────────────────────────────────────
25
+
26
+ describe('categorizeReleasesByPlatform', () => {
27
+ test('routes .exe asset to windows bucket', () => {
28
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app.exe')])]);
29
+ expect(r.platformAssets.windows).toHaveLength(1);
30
+ expect(r.platformAssets.windows[0].name).toBe('app.exe');
31
+ });
32
+
33
+ test('routes .dmg asset to macos bucket', () => {
34
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app.dmg')])]);
35
+ expect(r.platformAssets.macos).toHaveLength(1);
36
+ });
37
+
38
+ test('routes linux-x64 tarball to linux bucket', () => {
39
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-linux-x64.tar.gz')])]);
40
+ expect(r.platformAssets.linux).toHaveLength(1);
41
+ });
42
+
43
+ test('detects x86_64 arch from amd64 keyword', () => {
44
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-linux-amd64.tar.gz')])]);
45
+ expect(r.platformAssets.linux[0].detectedArch).toBe('x86_64');
46
+ });
47
+
48
+ test('detects arm64 arch from aarch64 keyword', () => {
49
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-linux-aarch64.tar.gz')])]);
50
+ expect(r.platformAssets.linux[0].detectedArch).toBe('arm64');
51
+ });
52
+
53
+ test('detects arm64 arch from arm64 keyword', () => {
54
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-darwin-arm64')] )]);
55
+ expect(r.platformAssets.macos[0].detectedArch).toBe('arm64');
56
+ });
57
+
58
+ test('routes asset with no known platform keyword to universal', () => {
59
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-v1.0')])]);
60
+ expect(r.platformAssets.universal).toHaveLength(1);
61
+ expect(r.platformAssets.universal[0].detectedArch).toBe('universal');
62
+ });
63
+
64
+ test('routes asset explicitly named "universal" to universal bucket', () => {
65
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-universal.tar.gz')])]);
66
+ expect(r.platformAssets.universal).toHaveLength(1);
67
+ });
68
+
69
+ test('drops releases that have no assets at all', () => {
70
+ const result = categorizeReleasesByPlatform([release('v1', [])]);
71
+ expect(result).toHaveLength(0);
72
+ });
73
+
74
+ test('handles multiple releases independently', () => {
75
+ const result = categorizeReleasesByPlatform([
76
+ release('v1', [asset('app.exe')]),
77
+ release('v2', [asset('app-linux-x64.tar.gz')]),
78
+ ]);
79
+ expect(result).toHaveLength(2);
80
+ expect(result[0].tag_name).toBe('v1');
81
+ expect(result[1].tag_name).toBe('v2');
82
+ });
83
+
84
+ test('annotates asset with its detected platform', () => {
85
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-windows-x64.exe')])]);
86
+ expect(r.platformAssets.windows[0].platform).toBe('windows');
87
+ });
88
+
89
+ test('.msi routes to windows', () => {
90
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('setup.msi')])]);
91
+ expect(r.platformAssets.windows).toHaveLength(1);
92
+ });
93
+
94
+ test('.deb routes to linux', () => {
95
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app_1.0_amd64.deb')])]);
96
+ expect(r.platformAssets.linux).toHaveLength(1);
97
+ });
98
+
99
+ test('.rpm routes to linux', () => {
100
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-1.0.x86_64.rpm')])]);
101
+ expect(r.platformAssets.linux).toHaveLength(1);
102
+ });
103
+
104
+ test('.AppImage routes to linux', () => {
105
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('App-1.0.AppImage')])]);
106
+ expect(r.platformAssets.linux).toHaveLength(1);
107
+ });
108
+
109
+ test('.pkg routes to macos', () => {
110
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-1.0.pkg')])]);
111
+ expect(r.platformAssets.macos).toHaveLength(1);
112
+ });
113
+
114
+ test('preserves all original asset fields', () => {
115
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-linux-x64.tar.gz')])]);
116
+ expect(r.platformAssets.linux[0].browser_download_url).toContain('app-linux-x64');
117
+ expect(r.platformAssets.linux[0].size).toBe(1024 * 1024);
118
+ });
119
+
120
+ test('unknown arch falls back to "unknown"', () => {
121
+ const [r] = categorizeReleasesByPlatform([release('v1', [asset('app-linux.tar.gz')])]);
122
+ expect(r.platformAssets.linux[0].detectedArch).toBe('unknown');
123
+ });
124
+ });
125
+
126
+ // ─── filterReleasesByPlatform ─────────────────────────────────────────────────
127
+
128
+ describe('filterReleasesByPlatform', () => {
129
+ test('returns only linux-compatible releases for linux platform', () => {
130
+ const releases = [
131
+ release('v1', [asset('app-linux-x64.tar.gz')]),
132
+ release('v2', [asset('app-windows-x64.exe')]),
133
+ ];
134
+ const result = filterReleasesByPlatform(releases, LINUX);
135
+ expect(result).toHaveLength(1);
136
+ expect(result[0].tag_name).toBe('v1');
137
+ });
138
+
139
+ test('includes universal assets for any platform', () => {
140
+ const releases = [release('v1', [asset('app-v1.0')])];
141
+ expect(filterReleasesByPlatform(releases, LINUX)).toHaveLength(1);
142
+ expect(filterReleasesByPlatform(releases, MACOS)).toHaveLength(1);
143
+ expect(filterReleasesByPlatform(releases, WINDOWS)).toHaveLength(1);
144
+ });
145
+
146
+ test('returns empty array when no compatible release exists', () => {
147
+ const releases = [release('v1', [asset('app.exe')])];
148
+ expect(filterReleasesByPlatform(releases, LINUX)).toHaveLength(0);
149
+ });
150
+
151
+ test('returns release when it has both native and universal assets', () => {
152
+ const releases = [release('v1', [asset('app-linux-x64.tar.gz'), asset('app-v1.0')])];
153
+ expect(filterReleasesByPlatform(releases, LINUX)).toHaveLength(1);
154
+ });
155
+
156
+ test('filters macos releases correctly', () => {
157
+ const releases = [
158
+ release('v1', [asset('app.dmg')]),
159
+ release('v2', [asset('app-linux.tar.gz')]),
160
+ ];
161
+ const result = filterReleasesByPlatform(releases, MACOS);
162
+ expect(result).toHaveLength(1);
163
+ expect(result[0].tag_name).toBe('v1');
164
+ });
165
+
166
+ test('returns empty array for empty releases input', () => {
167
+ expect(filterReleasesByPlatform([], LINUX)).toHaveLength(0);
168
+ });
169
+ });
@@ -1,2 +0,0 @@
1
- /*! For license information please see 1df93b7f.d8c05d2c.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkcreate_apidocs=self.webpackChunkcreate_apidocs||[]).push([[583,682],{3378:(e,t,a)=>{a.d(t,{A:()=>r});const r=(0,a(4722).A)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]])},4722:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(6540);const s=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,((e,t,a)=>a?a.toUpperCase():t.toLowerCase())))(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=(...e)=>e.filter(((e,t,a)=>Boolean(e)&&""!==e.trim()&&a.indexOf(e)===t)).join(" ").trim(),o=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const n=(0,r.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:n="",children:c,iconNode:d,...m},x)=>(0,r.createElement)("svg",{ref:x,...i,width:t,height:t,stroke:e,strokeWidth:s?24*Number(a)/Number(t):a,className:l("lucide",n),...!c&&!o(m)&&{"aria-hidden":"true"},...m},[...d.map((([e,t])=>(0,r.createElement)(e,t))),...Array.isArray(c)?c:[c]]))),c=(e,t)=>{const a=(0,r.forwardRef)((({className:a,...o},i)=>{return(0,r.createElement)(n,{ref:i,iconNode:t,className:l(`lucide-${c=s(e),c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,a),...o});var c}));return a.displayName=s(e),a}},4905:(e,t,a)=>{a.r(t),a.d(t,{default:()=>w});var r=a(6540),s=a(7851),l=a(4722);const o=(0,l.A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),i=(0,l.A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),n=(0,l.A)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),c=(0,l.A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),d=(0,l.A)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]),m=(0,l.A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),x=(0,l.A)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),u=(0,l.A)("file-code",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]),h=(0,l.A)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),p=(0,l.A)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);var g=a(3378);const b=(0,l.A)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),y=(0,l.A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),f=(0,l.A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var v=a(4848),j={installCommands:{bun:"bun install -g git0",npm:"npm install -g git0",npx:"npx git0 react starter"},coreFeatures:[{icon:o,title:"Search GitHub Repositories",description:"Search repositories by name with intelligent fuzzy matching and instant results",gradient:"from-blue-500 via-cyan-500 to-teal-500",example:"git0 react starter"},{icon:i,title:"Direct Repository Download",description:"Download from GitHub URLs or owner/repo shortcuts. Skip the manual git clone dance",gradient:"from-purple-500 via-pink-500 to-rose-500",example:"git0 facebook/react"},{icon:n,title:"Git Release Package Manager",description:"Instantly download latest release binaries for your system or all platforms",gradient:"from-green-500 via-emerald-500 to-cyan-500",example:"gg user/repo"},{icon:c,title:"Automatic Dependency Installation",description:"Smart detection and installation of dependencies for multiple project types",gradient:"from-orange-500 via-red-500 to-pink-500",example:"Auto-detects package.json, requirements.txt, Cargo.toml"},{icon:d,title:"Smart IDE Integration",description:"Automatically opens projects in Cursor, Windsurf, VS Code, or your preferred editor",gradient:"from-indigo-500 via-purple-500 to-blue-500",example:"Opens in cursor, windsurf, code, nvim"},{icon:m,title:"Conflict Resolution",description:"Handles directory naming conflicts automatically with smart numbering",gradient:"from-yellow-500 via-orange-500 to-red-500",example:"react \u2192 react-2 \u2192 react-3"}],projectTypes:[{name:"Node.js",file:"package.json",install:"bun install (fallback to npm)",color:"text-green-400",icon:n},{name:"Docker",file:"Dockerfile, docker-compose.yml",install:"docker-compose up -d",color:"text-blue-400",icon:x},{name:"Python",file:"requirements.txt, setup.py",install:"Virtual env + pip install",color:"text-yellow-400",icon:u},{name:"Rust",file:"Cargo.toml",install:"cargo build",color:"text-orange-400",icon:h},{name:"Go",file:"go.mod",install:"go mod tidy",color:"text-cyan-400",icon:p}],supportedIDEs:[{name:"Cursor",command:"cursor",color:"text-blue-400"},{name:"Windsurf",command:"windsurf",color:"text-purple-400"},{name:"VS Code",command:"code",color:"text-blue-300"},{name:"Code Server",command:"code-server",color:"text-green-400"},{name:"Neovim",command:"nvim",color:"text-orange-400"}],featuresList:[{title:"Search Repositories",command:"git0 react starter",desc:"Find repositories by name with fuzzy matching"},{title:"Direct Download",command:"gg facebook/react",desc:"Download using owner/repo shorthand"},{title:"From GitHub URL",command:"git0 https://github.com/user/repo",desc:"Download from any GitHub URL"}],workflowSteps:[{step:"1",title:"Repository Downloaded",desc:"To your current directory",icon:i},{step:"2",title:"Project Type Detected",desc:"Automatically identified",icon:o},{step:"3",title:"Dependencies Installed",desc:"Based on project type",icon:n},{step:"4",title:"IDE Launched",desc:"Opens in preferred editor",icon:d},{step:"5",title:"Dev Server Started",desc:"For Node.js projects",icon:p}],urlDocs:"https://git0.js.org/functions",urlSupport:"https://discord.gg/SJdBqBz3tV",urlGithub:"https://github.com/vtempest/git0",urlGithubChat:"https://github.com/vtempest/git0/discussions",urlLogo:"https://i.imgur.com/857meew.png",name:"git0",urlAuthor:"https://github.com/vtempest",author:"vtempest",copyrightHTML:'&copy; 2025 Get git0. <a href="https://github.com/vtempest/git0">Star this on GitHub</a> so it can grow!'};const w=function(){var e=(0,r.useState)(null),t=e[0],a=e[1],l=(0,r.useState)(!1),o=l[0],i=l[1],n=(0,r.useState)("bun"),c=n[0],d=n[1],m=(0,r.useState)({x:0,y:0}),x=m[0],u=m[1];return(0,r.useEffect)((function(){var e=function(e){u({x:e.clientX,y:e.clientY})};return window.addEventListener("mousemove",e),function(){return window.removeEventListener("mousemove",e)}}),[]),(0,r.useEffect)((function(){var e=document.createElement("script");e.id="tailwind-cdn",e.src="https://cdn.tailwindcss.com",e.async=!0,document.head.appendChild(e),setTimeout((function(){return i(!0)}),1300)}),[]),o&&(0,v.jsxs)("div",{className:"min-h-screen bg-gray-900 text-white overflow-hidden relative",children:[(0,v.jsxs)("div",{className:"fixed inset-0 bg-gradient-to-br from-gray-900 via-blue-900/30 to-purple-900/30",children:[(0,v.jsxs)("div",{className:"absolute inset-0",children:[(0,v.jsx)("div",{className:"absolute w-96 h-96 bg-blue-500/20 rounded-full blur-3xl animate-pulse",style:{left:20+.02*x.x+"%",top:10+.01*x.y+"%",transform:"translate3d(0, 0, 0)"}}),(0,v.jsx)("div",{className:"absolute w-80 h-80 bg-purple-500/20 rounded-full blur-3xl animate-pulse delay-1000",style:{right:15+-.015*x.x+"%",bottom:20+-.01*x.y+"%",transform:"translate3d(0, 0, 0)"}}),(0,v.jsx)("div",{className:"absolute w-64 h-64 bg-cyan-500/15 rounded-full blur-3xl animate-pulse delay-2000",style:{left:60+.01*x.x+"%",top:60+.005*x.y+"%",transform:"translate3d(0, 0, 0)"}})]}),(0,v.jsx)("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(56,189,248,0.03)_1px,transparent_1px),linear-gradient(90deg,rgba(56,189,248,0.03)_1px,transparent_1px)] bg-[size:50px_50px]"}),(0,v.jsx)("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_25%_25%,rgba(56,189,248,0.15),transparent_50%)]"}),(0,v.jsx)("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_75%_75%,rgba(147,51,234,0.15),transparent_50%)]"})]}),(0,v.jsxs)("nav",{className:"relative z-50 flex items-center justify-between p-6 backdrop-blur-xl bg-gray-900/70 border-b border-gray-700/50",children:[(0,v.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,v.jsx)("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500 via-cyan-500 to-purple-600 rounded-xl flex items-center justify-center shadow-2xl shadow-blue-500/25 transform hover:scale-110 transition-all duration-300",children:(0,v.jsx)("img",{src:j.urlLogo,alt:"logo",className:"w-10 h-10"})}),(0,v.jsx)("span",{className:"text-3xl font-bold bg-gradient-to-r from-blue-400 via-cyan-400 to-purple-400 bg-clip-text text-transparent",children:j.name})]}),(0,v.jsxs)("div",{className:"flex items-center space-x-8",children:[(0,v.jsx)("a",{href:"#features",className:"hover:text-blue-400 transition-all duration-300 hover:scale-105",children:"Features"}),(0,v.jsx)("a",{href:"#installation",className:"hover:text-blue-400 transition-all duration-300 hover:scale-105",children:"Install"}),(0,v.jsx)("a",{href:"#workflow",className:"hover:text-blue-400 transition-all duration-300 hover:scale-105",children:"How It Works"}),(0,v.jsxs)("a",{href:j.urlGithub,className:"flex items-center space-x-2 bg-gradient-to-r from-blue-600 via-cyan-600 to-purple-600 px-6 py-3 rounded-xl hover:from-blue-500 hover:via-cyan-500 hover:to-purple-500 transition-all duration-300 shadow-2xl shadow-blue-500/25 hover:scale-105 hover:shadow-blue-500/40",children:[(0,v.jsx)(g.A,{className:"w-5 h-5"}),(0,v.jsx)("span",{className:"font-semibold",children:"GitHub"})]})]})]}),(0,v.jsx)("section",{className:"relative z-10 pt-6 pb-10 px-6",children:(0,v.jsxs)("div",{className:"max-w-7xl mx-auto text-center",children:[(0,v.jsxs)("div",{className:"",children:[(0,v.jsxs)("div",{className:"inline-flex items-center space-x-3 bg-gradient-to-r from-blue-500/20 via-cyan-500/20 to-purple-500/20 backdrop-blur-xl border border-blue-500/30 rounded-full px-6 py-3 mb-8 shadow-2xl shadow-blue-500/10 hover:shadow-blue-500/20 transition-all duration-500",children:[(0,v.jsx)(b,{className:"w-5 h-5 text-blue-400 animate-pulse"}),(0,v.jsx)("span",{className:"text-blue-300 font-medium",children:"Download Git Repo on Step Zero"}),(0,v.jsx)("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"})]}),(0,v.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,v.jsx)("img",{src:"https://i.imgur.com/Io3ukRC.gif",alt:"Git Preview",className:"w-full"}),(0,v.jsx)("img",{src:"https://i.imgur.com/6l9esbL.png",alt:"Git Preview",className:"w-full"})]}),(0,v.jsxs)("p",{className:"text-2xl md:text-3xl mt-4 text-gray-300 mb-12 max-w-5xl mx-auto leading-relaxed font-light",children:["CLI tool to search GitHub repositories, download source & releases, and instantly set up projects with",(0,v.jsx)("span",{className:"bg-gradient-to-r from-blue-400 to-cyan-400 bg-clip-text text-transparent font-semibold",children:" automatic dependency installation and editor opening"})]})]}),(0,v.jsxs)("div",{id:"installation",children:[(0,v.jsx)("div",{className:"flex justify-center mb-8",children:(0,v.jsx)("div",{className:"flex bg-gray-800/50 backdrop-blur-xl rounded-2xl p-2 border border-gray-700/50 shadow-2xl",children:Object.keys(j.installCommands).map((function(e){return(0,v.jsx)("button",{onClick:function(){return d(e)},className:"px-6 py-3 rounded-xl transition-all duration-300 font-semibold "+(c===e?"bg-gradient-to-r from-blue-500 via-cyan-500 to-purple-500 text-white shadow-lg transform scale-105":"text-gray-400 hover:text-white hover:bg-gray-700/50"),children:e.toUpperCase()},e)}))})}),(0,v.jsx)("div",{className:"max-w-3xl mx-auto",children:(0,v.jsxs)("div",{className:"bg-gray-800/40 backdrop-blur-xl border border-gray-700/50 rounded-2xl p-8 shadow-2xl hover:shadow-blue-500/10 transition-all duration-500 transform hover:scale-[1.02]",children:[(0,v.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,v.jsx)("span",{className:"text-gray-400 font-medium",children:"Installation Command"}),(0,v.jsxs)("button",{onClick:function(){return e=j.installCommands[c],t=c,navigator.clipboard.writeText(e),a(t),void setTimeout((function(){return a(null)}),2e3);var e,t},className:"flex items-center space-x-2 text-blue-400 hover:text-blue-300 transition-all duration-300 bg-blue-500/10 px-4 py-2 rounded-lg hover:bg-blue-500/20",children:[t===c?(0,v.jsx)(y,{className:"w-5 h-5"}):(0,v.jsx)(f,{className:"w-5 h-5"}),(0,v.jsx)("span",{className:"font-medium",children:t===c?"Copied!":"Copy"})]})]}),(0,v.jsx)("code",{className:"text-xl text-green-400 font-mono bg-gray-900/50 p-4 rounded-lg block",children:j.installCommands[c]})]})})]}),(0,v.jsx)("div",{className:"",children:(0,v.jsxs)("div",{className:"max-w-6xl mx-auto bg-gray-800/30 backdrop-blur-xl border border-gray-700/50 rounded-2xl p-10 shadow-2xl",children:[(0,v.jsx)("h3",{className:"text-3xl font-bold mb-8 text-center bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent",children:"Usage Examples"}),(0,v.jsx)("div",{className:"grid md:grid-cols-3 gap-6",children:j.featuresList.map((function(e,t){return(0,v.jsxs)("div",{className:"bg-gray-800/50 rounded-xl p-6 border border-gray-700/50 hover:border-blue-500/50 transition-all duration-300 transform hover:scale-105 hover:shadow-xl",children:[(0,v.jsx)("div",{className:"text-blue-400 font-bold text-lg mb-2",children:e.title}),(0,v.jsx)("code",{className:"text-green-400 text-lg font-mono block mb-3 bg-gray-900/50 p-3 rounded",children:e.command}),(0,v.jsx)("p",{className:"text-gray-400 text-sm",children:e.desc})]},t)}))})]})})]})}),(0,v.jsx)("section",{id:"features",className:"relative z-10 px-6",children:(0,v.jsx)("div",{className:"max-w-7xl mx-auto",children:(0,v.jsx)("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8 ",children:j.coreFeatures.map((function(e,t){return(0,v.jsxs)("div",{className:"group relative bg-gray-800/30 backdrop-blur-xl border border-gray-700/50 rounded-2xl p-8 hover:bg-gray-800/50 transition-all duration-500 transform hover:scale-105 hover:shadow-2xl hover:shadow-blue-500/20",children:[(0,v.jsx)("div",{className:"w-16 h-16 bg-gradient-to-br "+e.gradient+" rounded-2xl flex items-center justify-center mb-6 group-hover:scale-110 transition-all duration-300 shadow-2xl",children:(0,v.jsx)(e.icon,{className:"w-8 h-8 text-white"})}),(0,v.jsx)("h3",{className:"text-xl font-bold mb-4 group-hover:text-blue-400 transition-colors",children:e.title}),(0,v.jsx)("p",{className:"text-gray-400 leading-relaxed mb-4",children:e.description}),(0,v.jsx)("code",{className:"text-sm text-green-400 bg-gray-900/50 px-3 py-1 rounded font-mono",children:e.example}),(0,v.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-500/5 to-purple-500/5 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]},t)}))})})}),(0,v.jsx)("section",{className:"relative z-10 px-6 mt-4 ",children:(0,v.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,v.jsx)("div",{className:"text-center ",children:(0,v.jsx)("h2",{className:"text-6xl h-full md:text-5xl font-bold mb-6 bg-gradient-to-r pb-4 from-green-400 to-blue-400 bg-clip-text text-transparent",children:"Supported Project Types"})}),(0,v.jsx)("div",{className:"grid md:grid-cols-1 lg:grid-cols-1 gap-6 mt-4 ",children:j.projectTypes.map((function(e,t){return(0,v.jsx)("div",{className:"bg-gray-800/40 backdrop-blur-xl border border-gray-700/50 rounded-xl p-6 hover:border-blue-500/50 transition-all duration-300 transform hover:scale-[1.02]",children:(0,v.jsxs)("div",{className:"flex items-center justify-between",children:[(0,v.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,v.jsx)(e.icon,{className:"w-8 h-8 "+e.color}),(0,v.jsxs)("div",{children:[(0,v.jsx)("h3",{className:"text-lg font-bold "+e.color,children:e.name}),(0,v.jsxs)("p",{className:"text-gray-400 text-sm",children:["Detection: ",e.file]})]})]}),(0,v.jsxs)("div",{className:"text-right",children:[(0,v.jsx)("p",{className:"text-gray-300 font-medium",children:"Installation"}),(0,v.jsx)("code",{className:"text-green-400 text-sm",children:e.install})]})]})},t)}))})]})}),(0,v.jsx)("section",{id:"workflow",className:"relative z-10 mt-6 px-6",children:(0,v.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,v.jsxs)("div",{className:"text-center",children:[(0,v.jsx)("h2",{className:"text-4xl md:text-5xl font-bold mb-6 mt-10 bg-gradient-to-r from-cyan-400 to-blue-400 bg-clip-text text-transparent",children:"The Proper Protocol to Download Git Repo"}),(0,v.jsx)("p",{className:"text-xl text-gray-300 max-w-3xl mx-auto mb-10",children:'Skip the manual "git clone, cd, install" dance.'})]}),(0,v.jsx)("div",{className:"grid md:grid-cols-5 gap-8 mt-6",children:j.workflowSteps.map((function(e,t){return(0,v.jsxs)("div",{className:"text-center group",children:[(0,v.jsxs)("div",{className:"relative mb-6",children:[(0,v.jsx)("div",{className:"w-16 h-16 bg-gradient-to-br from-blue-500 to-purple-600 rounded-full flex items-center justify-center mx-auto shadow-2xl group-hover:scale-110 transition-all duration-300",children:(0,v.jsx)(e.icon,{className:"w-8 h-8 text-white"})}),(0,v.jsx)("div",{className:"absolute -top-2 -right-2 w-8 h-8 bg-gradient-to-r from-cyan-400 to-blue-400 rounded-full flex items-center justify-center text-sm font-bold text-gray-900",children:e.step})]}),(0,v.jsx)("h3",{className:"text-lg font-bold mb-2 group-hover:text-blue-400 transition-colors",children:e.title}),(0,v.jsx)("p",{className:"text-gray-400 text-sm",children:e.desc})]},t)}))}),(0,v.jsx)("div",{className:"mt-8 mb-8 text-center",children:(0,v.jsxs)("div",{className:"bg-gray-800/40 backdrop-blur-xl border border-gray-700/50 rounded-xl p-6 max-w-2xl mx-auto",children:[(0,v.jsxs)("p",{className:"text-gray-300 mb-4",children:[(0,v.jsx)("strong",{className:"text-blue-400",children:"Conflict Resolution:"})," If a directory with the same name exists, git0 automatically appends a number"]}),(0,v.jsx)("code",{className:"text-green-400 bg-gray-900/50 px-4 py-2 rounded",children:"react-app \u2192 react-app-2 \u2192 react-app-3"})]})})]})}),(0,v.jsx)(s.default,{})]})}},7851:(e,t,a)=>{a.r(t),a.d(t,{default:()=>d});a(6540);var r=a(4722);const s=(0,r.A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),l=(0,r.A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);var o=a(3378);const i=(0,r.A)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);var n=a(4848),c={urlDocs:"https://git0.js.org/functions",urlSupport:"https://discord.gg/SJdBqBz3tV",urlGithub:"https://github.com/vtempest/git0",urlGithubChat:"https://github.com/vtempest/git0/discussions",urlLogo:"https://i.imgur.com/857meew.png",name:"git0",urlAuthor:"https://github.com/vtempest",author:"vtempest",copyrightHTML:'&copy; 2025 Get git0. <a href="https://github.com/vtempest/git0">Star this on GitHub</a> so it can grow!'};function d(){return(0,n.jsx)("footer",{className:"relative z-10 border-t border-gray-800/50 py-16 px-6 bg-gray-900/50 backdrop-blur-xl",children:(0,n.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,n.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between ",children:[(0,n.jsxs)("div",{className:"flex items-center space-x-4 mb-6 md:mb-0",children:[(0,n.jsx)("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500 via-cyan-500 to-purple-600 rounded-xl flex items-center justify-center shadow-2xl",children:(0,n.jsx)("img",{src:c.urlLogo,alt:"logo",className:"w-10 h-10"})}),(0,n.jsx)("span",{className:"text-2xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent",children:c.name})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-8",children:[(0,n.jsxs)("a",{href:c.urlDocs,className:"flex items-center space-x-2 text-gray-400 hover:text-white transition-all duration-300 hover:scale-105",children:[(0,n.jsx)(s,{className:"w-5 h-5"}),(0,n.jsx)("span",{children:"Docs"})]}),(0,n.jsxs)("a",{href:c.urlSupport,className:"flex items-center space-x-2 text-gray-400 hover:text-white transition-all duration-300 hover:scale-105",children:[(0,n.jsx)(l,{className:"w-5 h-5"}),(0,n.jsx)("span",{children:"Discord"})]}),(0,n.jsxs)("a",{href:c.urlGithub,className:"flex items-center space-x-2 text-gray-400 hover:text-white transition-all duration-300 hover:scale-105",children:[(0,n.jsx)(o.A,{className:"w-5 h-5"}),(0,n.jsx)("span",{children:"GitHub"})]}),(0,n.jsxs)("a",{href:c.urlGithubChat,className:"flex items-center space-x-2 text-gray-400 hover:text-white transition-all duration-300 hover:scale-105",children:[(0,n.jsx)(i,{className:"w-5 h-5"}),(0,n.jsx)("span",{children:"Discussions"})]})]})]}),(0,n.jsxs)("div",{className:"pt-8 border-t border-gray-800/50 text-center",children:[(0,n.jsx)("p",{className:"text-gray-400 mb-4",dangerouslySetInnerHTML:{__html:c.copyrightHTML}}),(0,n.jsx)("div",{className:"flex justify-center space-x-4 text-sm text-gray-500",children:(0,n.jsxs)("span",{children:["Made by ",(0,n.jsx)("a",{href:c.urlAuthor,className:"text-blue-400 hover:text-blue-300 transition-all duration-300",children:c.author})," with \u2764\ufe0f for the developer community"]})})]})]})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcreate_apidocs=self.webpackChunkcreate_apidocs||[]).push([[567],{5226:i=>{i.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"default":[{"type":"category","label":"Functions","collapsed":false,"items":[{"type":"link","label":"git0","href":"/functions/git0","docId":"functions/git0","unlisted":false},{"type":"link","label":"github-api","href":"/functions/github-api","docId":"functions/github-api","unlisted":false},{"type":"link","label":"index","href":"/functions/","docId":"functions/index","unlisted":false},{"type":"link","label":"modules","href":"/functions/modules","docId":"functions/modules","unlisted":false}],"collapsible":true}]},"docs":{"functions/git0":{"id":"functions/git0","title":"git0","description":"Documentation / git0","sidebar":"default"},"functions/github-api":{"id":"functions/github-api","title":"github-api","description":"Documentation / github-api","sidebar":"default"},"functions/index":{"id":"functions/index","title":"index","description":"<img src=\\"https://img.shields.io/discord/1110227955554209923.svg?label=Chat&logo=Discord&colorB=7289da&style=flat\\"","sidebar":"default"},"functions/modules":{"id":"functions/modules","title":"modules","description":"Modules","sidebar":"default"}}}}')}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcreate_apidocs=self.webpackChunkcreate_apidocs||[]).push([[618],{8453:(e,s,r)=>{r.d(s,{R:()=>l,x:()=>t});var n=r(6540);const i={},d=n.createContext(i);function l(e){const s=n.useContext(d);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),n.createElement(d.Provider,{value:s},e.children)}},9501:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>c,contentTitle:()=>t,default:()=>o,frontMatter:()=>l,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"functions/github-api","title":"github-api","description":"Documentation / github-api","source":"@site/src/functions/github-api.md","sourceDirName":"functions","slug":"/functions/github-api","permalink":"/functions/github-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"default","previous":{"title":"git0","permalink":"/functions/git0"},"next":{"title":"index","permalink":"/functions/"}}');var i=r(4848),d=r(8453);const l={},t=void 0,c={},a=[{value:"default",id:"default",level:2},{value:"Example",id:"example",level:3},{value:"Constructors",id:"constructors",level:3},{value:"Constructor",id:"constructor",level:4},{value:"Parameters",id:"parameters",level:5},{value:"Returns",id:"returns",level:5},{value:"Example",id:"example-1",level:5},{value:"Properties",id:"properties",level:3},{value:"baseURL",id:"baseurl",level:4},{value:"client()",id:"client",level:4},{value:"Parameters",id:"parameters-1",level:5},{value:"Returns",id:"returns-1",level:5},{value:"debug",id:"debug",level:4},{value:"token",id:"token",level:4},{value:"DEFAULT_RESULTS_PER_PAGE",id:"default_results_per_page",level:4},{value:"Constant",id:"constant",level:5},{value:"Methods",id:"methods",level:3},{value:"downloadPackage()",id:"downloadpackage",level:4},{value:"Parameters",id:"parameters-2",level:5},{value:"Returns",id:"returns-2",level:5},{value:"Throws",id:"throws",level:5},{value:"Example",id:"example-2",level:5},{value:"downloadRepo()",id:"downloadrepo",level:4},{value:"Parameters",id:"parameters-3",level:5},{value:"Returns",id:"returns-3",level:5},{value:"Throws",id:"throws-1",level:5},{value:"Example",id:"example-3",level:5},{value:"getCompatibleReleases()",id:"getcompatiblereleases",level:4},{value:"Parameters",id:"parameters-4",level:5},{value:"Returns",id:"returns-4",level:5},{value:"Example",id:"example-4",level:5},{value:"getCurrentPlatform()",id:"getcurrentplatform",level:4},{value:"Returns",id:"returns-5",level:5},{value:"Example",id:"example-5",level:5},{value:"getReleases()",id:"getreleases",level:4},{value:"Parameters",id:"parameters-5",level:5},{value:"Returns",id:"returns-6",level:5},{value:"Example",id:"example-6",level:5},{value:"parseURL()",id:"parseurl",level:4},{value:"Parameters",id:"parameters-6",level:5},{value:"Returns",id:"returns-7",level:5},{value:"Example",id:"example-7",level:5},{value:"searchRepositories()",id:"searchrepositories",level:4},{value:"Parameters",id:"parameters-7",level:5},{value:"Returns",id:"returns-8",level:5},{value:"Throws",id:"throws-2",level:5},{value:"Example",id:"example-8",level:5}];function h(e){const s={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",h5:"h5",p:"p",pre:"pre",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/functions/modules",children:"Documentation"})," / github-api"]}),"\n",(0,i.jsx)(s.h2,{id:"default",children:"default"}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L17",children:"src/github-api.js:17"})]}),"\n",(0,i.jsx)(s.p,{children:"GitHub API client for downloading repositories, searching, and managing releases\nGithubAPI"}),"\n",(0,i.jsx)(s.h3,{id:"example",children:"Example"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"const github = new GithubAPI();\nconst repos = await github.searchRepositories('nodejs');\nawait github.downloadRepo('user/repo', './my-downloads');\n"})}),"\n",(0,i.jsx)(s.h3,{id:"constructors",children:"Constructors"}),"\n",(0,i.jsx)(s.h4,{id:"constructor",children:"Constructor"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"new default(options?: object): default;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L36",children:"src/github-api.js:36"})]}),"\n",(0,i.jsx)(s.p,{children:"Creates a new GithubAPI instance"}),"\n",(0,i.jsx)(s.h5,{id:"parameters",children:"Parameters"}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Parameter"}),(0,i.jsx)("th",{children:"Type"}),(0,i.jsx)("th",{children:"Description"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"options?"})})}),(0,i.jsx)("td",{children:(0,i.jsxs)(s.p,{children:["{ ",(0,i.jsx)(s.code,{children:"baseURL?"}),": ",(0,i.jsx)(s.code,{children:"string"}),"; ",(0,i.jsx)(s.code,{children:"debug?"}),": ",(0,i.jsx)(s.code,{children:"boolean"}),"; ",(0,i.jsx)(s.code,{children:"token?"}),": ",(0,i.jsx)(s.code,{children:"string"}),"; }"]})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Configuration options"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"options.baseURL?"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"GitHub API base URL"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"options.debug?"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"boolean"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Enable debug logging"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"options.token?"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"GitHub personal access token (defaults to GITHUB_TOKEN env var)"})})]})]})]}),"\n",(0,i.jsx)(s.h5,{id:"returns",children:"Returns"}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.a,{href:"#default",children:(0,i.jsx)(s.code,{children:"default"})})}),"\n",(0,i.jsx)(s.h5,{id:"example-1",children:"Example"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"// Use default settings with environment token\n\n// Use custom token\nconst github = new GithubAPI({ token: 'ghp_xxxxxxxxxxxx' });\n\n// Enable debug mode\nconst github = new GithubAPI({ debug: true });\n"})}),"\n",(0,i.jsx)(s.h3,{id:"properties",children:"Properties"}),"\n",(0,i.jsx)(s.h4,{id:"baseurl",children:"baseURL"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"baseURL: string;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L39",children:"src/github-api.js:39"})]}),"\n",(0,i.jsx)(s.h4,{id:"client",children:"client()"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"client: (path: any, options?: object) => Promise<{\n[key: string]: unknown;\n}>;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L41",children:"src/github-api.js:41"})]}),"\n",(0,i.jsx)(s.h5,{id:"parameters-1",children:"Parameters"}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Parameter"}),(0,i.jsx)("th",{children:"Type"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"path"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"any"})})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"options?"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"{ }"})})]})]})]}),"\n",(0,i.jsx)(s.h5,{id:"returns-1",children:"Returns"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"Promise"}),"<{\n[",(0,i.jsx)(s.code,{children:"key"}),": ",(0,i.jsx)(s.code,{children:"string"}),"]: ",(0,i.jsx)(s.code,{children:"unknown"}),";\n}>"]}),"\n",(0,i.jsx)(s.h4,{id:"debug",children:"debug"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"debug: boolean;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L38",children:"src/github-api.js:38"})]}),"\n",(0,i.jsx)(s.h4,{id:"token",children:"token"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"token: string;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L37",children:"src/github-api.js:37"})]}),"\n",(0,i.jsx)(s.h4,{id:"default_results_per_page",children:"DEFAULT_RESULTS_PER_PAGE"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"static DEFAULT_RESULTS_PER_PAGE: number = 10;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L19",children:"src/github-api.js:19"})]}),"\n",(0,i.jsx)(s.h5,{id:"constant",children:"Constant"}),"\n",(0,i.jsx)(s.p,{children:"Number of results to return per page for repository searches"}),"\n",(0,i.jsx)(s.h3,{id:"methods",children:"Methods"}),"\n",(0,i.jsx)(s.h4,{id:"downloadpackage",children:"downloadPackage()"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"downloadPackage(packageURL: any, downloadPath: string): Promise<string>;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L188",children:"src/github-api.js:188"})]}),"\n",(0,i.jsx)(s.p,{children:"Downloads a release asset from GitHub and provides installation instructions"}),"\n",(0,i.jsx)(s.h5,{id:"parameters-2",children:"Parameters"}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Parameter"}),(0,i.jsx)("th",{children:"Type"}),(0,i.jsx)("th",{children:"Description"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"packageURL"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"any"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Download URL for the asset"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"downloadPath"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Directory to download the asset to"})})]})]})]}),"\n",(0,i.jsx)(s.h5,{id:"returns-2",children:"Returns"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"Promise"}),"<",(0,i.jsx)(s.code,{children:"string"}),">"]}),"\n",(0,i.jsx)(s.p,{children:"Path to the downloaded file"}),"\n",(0,i.jsx)(s.h5,{id:"throws",children:"Throws"}),"\n",(0,i.jsx)(s.p,{children:"When download fails"}),"\n",(0,i.jsx)(s.h5,{id:"example-2",children:"Example"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"const asset = 'https://github.com/user/repo/releases/download/v1.0.0/myapp-v1.0.0-linux-x64'\nconst downloadPath = await github.downloadPackage(asset, './downloads/myapp');\n"})}),"\n",(0,i.jsx)(s.h4,{id:"downloadrepo",children:"downloadRepo()"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"downloadRepo(repo: string, targetDir?: string): Promise<string>;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L69",children:"src/github-api.js:69"})]}),"\n",(0,i.jsx)(s.p,{children:"Downloads a GitHub repository as a tarball and extracts it to a local directory"}),"\n",(0,i.jsx)(s.h5,{id:"parameters-3",children:"Parameters"}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Parameter"}),(0,i.jsx)("th",{children:"Type"}),(0,i.jsx)("th",{children:"Default value"}),(0,i.jsx)("th",{children:"Description"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"repo"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"undefined"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Repository URL or owner/name format"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"targetDir?"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"null"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Target directory name (defaults to repo name)"})})]})]})]}),"\n",(0,i.jsx)(s.h5,{id:"returns-3",children:"Returns"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"Promise"}),"<",(0,i.jsx)(s.code,{children:"string"}),">"]}),"\n",(0,i.jsx)(s.p,{children:"Path to the extracted repository directory"}),"\n",(0,i.jsx)(s.h5,{id:"throws-1",children:"Throws"}),"\n",(0,i.jsx)(s.p,{children:"When repository download fails"}),"\n",(0,i.jsx)(s.h5,{id:"example-3",children:"Example"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"// Download repository to current directory\nconst repoPath = await github.downloadRepo('https://github.com/user/repo');\n\n// Download to specific directory\nconst repoPath = await github.downloadRepo('user/repo', 'my-custom-dir');\n"})}),"\n",(0,i.jsx)(s.h4,{id:"getcompatiblereleases",children:"getCompatibleReleases()"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"getCompatibleReleases(owner: string, repo: string): Promise<any[]>;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L310",children:"src/github-api.js:310"})]}),"\n",(0,i.jsx)(s.p,{children:"Gets releases compatible with the current platform"}),"\n",(0,i.jsx)(s.h5,{id:"parameters-4",children:"Parameters"}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Parameter"}),(0,i.jsx)("th",{children:"Type"}),(0,i.jsx)("th",{children:"Description"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"owner"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Repository owner"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"repo"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Repository name"})})]})]})]}),"\n",(0,i.jsx)(s.h5,{id:"returns-4",children:"Returns"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"Promise"}),"<",(0,i.jsx)(s.code,{children:"any"}),"[]>"]}),"\n",(0,i.jsx)(s.p,{children:"Array of compatible releases"}),"\n",(0,i.jsx)(s.h5,{id:"example-4",children:"Example"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"const compatible = await github.getCompatibleReleases('user', 'repo');\nconsole.log(`Found ${compatible.length} compatible releases`);\n"})}),"\n",(0,i.jsx)(s.h4,{id:"getcurrentplatform",children:"getCurrentPlatform()"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"getCurrentPlatform(): any;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L262",children:"src/github-api.js:262"})]}),"\n",(0,i.jsx)(s.p,{children:"Detects the current operating system and architecture"}),"\n",(0,i.jsx)(s.h5,{id:"returns-5",children:"Returns"}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"any"})}),"\n",(0,i.jsx)(s.p,{children:"Platform information object"}),"\n",(0,i.jsx)(s.h5,{id:"example-5",children:"Example"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"const platform = github.getCurrentPlatform();\nconsole.log(`Running on ${platform.os} ${platform.arch}`);\n"})}),"\n",(0,i.jsx)(s.h4,{id:"getreleases",children:"getReleases()"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"getReleases(owner: string, repo: string): Promise<any[]>;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L296",children:"src/github-api.js:296"})]}),"\n",(0,i.jsx)(s.p,{children:"Gets repository releases with platform categorization"}),"\n",(0,i.jsx)(s.h5,{id:"parameters-5",children:"Parameters"}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Parameter"}),(0,i.jsx)("th",{children:"Type"}),(0,i.jsx)("th",{children:"Description"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"owner"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Repository owner"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"repo"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Repository name"})})]})]})]}),"\n",(0,i.jsx)(s.h5,{id:"returns-6",children:"Returns"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"Promise"}),"<",(0,i.jsx)(s.code,{children:"any"}),"[]>"]}),"\n",(0,i.jsx)(s.p,{children:"Array of categorized releases"}),"\n",(0,i.jsx)(s.h5,{id:"example-6",children:"Example"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"const releases = await github.getReleases('microsoft', 'vscode');\nconsole.log(`Found ${releases.length} releases`);\n"})}),"\n",(0,i.jsx)(s.h4,{id:"parseurl",children:"parseURL()"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"parseURL(query: string): any;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L241",children:"src/github-api.js:241"})]}),"\n",(0,i.jsx)(s.p,{children:"Parses a GitHub URL or shorthand repository reference"}),"\n",(0,i.jsx)(s.h5,{id:"parameters-6",children:"Parameters"}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Parameter"}),(0,i.jsx)("th",{children:"Type"}),(0,i.jsx)("th",{children:"Description"})]})}),(0,i.jsx)("tbody",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"query"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"GitHub URL or owner/repo format"})})]})})]}),"\n",(0,i.jsx)(s.h5,{id:"returns-7",children:"Returns"}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"any"})}),"\n",(0,i.jsx)(s.p,{children:"Parsed git URL object or false if invalid"}),"\n",(0,i.jsx)(s.h5,{id:"example-7",children:"Example"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"// Parse full URL\nconst parsed = github.parseURL('https://github.com/user/repo');\n\n// Parse shorthand\nconst parsed = github.parseURL('user/repo');\n\nif (parsed) {\n console.log(`Owner: ${parsed.owner}, Name: ${parsed.name}`);\n}\n"})}),"\n",(0,i.jsx)(s.h4,{id:"searchrepositories",children:"searchRepositories()"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"searchRepositories(query: string, options?: object): Promise<any[]>;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Defined in: ",(0,i.jsx)(s.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/github-api.js#L130",children:"src/github-api.js:130"})]}),"\n",(0,i.jsx)(s.p,{children:"Searches for GitHub repositories by name and enriches results with release information"}),"\n",(0,i.jsx)(s.h5,{id:"parameters-7",children:"Parameters"}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Parameter"}),(0,i.jsx)("th",{children:"Type"}),(0,i.jsx)("th",{children:"Description"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"query"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Search query for repository names"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"options?"})})}),(0,i.jsx)("td",{children:(0,i.jsxs)(s.p,{children:["{ ",(0,i.jsx)(s.code,{children:"order?"}),": ",(0,i.jsx)(s.code,{children:"string"}),"; ",(0,i.jsx)(s.code,{children:"perPage?"}),": ",(0,i.jsx)(s.code,{children:"number"}),"; ",(0,i.jsx)(s.code,{children:"sort?"}),": ",(0,i.jsx)(s.code,{children:"string"}),"; }"]})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Search options"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"options.order?"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Sort order (asc, desc)"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"options.perPage?"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"number"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Number of results per page (defaults to DEFAULT_RESULTS_PER_PAGE)"})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"options.sort?"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"string"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(s.p,{children:"Sort field (stars, forks, updated)"})})]})]})]}),"\n",(0,i.jsx)(s.h5,{id:"returns-8",children:"Returns"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"Promise"}),"<",(0,i.jsx)(s.code,{children:"any"}),"[]>"]}),"\n",(0,i.jsx)(s.p,{children:"Array of repository objects with release information"}),"\n",(0,i.jsx)(s.h5,{id:"throws-2",children:"Throws"}),"\n",(0,i.jsx)(s.p,{children:"When search fails"}),"\n",(0,i.jsx)(s.h5,{id:"example-8",children:"Example"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"const repos = await github.searchRepositories('nodejs');\nrepos.forEach(repo => {\n console.log(`${repo.name}: ${repo.hasReleases ? 'Has releases' : 'No releases'}`);\n});\n\n// Custom search options\nconst repos = await github.searchRepositories('react', {\n perPage: 5,\n sort: 'updated',\n order: 'desc'\n});\n"})})]})}function o(e={}){const{wrapper:s}={...(0,d.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcreate_apidocs=self.webpackChunkcreate_apidocs||[]).push([[174],{8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>d});var r=t(6540);const s={},i=r.createContext(s);function c(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),r.createElement(i.Provider,{value:n},e.children)}},8781:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"functions/git0","title":"git0","description":"Documentation / git0","source":"@site/src/functions/git0.md","sourceDirName":"functions","slug":"/functions/git0","permalink":"/functions/git0","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"default","next":{"title":"github-api","permalink":"/functions/github-api"}}');var s=t(4848),i=t(8453);const c={},d=void 0,l={},a=[{value:"installDependencies()",id:"installdependencies",level:2},{value:"Parameters",id:"parameters",level:3},{value:"Returns",id:"returns",level:3},{value:"Export",id:"export",level:3},{value:"Async",id:"async",level:3},{value:"openInIDE()",id:"openinide",level:2},{value:"Parameters",id:"parameters-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Export",id:"export-1",level:3}];function o(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/functions/modules",children:"Documentation"})," / git0"]}),"\n",(0,s.jsx)(n.h2,{id:"installdependencies",children:"installDependencies()"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"function installDependencies(targetDir: string): Promise<void>;\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Defined in: ",(0,s.jsx)(n.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/git0.js#L208",children:"src/git0.js:208"})]}),"\n",(0,s.jsx)(n.p,{children:"Automatically detects project type and installs dependencies\nSupports Node.js, Docker, Python, Rust, and Go projects"}),"\n",(0,s.jsx)(n.h3,{id:"parameters",children:"Parameters"}),"\n",(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Parameter"}),(0,s.jsx)("th",{children:"Type"}),(0,s.jsx)("th",{children:"Description"})]})}),(0,s.jsx)("tbody",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"targetDir"})})}),(0,s.jsx)("td",{children:(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"string"})})}),(0,s.jsx)("td",{children:(0,s.jsx)(n.p,{children:"Path to the project directory"})})]})})]}),"\n",(0,s.jsx)(n.h3,{id:"returns",children:"Returns"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Promise"}),"<",(0,s.jsx)(n.code,{children:"void"}),">"]}),"\n",(0,s.jsx)(n.h3,{id:"export",children:"Export"}),"\n",(0,s.jsx)(n.h3,{id:"async",children:"Async"}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"openinide",children:"openInIDE()"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"function openInIDE(targetDir: string): void;\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Defined in: ",(0,s.jsx)(n.a,{href:"https://github.com/vtempest/git0/blob/a8fc7e45afbaefca0c4e19627a1fa2d11f80f7e6/src/git0.js#L158",children:"src/git0.js:158"})]}),"\n",(0,s.jsx)(n.p,{children:"Opens a directory in the first available IDE/editor\nAlso attempts to open a README or package.json file after 3 seconds"}),"\n",(0,s.jsx)(n.h3,{id:"parameters-1",children:"Parameters"}),"\n",(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Parameter"}),(0,s.jsx)("th",{children:"Type"}),(0,s.jsx)("th",{children:"Description"})]})}),(0,s.jsx)("tbody",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"targetDir"})})}),(0,s.jsx)("td",{children:(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"string"})})}),(0,s.jsx)("td",{children:(0,s.jsx)(n.p,{children:"Path to the directory to open"})})]})})]}),"\n",(0,s.jsx)(n.h3,{id:"returns-1",children:"Returns"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"void"})}),"\n",(0,s.jsx)(n.h3,{id:"export-1",children:"Export"})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcreate_apidocs=self.webpackChunkcreate_apidocs||[]).push([[893],{4035:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"functions/index","title":"index","description":"<img src=\\"https://img.shields.io/discord/1110227955554209923.svg?label=Chat&logo=Discord&colorB=7289da&style=flat\\"","source":"@site/src/functions/index.md","sourceDirName":"functions","slug":"/functions/","permalink":"/functions/","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"default","previous":{"title":"github-api","permalink":"/functions/github-api"},"next":{"title":"modules","permalink":"/functions/modules"}}');var i=t(4848),r=t(8453);const o={},l="Git0: Download Git Repo on Step Zero",d={},c=[{value:"\ud83d\ude80 Installation",id:"-installation",level:2},{value:"\u2728 Features",id:"-features",level:2},{value:"\ud83c\udfaf Usage",id:"-usage",level:2},{value:"Supported Project Types",id:"supported-project-types",level:3},{value:"Supported IDEs",id:"supported-ides",level:3},{value:"\ud83d\udd27 Configuration",id:"-configuration",level:2},{value:"What Happens After Download",id:"what-happens-after-download",level:3},{value:"GitHub Token (Optional)",id:"github-token-optional",level:3}];function a(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{align:"center",children:(0,i.jsx)("img",{src:"https://i.imgur.com/poOtI3N.png"})}),"\n",(0,i.jsxs)("p",{align:"center",children:[(0,i.jsx)("a",{href:"https://discord.gg/SJdBqBz3tV",children:(0,i.jsx)("img",{src:"https://img.shields.io/discord/1110227955554209923.svg?label=Chat&logo=Discord&colorB=7289da&style=flat",alt:"Join Discord"})}),(0,i.jsx)("a",{href:"https://github.com/vtempest/git0/discussions",children:(0,i.jsx)("img",{alt:"GitHub Stars",src:"https://img.shields.io/github/stars/vtempest/git0"})}),(0,i.jsx)("a",{href:"https://github.com/vtempest/git0/discussions",children:(0,i.jsx)("img",{alt:"GitHub Discussions",src:"https://img.shields.io/github/discussions/vtempest/git0"})}),(0,i.jsx)("a",{href:"https://github.com/vtempest/git0/pulse",alt:"Activity",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/commit-activity/m/vtempest/git0"})}),(0,i.jsx)("img",{src:"https://img.shields.io/github/last-commit/vtempest/git0.svg?style=flat-square",alt:"GitHub last commit"})]}),"\n",(0,i.jsxs)("p",{align:"center",children:[(0,i.jsx)("img",{src:"https://img.shields.io/badge/PRs-welcome-brightgreen.svg",alt:"PRs Welcome"}),(0,i.jsx)("a",{href:"https://codespaces.new/vtempest/git0",children:(0,i.jsx)("img",{src:"https://github.com/codespaces/badge.svg",width:"150",height:"20"})})]}),"\n",(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"git0-download-git-repo-on-step-zero",children:"Git0: Download Git Repo on Step Zero"})}),"\n",(0,i.jsx)(s.p,{children:"CLI tool to search GitHub repositories, download source & releases for your system, and instantly set up, then install dependencies and open code editor."}),"\n",(0,i.jsx)(s.h2,{id:"-installation",children:"\ud83d\ude80 Installation"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npm install -g git0\n"})}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"bun install -g git0\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.img,{src:"https://i.imgur.com/Io3ukRC.gif",alt:"livepreview"}),"\n",(0,i.jsx)(s.img,{src:"https://i.imgur.com/K22NiBq.png",alt:"preview"})]}),"\n",(0,i.jsx)(s.h2,{id:"-features",children:"\u2728 Features"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Search GitHub repositories"})," by name with fuzzy matching"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Download repositories"})," directly from GitHub URLs or owner/repo shortcuts. Skip the manual git clone, cd, install dance"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Get Releases"})," instantly download latest release for your system or all systems"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Automatic dependency detection"})," and installation for multiple project types"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Smart IDE integration"})," - automatically opens projects in your preferred editor"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Cross-platform support"})," - works on Windows, macOS, and Linux"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Conflict resolution"})," - handles directory naming conflicts automatically"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"-usage",children:"\ud83c\udfaf Usage"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"# Search for repositories by name\ngg react starter\n\n# Direct download from GitHub URL\n## gg and git0 both work\ngg https://github.com/facebook/react\n\n# Download using owner/repo shorthand\ngit0 react starter\n\n## Use git0 without installing, (only node needed)\n# (copy into your project's readme for quick setup)\nnpx git0 facebook/react\n"})}),"\n",(0,i.jsx)(s.h3,{id:"supported-project-types",children:"Supported Project Types"}),"\n",(0,i.jsx)(s.p,{children:"git0 automatically detects and sets up the following project types:"}),"\n",(0,i.jsxs)(s.table,{children:[(0,i.jsx)(s.thead,{children:(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.th,{children:"Project Type"}),(0,i.jsx)(s.th,{children:"Detection"}),(0,i.jsx)(s.th,{children:"Installation"})]})}),(0,i.jsxs)(s.tbody,{children:[(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.strong,{children:"Node.js"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"package.json"})}),(0,i.jsxs)(s.td,{children:[(0,i.jsx)(s.code,{children:"bun install"})," (fallback to ",(0,i.jsx)(s.code,{children:"npm install"}),")"]})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.strong,{children:"Docker"})}),(0,i.jsxs)(s.td,{children:[(0,i.jsx)(s.code,{children:"Dockerfile"}),", ",(0,i.jsx)(s.code,{children:"docker-compose.yml"})]}),(0,i.jsxs)(s.td,{children:[(0,i.jsx)(s.code,{children:"docker-compose up -d"})," or ",(0,i.jsx)(s.code,{children:"docker build"})]})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.strong,{children:"Python"})}),(0,i.jsxs)(s.td,{children:[(0,i.jsx)(s.code,{children:"requirements.txt"}),", ",(0,i.jsx)(s.code,{children:"setup.py"})]}),(0,i.jsx)(s.td,{children:"Virtual environment + pip install"})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.strong,{children:"Rust"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"Cargo.toml"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"cargo build"})})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.strong,{children:"Go"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"go.mod"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"go mod tidy"})})]})]})]}),"\n",(0,i.jsx)(s.h3,{id:"supported-ides",children:"Supported IDEs"}),"\n",(0,i.jsx)(s.p,{children:"git0 automatically detects and opens projects in your preferred IDE:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Cursor"})," (",(0,i.jsx)(s.code,{children:"cursor"}),")"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Windsurf"})," (",(0,i.jsx)(s.code,{children:"windsurf"}),")"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"VS Code"})," (",(0,i.jsx)(s.code,{children:"code"}),")"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Code Server"})," (",(0,i.jsx)(s.code,{children:"code-server"}),")"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Neovim"})," (",(0,i.jsx)(s.code,{children:"nvim"}),")"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"-configuration",children:"\ud83d\udd27 Configuration"}),"\n",(0,i.jsx)(s.h3,{id:"what-happens-after-download",children:"What Happens After Download"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Repository is downloaded"})," to your current directory"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Project type is detected"})," automatically"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Dependencies are installed"})," based on project type"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"IDE is launched"})," automatically (if available)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Development server starts"})," (for Node.js projects)"]}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["If a directory with the same name exists, git0 automatically appends a number (e.g., ",(0,i.jsx)(s.code,{children:"react-2"}),", ",(0,i.jsx)(s.code,{children:"react-3"}),")."]}),"\n",(0,i.jsx)(s.h3,{id:"github-token-optional",children:"GitHub Token (Optional)"}),"\n",(0,i.jsxs)(s.p,{children:["For higher API rate limits, set ",(0,i.jsx)(s.a,{href:"https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token",children:"your GitHub token"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"export GITHUB_TOKEN=your_github_token_here\n"})}),"\n",(0,i.jsx)(s.p,{children:"Without a token, you're limited to 60 requests per hour. With a token, you get 5,000 requests per hour."})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>l});var n=t(6540);const i={},r=n.createContext(i);function o(e){const s=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:s},e.children)}}}]);
@@ -1 +0,0 @@
1
- (()=>{"use strict";var e,t,r,a,o,n={},f={};function i(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.m=n,i.c=f,e=[],i.O=(t,r,a,o)=>{if(!r){var n=1/0;for(u=0;u<e.length;u++){for(var[r,a,o]=e[u],f=!0,c=0;c<r.length;c++)(!1&o||n>=o)&&Object.keys(i.O).every((e=>i.O[e](r[c])))?r.splice(c--,1):(f=!1,o<n&&(n=o));if(f){e.splice(u--,1);var d=a();void 0!==d&&(t=d)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,i.d(o,n),o},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>"assets/js/"+({24:"68cef36b",48:"a94703ab",98:"a7bd4aaa",174:"299d276b",235:"a7456010",401:"17896441",567:"22dd74f7",583:"1df93b7f",618:"28ab763d",647:"5e95c892",682:"ac46717f",742:"aba21aa0",893:"c3a618e1"}[e]||e)+"."+{24:"c312447e",48:"6d39a596",98:"87229397",174:"1a1baa1c",235:"3054873b",237:"daf7efdf",278:"1628756c",401:"79ceefeb",567:"237398b4",577:"78325c02",583:"d8c05d2c",591:"2156b33d",618:"5714aa16",647:"bd6c1093",682:"32345167",742:"dfebd789",893:"965a31da"}[e]+".js",i.miniCssF=e=>{},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="create-apidocs:",i.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var f,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),u=0;u<d.length;u++){var l=d[u];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+r){f=l;break}}f||(c=!0,(f=document.createElement("script")).charset="utf-8",f.timeout=120,i.nc&&f.setAttribute("nonce",i.nc),f.setAttribute("data-webpack",o+r),f.src=e),a[e]=[t];var b=(t,r)=>{f.onerror=f.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=b.bind(null,f.onerror),f.onload=b.bind(null,f.onload),c&&document.head.appendChild(f)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="/",i.gca=function(e){return e={17896441:"401","68cef36b":"24",a94703ab:"48",a7bd4aaa:"98","299d276b":"174",a7456010:"235","22dd74f7":"567","1df93b7f":"583","28ab763d":"618","5e95c892":"647",ac46717f:"682",aba21aa0:"742",c3a618e1:"893"}[e]||e,i.p+i.u(e)},(()=>{var e={354:0,869:0};i.f.j=(t,r)=>{var a=i.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=i.p+i.u(t),f=new Error;i.l(n,(r=>{if(i.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",f.name="ChunkLoadError",f.type=o,f.request=n,a[1](f)}}),"chunk-"+t,t)}},i.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,[n,f,c]=r,d=0;if(n.some((t=>0!==e[t]))){for(a in f)i.o(f,a)&&(i.m[a]=f[a]);if(c)var u=c(i)}for(t&&t(r);d<n.length;d++)o=n[d],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(u)},r=self.webpackChunkcreate_apidocs=self.webpackChunkcreate_apidocs||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})()})();