git0 0.2.3 → 0.2.4
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.
- package/docs/404.html +4 -0
- package/docs/CNAME +1 -0
- package/docs/Footer/index.html +4 -0
- package/docs/assets/css/styles.36dc19db.css +1 -0
- package/docs/assets/js/17896441.859f1a34.js +1 -0
- package/docs/assets/js/196.f2323311.js +1 -0
- package/docs/assets/js/1df93b7f.b886b8fe.js +1 -0
- package/docs/assets/js/22dd74f7.9915da9b.js +1 -0
- package/docs/assets/js/294.067938e2.js +101 -0
- package/docs/assets/js/4a829dc8.22596b01.js +1 -0
- package/docs/assets/js/5e95c892.a050489a.js +1 -0
- package/docs/assets/js/61.78a4a5cd.js +1 -0
- package/docs/assets/js/66a0d7f4.a57db0e1.js +1 -0
- package/docs/assets/js/990.0223f00f.js +1 -0
- package/docs/assets/js/a7456010.eaa69c24.js +1 -0
- package/docs/assets/js/a7bd4aaa.6bf60595.js +1 -0
- package/docs/assets/js/a94703ab.233c731c.js +1 -0
- package/docs/assets/js/aba21aa0.3975ceaf.js +1 -0
- package/docs/assets/js/ac46717f.20537802.js +1 -0
- package/docs/assets/js/c3a618e1.b288e34c.js +1 -0
- package/docs/assets/js/d140250a.42194f66.js +1 -0
- package/docs/assets/js/main.9107865a.js +38 -0
- package/docs/assets/js/runtime~main.d42315b4.js +1 -0
- package/docs/customize-home/index.html +4 -0
- package/docs/functions/globals/index.html +4 -0
- package/docs/functions/index.html +4 -0
- package/docs/index.html +4 -0
- package/docs/lunr-index-1749598895331.json +1 -0
- package/docs/lunr-index.json +1 -0
- package/docs/search-doc-1749598895331.json +1 -0
- package/docs/search-doc.json +1 -0
- package/docs/sitemap.xml +1 -0
- package/docs-config/config/customize-docs.js +30 -0
- package/docs-config/config/docs-theme.css +358 -0
- package/docs-config/config/openapi.mustache +39 -0
- package/docs-config/config/sidebars.ts +21 -0
- package/docs-config/config/typedoc.json +40 -0
- package/docs-config/docusaurus.config.ts +348 -0
- package/docs-config/package.json +40 -0
- package/docs-config/src/functions/globals.md +153 -0
- package/docs-config/src/functions/index.md +114 -0
- package/docs-config/src/functions/typedoc-sidebar.cjs +6 -0
- package/docs-config/src/index.md +126 -0
- package/docs-config/src/pages/Footer.tsx +57 -0
- package/docs-config/src/pages/customize-home.tsx +147 -0
- package/docs-config/src/pages/index.tsx +292 -0
- package/docs-config/static/CNAME +1 -0
- package/docs-config/tailwind.config.js +13 -0
- package/docs-config/tsconfig.json +26 -0
- package/git0.js +6 -6
- package/package.json +15 -15
- package/readme.md +16 -18
package/git0.js
CHANGED
|
@@ -19,7 +19,6 @@ const githubHelpUrl = 'https://github.com/settings/personal-access-tokens/new'
|
|
|
19
19
|
grab('', {
|
|
20
20
|
setDefaults: true,
|
|
21
21
|
debug: false,
|
|
22
|
-
timeout: 5000,
|
|
23
22
|
onError: (error) => {
|
|
24
23
|
if (error.includes('403')) {
|
|
25
24
|
log(chalk.red('Rate limit exceeded. Please set env var GITHUB_TOKEN. Help:\n' + githubHelpUrl));
|
|
@@ -332,7 +331,8 @@ function getIdeCommand() {
|
|
|
332
331
|
{ name: 'Windsurf', cmd: 'windsurf' },
|
|
333
332
|
{ name: 'VSCode', cmd: 'code' },
|
|
334
333
|
{ name: 'Code Server', cmd: 'code-server' },
|
|
335
|
-
{ name: 'Neovim', cmd: 'nvim' }
|
|
334
|
+
{ name: 'Neovim', cmd: 'nvim' },
|
|
335
|
+
{ name: 'Webstorm', cmd: 'webstorm' }
|
|
336
336
|
];
|
|
337
337
|
|
|
338
338
|
for (const ide of ides) {
|
|
@@ -397,6 +397,7 @@ export function openInIDE(targetDir) {
|
|
|
397
397
|
export async function installDependencies(targetDir) {
|
|
398
398
|
process.chdir(targetDir);
|
|
399
399
|
|
|
400
|
+
|
|
400
401
|
// Project type detection
|
|
401
402
|
const detectors = {
|
|
402
403
|
nodejs: () => fs.existsSync('package.json'),
|
|
@@ -464,8 +465,6 @@ function runCommand(cmd) {
|
|
|
464
465
|
}
|
|
465
466
|
|
|
466
467
|
export async function searchRepositories(query) {
|
|
467
|
-
printLogo()
|
|
468
|
-
|
|
469
468
|
try {
|
|
470
469
|
const response = await grab(GITHUB_API, {
|
|
471
470
|
q: `${query} in:name`,
|
|
@@ -541,9 +540,9 @@ export async function downloadRepo(repo) {
|
|
|
541
540
|
response = await grab(url.replace("/master", "/main"), params);
|
|
542
541
|
|
|
543
542
|
|
|
544
|
-
|
|
543
|
+
setTimeout(() => {
|
|
545
544
|
openInIDE(extractPath);
|
|
546
|
-
|
|
545
|
+
}, 1000);
|
|
547
546
|
installDependencies(extractPath);
|
|
548
547
|
} catch (error) {
|
|
549
548
|
console.error(chalk.red('Download failed:'), error.message);
|
|
@@ -563,6 +562,7 @@ function getAvailableDirectoryName(basePath) {
|
|
|
563
562
|
}
|
|
564
563
|
|
|
565
564
|
async function main() {
|
|
565
|
+
printLogo()
|
|
566
566
|
const args = process.argv.slice(2);
|
|
567
567
|
if (!args.length) {
|
|
568
568
|
log(chalk.yellow('Usage: gg <search-query>'));
|
package/package.json
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git0",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"description": "CLI tool to search GitHub repositories, download source & releases for your system, and instantly set up, then install dependencies and open code editor.",
|
|
4
|
+
"version": "0.2.4",
|
|
5
5
|
"author": "vtempest",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"github",
|
|
9
|
-
"cli",
|
|
10
|
-
"download"
|
|
11
|
-
],
|
|
12
6
|
"dependencies": {
|
|
13
7
|
"axios": "^1.9.0",
|
|
14
8
|
"chalk": "^5.4.1",
|
|
@@ -18,14 +12,20 @@
|
|
|
18
12
|
"streamable": "^0.6.0",
|
|
19
13
|
"tar": "^7.4.3"
|
|
20
14
|
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"demo": "bun gg.js react template",
|
|
23
|
-
"publish:npm": "npm version patch && npm publish --access public"
|
|
24
|
-
},
|
|
25
|
-
"type": "module",
|
|
26
|
-
"main": "./git0.js",
|
|
27
15
|
"bin": {
|
|
28
16
|
"gg": "./git0.js",
|
|
29
17
|
"git0": "./git0.js"
|
|
30
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"github",
|
|
21
|
+
"cli",
|
|
22
|
+
"download"
|
|
23
|
+
],
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"scripts": {
|
|
26
|
+
"docs": "cd docs-config && bun run build:docs",
|
|
27
|
+
"demo": "bun git0.js react template",
|
|
28
|
+
"publish:npm": "npm version patch && npm publish --access public"
|
|
29
|
+
},
|
|
30
|
+
"type": "module"
|
|
31
31
|
}
|
package/readme.md
CHANGED
|
@@ -26,10 +26,19 @@
|
|
|
26
26
|
</p>
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
# Git0: Git
|
|
29
|
+
# Git0: Download Git Repo on Step Zero
|
|
30
|
+
CLI tool to search GitHub repositories, download source & releases for your system, and instantly set up, then install dependencies and open code editor.
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
## 🚀 Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g git0
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
bun install -g git0
|
|
41
|
+
```
|
|
33
42
|
|
|
34
43
|

|
|
35
44
|

|
|
@@ -38,7 +47,7 @@ instantly set up GitHub repositories with automatic dependency installation and
|
|
|
38
47
|
## ✨ Features
|
|
39
48
|
|
|
40
49
|
- **Search GitHub repositories** by name with fuzzy matching
|
|
41
|
-
- **Download repositories** directly from GitHub URLs or owner/repo shortcuts
|
|
50
|
+
- **Download repositories** directly from GitHub URLs or owner/repo shortcuts. Skip the manual git clone, cd, install dance
|
|
42
51
|
- **Get Releases** instantly download latest release for your system or all systems
|
|
43
52
|
- **Automatic dependency detection** and installation for multiple project types
|
|
44
53
|
- **Smart IDE integration** - automatically opens projects in your preferred editor
|
|
@@ -51,10 +60,6 @@ instantly set up GitHub repositories with automatic dependency installation and
|
|
|
51
60
|
|
|
52
61
|
### Search and Download
|
|
53
62
|
```bash
|
|
54
|
-
# install in bun or node
|
|
55
|
-
npm i -g git0
|
|
56
|
-
bun i -g git0
|
|
57
|
-
|
|
58
63
|
# Search for repositories by name
|
|
59
64
|
gg react starter
|
|
60
65
|
|
|
@@ -71,7 +76,7 @@ npx git0 react starter
|
|
|
71
76
|
|
|
72
77
|
### Supported Project Types
|
|
73
78
|
|
|
74
|
-
|
|
79
|
+
GG automatically detects and sets up the following project types:
|
|
75
80
|
|
|
76
81
|
| Project Type | Detection | Installation |
|
|
77
82
|
|-------------|-----------|-------------|
|
|
@@ -83,7 +88,7 @@ npx git0 react starter
|
|
|
83
88
|
|
|
84
89
|
### Supported IDEs
|
|
85
90
|
|
|
86
|
-
|
|
91
|
+
GG automatically detects and opens projects in your preferred IDE:
|
|
87
92
|
|
|
88
93
|
- **Cursor** (`cursor`)
|
|
89
94
|
- **Windsurf** (`windsurf`)
|
|
@@ -111,11 +116,4 @@ Without a token, you're limited to 60 requests per hour. With a token, you get 5
|
|
|
111
116
|
4. **IDE is launched** automatically (if available)
|
|
112
117
|
5. **Development server starts** (for Node.js projects)
|
|
113
118
|
|
|
114
|
-
If a directory with the same name exists,
|
|
115
|
-
|
|
116
|
-
## 🎉 Why GG?
|
|
117
|
-
|
|
118
|
-
- **Fast**: Skip the manual git clone, cd, install dance
|
|
119
|
-
- **Smart**: Automatically detects what kind of project you're working with
|
|
120
|
-
- **Convenient**: Opens your IDE and starts development servers automatically
|
|
121
|
-
- **Reliable**: Handles edge cases like directory conflicts and missing dependencies
|
|
119
|
+
If a directory with the same name exists, GG automatically appends a number (e.g., `react-2`, `react-3`).
|