gitrunbykaru 1.0.0 → 1.0.2
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/README.md +5 -5
- package/bin/gitrunbykaru.js +1 -1
- package/gitrun_architecture.svg +3 -3
- package/package.json +1 -1
- package/src/clone.js +1 -1
- package/src/logger.js +1 -1
- package/src/runner.js +2 -2
- package/src/strategies/python.js +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Run any GitHub repository locally in seconds — no setup, no friction.
|
|
|
6
6
|
gitrunbykaru https://github.com/user/repo
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
That's it.
|
|
9
|
+
That's it. gitrunbykaru clones the repo, detects what kind of project it is, installs dependencies, and runs it. You get a `localhost` link.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -51,9 +51,9 @@ gitrunbykaru https://github.com/user/repo --keep
|
|
|
51
51
|
|
|
52
52
|
## 🔥 Magic Features (Why it's smart)
|
|
53
53
|
|
|
54
|
-
- **Auto-Environment Mocking:** If a repo requires a `.env` file but only provides a `.env.example` or `.env.sample`,
|
|
55
|
-
- **Interactive Fallback:** If a repository is too weird to auto-detect,
|
|
56
|
-
- **Auto-Downloads Missing Tools:** If a repo strictly uses `yarn`, `pnpm`, or `bun`, but you don't have them installed globally,
|
|
54
|
+
- **Auto-Environment Mocking:** If a repo requires a `.env` file but only provides a `.env.example` or `.env.sample`, gitrunbykaru automatically clones it and injects dummy keys so the app doesn't crash on startup!
|
|
55
|
+
- **Interactive Fallback:** If a repository is too weird to auto-detect, gitrunbykaru won't just crash. It pauses and gives you an interactive menu to manually type the run command.
|
|
56
|
+
- **Auto-Downloads Missing Tools:** If a repo strictly uses `yarn`, `pnpm`, or `bun`, but you don't have them installed globally, gitrunbykaru will automatically fetch them securely via `npx` just for that run.
|
|
57
57
|
- **Windows Path Fixes:** Bypasses legacy Windows 8.3 short-path bugs so strict bundlers like Vite and React never crash.
|
|
58
58
|
|
|
59
59
|
---
|
|
@@ -61,7 +61,7 @@ gitrunbykaru https://github.com/user/repo --keep
|
|
|
61
61
|
## Philosophy
|
|
62
62
|
|
|
63
63
|
- **Speed over perfection** — works for 80% of repos without any config
|
|
64
|
-
- **Zero effort** — you provide the URL,
|
|
64
|
+
- **Zero effort** — you provide the URL, gitrunbykaru handles everything else
|
|
65
65
|
- **Local first** — runs on your machine, no cloud, no auth
|
|
66
66
|
- **Opinionated** — makes decisions for you so you don't have to
|
|
67
67
|
|
package/bin/gitrunbykaru.js
CHANGED
package/gitrun_architecture.svg
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<svg width="100%" viewBox="0 0 680 620" role="img" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<title style="fill:rgb(0, 0, 0);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:"Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">
|
|
3
|
-
<desc style="fill:rgb(0, 0, 0);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:"Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">Flowchart showing
|
|
2
|
+
<title style="fill:rgb(0, 0, 0);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:"Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">gitrunbykarubykaru architecture and execution flow</title>
|
|
3
|
+
<desc style="fill:rgb(0, 0, 0);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:"Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">Flowchart showing gitrunbykarubykaru CLI pipeline: input → clone → detect → strategy → install → run → output</desc>
|
|
4
4
|
<defs>
|
|
5
5
|
<marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
|
|
6
6
|
<path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<!-- Entry -->
|
|
11
11
|
<g style="fill:rgb(0, 0, 0);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:"Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">
|
|
12
12
|
<rect x="220" y="20" width="240" height="44" rx="8" stroke-width="0.5" style="fill:rgb(68, 68, 65);stroke:rgb(180, 178, 169);color:rgb(255, 255, 255);stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:"Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
|
|
13
|
-
<text x="340" y="42" text-anchor="middle" dominant-baseline="central" style="fill:rgb(211, 209, 199);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:"Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-size:14px;font-weight:500;text-anchor:middle;dominant-baseline:central">
|
|
13
|
+
<text x="340" y="42" text-anchor="middle" dominant-baseline="central" style="fill:rgb(211, 209, 199);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:"Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-size:14px;font-weight:500;text-anchor:middle;dominant-baseline:central">gitrunbykarubykaru <repo_url></text>
|
|
14
14
|
</g>
|
|
15
15
|
|
|
16
16
|
<line x1="340" y1="64" x2="340" y2="94" marker-end="url(#arrow)" style="fill:none;stroke:rgb(156, 154, 146);color:rgb(255, 255, 255);stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:"Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
|
package/package.json
CHANGED
package/src/clone.js
CHANGED
|
@@ -16,7 +16,7 @@ export async function cloneRepo(url) {
|
|
|
16
16
|
const repoName = url.split('/').slice(-2).join('-').replace(/[^a-zA-Z0-9-_]/g, '');
|
|
17
17
|
const tmpBase = tmpdir();
|
|
18
18
|
// Create temp dir and immediately resolve it to its real absolute path (fixes Windows 8.3 short path bugs with Vite/React)
|
|
19
|
-
let tmpDir = mkdtempSync(join(tmpBase, `
|
|
19
|
+
let tmpDir = mkdtempSync(join(tmpBase, `gitrunbykaru-${repoName}-`));
|
|
20
20
|
if (process.platform === 'win32') {
|
|
21
21
|
tmpDir = realpathSync.native(tmpDir);
|
|
22
22
|
} else {
|
package/src/logger.js
CHANGED
|
@@ -35,7 +35,7 @@ export function createSpinner(text) {
|
|
|
35
35
|
export function printBanner() {
|
|
36
36
|
console.log('');
|
|
37
37
|
console.log(
|
|
38
|
-
chalk.bold.magenta('
|
|
38
|
+
chalk.bold.magenta(' gitrunbykarubykaru') +
|
|
39
39
|
chalk.gray(' by karu') +
|
|
40
40
|
chalk.dim(' — run any GitHub repo in seconds')
|
|
41
41
|
);
|
package/src/runner.js
CHANGED
|
@@ -31,7 +31,7 @@ export async function spawnProject(dir, detection, strategy, options = {}) {
|
|
|
31
31
|
// If no '=', it might just be listed in the example without a value
|
|
32
32
|
if (splitIdx === -1) {
|
|
33
33
|
const key = trimmed;
|
|
34
|
-
let val = '
|
|
34
|
+
let val = 'gitrunbykaru_dummy_key_12345';
|
|
35
35
|
if (key.toUpperCase().includes('URL') || key.toUpperCase().includes('URI') || key.toUpperCase().includes('ENDPOINT')) {
|
|
36
36
|
val = 'http://localhost:9999';
|
|
37
37
|
}
|
|
@@ -46,7 +46,7 @@ export async function spawnProject(dir, detection, strategy, options = {}) {
|
|
|
46
46
|
if (key.toUpperCase().includes('URL') || key.toUpperCase().includes('URI') || key.toUpperCase().includes('ENDPOINT')) {
|
|
47
47
|
val = 'http://localhost:9999';
|
|
48
48
|
} else {
|
|
49
|
-
val = '
|
|
49
|
+
val = 'gitrunbykaru_dummy_key_12345';
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
return `${key}=${val}`;
|
package/src/strategies/python.js
CHANGED
|
@@ -23,7 +23,7 @@ export const pythonStrategy = {
|
|
|
23
23
|
|
|
24
24
|
try {
|
|
25
25
|
// Create a venv to avoid polluting global Python
|
|
26
|
-
const venvDir = join(dir, '.
|
|
26
|
+
const venvDir = join(dir, '.gitrunbykarubykaru-venv');
|
|
27
27
|
if (!existsSync(venvDir)) {
|
|
28
28
|
execSync(`${pyBin} -m venv "${venvDir}"`, { cwd: dir, stdio: 'pipe' });
|
|
29
29
|
}
|