@ingit/cli 0.1.0-bootstrap.0
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 +33 -0
- package/bin/ingit.cjs +31 -0
- package/package.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# ingit
|
|
2
|
+
|
|
3
|
+
Local git history & graph viewer that runs in your browser.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install -g @ingit/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
No runtime dependencies — the binary is self-contained (the Bun runtime is
|
|
12
|
+
embedded). Prebuilt binaries are provided for linux (x64/arm64) and macOS
|
|
13
|
+
(x64/arm64).
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
ingit # scan the current folder for repos, open the UI
|
|
19
|
+
ingit ~/code # scan a specific folder
|
|
20
|
+
ingit -p 9000 # use a specific preferred port
|
|
21
|
+
ingit --no-open # don't open the browser automatically
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| Option | Description |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `[path]` | Folder to open (defaults to the current directory). Its child folders are scanned for git repositories. |
|
|
27
|
+
| `-p, --port <n>` | Preferred port (default `8488`; next free port if taken). |
|
|
28
|
+
| `--host <h>` | Host to bind (default `127.0.0.1`). |
|
|
29
|
+
| `--no-open` | Don't open the browser automatically. |
|
|
30
|
+
| `-v, --version` | Print version. |
|
|
31
|
+
| `-h, --help` | Show help. |
|
|
32
|
+
|
|
33
|
+
`git` must be installed and on your `PATH`.
|
package/bin/ingit.cjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict'
|
|
3
|
+
|
|
4
|
+
// Launcher for the `ingit` CLI. The actual program is a self-contained,
|
|
5
|
+
// prebuilt binary shipped in a per-platform optional dependency. This shim
|
|
6
|
+
// resolves the binary that matches the current OS/arch and execs it.
|
|
7
|
+
|
|
8
|
+
const { spawnSync } = require('node:child_process')
|
|
9
|
+
|
|
10
|
+
const platform = process.platform
|
|
11
|
+
const arch = process.arch
|
|
12
|
+
const pkgName = `@ingit/cli-${platform}-${arch}`
|
|
13
|
+
|
|
14
|
+
let binPath
|
|
15
|
+
try {
|
|
16
|
+
binPath = require.resolve(`${pkgName}/ingit`)
|
|
17
|
+
} catch {
|
|
18
|
+
console.error(`ingit: no prebuilt binary available for ${platform}-${arch}.`)
|
|
19
|
+
console.error(`Expected the optional dependency "${pkgName}" to be installed.`)
|
|
20
|
+
console.error('Supported: linux-x64, linux-arm64, darwin-x64, darwin-arm64.')
|
|
21
|
+
process.exit(1)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' })
|
|
25
|
+
|
|
26
|
+
if (result.error) {
|
|
27
|
+
console.error(`ingit: failed to launch binary: ${result.error.message}`)
|
|
28
|
+
process.exit(1)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
process.exit(result.status === null ? 1 : result.status)
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ingit/cli",
|
|
3
|
+
"version": "0.1.0-bootstrap.0",
|
|
4
|
+
"description": "Local git history & graph viewer in your browser",
|
|
5
|
+
"bin": {
|
|
6
|
+
"ingit": "bin/ingit.cjs"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"optionalDependencies": {
|
|
13
|
+
"@ingit/cli-linux-x64": "0.1.0-bootstrap.0",
|
|
14
|
+
"@ingit/cli-linux-arm64": "0.1.0-bootstrap.0",
|
|
15
|
+
"@ingit/cli-darwin-x64": "0.1.0-bootstrap.0",
|
|
16
|
+
"@ingit/cli-darwin-arm64": "0.1.0-bootstrap.0"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/capaj/ingit-vibe.git"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public",
|
|
28
|
+
"registry": "https://registry.npmjs.org/"
|
|
29
|
+
}
|
|
30
|
+
}
|