git0 0.2.3 → 0.2.5
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 +27 -0
- package/docs/CNAME +1 -0
- package/docs/Footer/index.html +27 -0
- package/docs/assets/css/styles.3dd00f8d.css +1 -0
- package/docs/assets/js/17896441.79ceefeb.js +1 -0
- package/docs/assets/js/1df93b7f.dfdf0ef3.js +2 -0
- package/docs/assets/js/1df93b7f.dfdf0ef3.js.LICENSE.txt +6 -0
- package/docs/assets/js/22dd74f7.5e857962.js +1 -0
- package/docs/assets/js/237.daf7efdf.js +1 -0
- package/docs/assets/js/278.1628756c.js +1 -0
- package/docs/assets/js/4a829dc8.728a4445.js +1 -0
- package/docs/assets/js/577.78325c02.js +1 -0
- package/docs/assets/js/591.2156b33d.js +2 -0
- package/docs/assets/js/591.2156b33d.js.LICENSE.txt +61 -0
- package/docs/assets/js/5e95c892.bd6c1093.js +1 -0
- package/docs/assets/js/a7456010.3054873b.js +1 -0
- package/docs/assets/js/a7bd4aaa.87229397.js +1 -0
- package/docs/assets/js/a94703ab.6d39a596.js +1 -0
- package/docs/assets/js/aba21aa0.dfebd789.js +1 -0
- package/docs/assets/js/ac46717f.32345167.js +2 -0
- package/docs/assets/js/ac46717f.32345167.js.LICENSE.txt +6 -0
- package/docs/assets/js/c3a618e1.50a89e4d.js +1 -0
- package/docs/assets/js/d140250a.62af53aa.js +1 -0
- package/docs/assets/js/main.c71c09a5.js +2 -0
- package/docs/assets/js/main.c71c09a5.js.LICENSE.txt +68 -0
- package/docs/assets/js/runtime~main.ef55418f.js +1 -0
- package/docs/functions/globals/index.html +57 -0
- package/docs/functions/index.html +74 -0
- package/docs/index.html +27 -0
- package/docs/lunr-index-1749601667754.json +1 -0
- package/docs/lunr-index.json +1 -0
- package/docs/search-doc-1749601667754.json +1 -0
- package/docs/search-doc.json +1 -0
- package/docs/sitemap.xml +1 -0
- package/docs-config/config/customize-docs.js +29 -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 +350 -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 +127 -0
- package/docs-config/src/pages/Footer.tsx +67 -0
- package/docs-config/src/pages/index.tsx +424 -0
- package/docs-config/static/CNAME +1 -0
- package/docs-config/tailwind.config.js +13 -0
- package/docs-config/tsconfig.json +27 -0
- package/git0.js +6 -6
- package/package.json +15 -15
- package/readme.md +37 -38
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.5",
|
|
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
|
@@ -6,30 +6,39 @@
|
|
|
6
6
|
<img src="https://img.shields.io/discord/1110227955554209923.svg?label=Chat&logo=Discord&colorB=7289da&style=flat"
|
|
7
7
|
alt="Join Discord" />
|
|
8
8
|
</a>
|
|
9
|
-
<a href="https://github.com/vtempest/
|
|
10
|
-
<img alt="GitHub Stars" src="https://img.shields.io/github/stars/vtempest/
|
|
11
|
-
<a href="https://github.com/vtempest/
|
|
9
|
+
<a href="https://github.com/vtempest/git0/discussions">
|
|
10
|
+
<img alt="GitHub Stars" src="https://img.shields.io/github/stars/vtempest/git0" /></a>
|
|
11
|
+
<a href="https://github.com/vtempest/git0/discussions">
|
|
12
12
|
<img alt="GitHub Discussions"
|
|
13
|
-
src="https://img.shields.io/github/discussions/vtempest/
|
|
13
|
+
src="https://img.shields.io/github/discussions/vtempest/git0" />
|
|
14
14
|
</a>
|
|
15
|
-
<a href="https://github.com/vtempest/
|
|
16
|
-
<img src="https://img.shields.io/github/commit-activity/m/vtempest/
|
|
15
|
+
<a href="https://github.com/vtempest/git0/pulse" alt="Activity">
|
|
16
|
+
<img src="https://img.shields.io/github/commit-activity/m/vtempest/git0" />
|
|
17
17
|
</a>
|
|
18
|
-
<img src="https://img.shields.io/github/last-commit/vtempest/
|
|
18
|
+
<img src="https://img.shields.io/github/last-commit/vtempest/git0.svg?style=flat-square" alt="GitHub last commit" />
|
|
19
19
|
</p>
|
|
20
20
|
<p align="center">
|
|
21
21
|
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square"
|
|
22
22
|
alt="PRs Welcome" />
|
|
23
|
-
<a href="https://codespaces.new/vtempest/
|
|
23
|
+
<a href="https://codespaces.new/vtempest/git0">
|
|
24
24
|
<img src="https://github.com/codespaces/badge.svg" width="150" height="20" />
|
|
25
25
|
</a>
|
|
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
|
|
@@ -48,30 +57,25 @@ instantly set up GitHub repositories with automatic dependency installation and
|
|
|
48
57
|
|
|
49
58
|
## 🎯 Usage
|
|
50
59
|
|
|
51
|
-
|
|
52
|
-
### Search and Download
|
|
53
60
|
```bash
|
|
54
|
-
# install in bun or node
|
|
55
|
-
npm i -g git0
|
|
56
|
-
bun i -g git0
|
|
57
|
-
|
|
58
61
|
# Search for repositories by name
|
|
59
62
|
gg react starter
|
|
60
63
|
|
|
61
64
|
# Direct download from GitHub URL
|
|
65
|
+
## gg and git0 both work
|
|
62
66
|
gg https://github.com/facebook/react
|
|
63
67
|
|
|
64
68
|
# Download using owner/repo shorthand
|
|
65
|
-
|
|
66
|
-
git0 facebook/react
|
|
69
|
+
git0 react starter
|
|
67
70
|
|
|
68
|
-
## Use without installing
|
|
69
|
-
|
|
71
|
+
## Use git0 without installing, (only node needed)
|
|
72
|
+
# (copy into your project's readme for quick setup)
|
|
73
|
+
npx git0 facebook/react
|
|
70
74
|
```
|
|
71
75
|
|
|
72
76
|
### Supported Project Types
|
|
73
77
|
|
|
74
|
-
|
|
78
|
+
git0 automatically detects and sets up the following project types:
|
|
75
79
|
|
|
76
80
|
| Project Type | Detection | Installation |
|
|
77
81
|
|-------------|-----------|-------------|
|
|
@@ -83,7 +87,7 @@ npx git0 react starter
|
|
|
83
87
|
|
|
84
88
|
### Supported IDEs
|
|
85
89
|
|
|
86
|
-
|
|
90
|
+
git0 automatically detects and opens projects in your preferred IDE:
|
|
87
91
|
|
|
88
92
|
- **Cursor** (`cursor`)
|
|
89
93
|
- **Windsurf** (`windsurf`)
|
|
@@ -93,15 +97,7 @@ npx git0 react starter
|
|
|
93
97
|
|
|
94
98
|
## 🔧 Configuration
|
|
95
99
|
|
|
96
|
-
### GitHub Token (Optional)
|
|
97
100
|
|
|
98
|
-
For higher API rate limits, set [your GitHub token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token):
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
export GITHUB_TOKEN=your_github_token_here
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Without a token, you're limited to 60 requests per hour. With a token, you get 5,000 requests per hour.
|
|
105
101
|
|
|
106
102
|
### What Happens After Download
|
|
107
103
|
|
|
@@ -111,11 +107,14 @@ Without a token, you're limited to 60 requests per hour. With a token, you get 5
|
|
|
111
107
|
4. **IDE is launched** automatically (if available)
|
|
112
108
|
5. **Development server starts** (for Node.js projects)
|
|
113
109
|
|
|
114
|
-
If a directory with the same name exists,
|
|
110
|
+
If a directory with the same name exists, git0 automatically appends a number (e.g., `react-2`, `react-3`).
|
|
111
|
+
|
|
112
|
+
### GitHub Token (Optional)
|
|
113
|
+
|
|
114
|
+
For higher API rate limits, set [your GitHub token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token):
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
```bash
|
|
117
|
+
export GITHUB_TOKEN=your_github_token_here
|
|
118
|
+
```
|
|
117
119
|
|
|
118
|
-
|
|
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
|
|
120
|
+
Without a token, you're limited to 60 requests per hour. With a token, you get 5,000 requests per hour.
|