@repome/cli 0.1.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/bin/repome.js +47 -0
- package/package.json +43 -0
package/bin/repome.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Thin Node shim. The real entry is a Bun-compiled binary that ships in a
|
|
3
|
+
// per-platform optional dependency package (@repome/cli-darwin-arm64 et al);
|
|
4
|
+
// npm picks the right one at install time based on the host `os`/`cpu`
|
|
5
|
+
// fields. We resolve the binary path through Node's module resolver so
|
|
6
|
+
// pnpm / yarn / npm hoisting all work the same way.
|
|
7
|
+
import { spawnSync } from 'node:child_process'
|
|
8
|
+
import { createRequire } from 'node:module'
|
|
9
|
+
|
|
10
|
+
const require = createRequire(import.meta.url)
|
|
11
|
+
|
|
12
|
+
const PLATFORM_MAP = {
|
|
13
|
+
'darwin-arm64': '@repome/cli-darwin-arm64/bin/repome',
|
|
14
|
+
'linux-x64': '@repome/cli-linux-x64/bin/repome',
|
|
15
|
+
'linux-arm64': '@repome/cli-linux-arm64/bin/repome',
|
|
16
|
+
'win32-x64': '@repome/cli-win-x64/bin/repome.exe',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const key = `${process.platform}-${process.arch}`
|
|
20
|
+
const target = PLATFORM_MAP[key]
|
|
21
|
+
if (!target) {
|
|
22
|
+
console.error(`@repome/cli has no binary for ${key}.`)
|
|
23
|
+
console.error('Supported: ' + Object.keys(PLATFORM_MAP).join(', '))
|
|
24
|
+
process.exit(1)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let binary
|
|
28
|
+
try {
|
|
29
|
+
binary = require.resolve(target)
|
|
30
|
+
} catch {
|
|
31
|
+
console.error(`@repome/cli could not find the binary for ${key}.`)
|
|
32
|
+
console.error(
|
|
33
|
+
'This usually means npm skipped optionalDependencies (e.g. --no-optional, --omit=optional,',
|
|
34
|
+
)
|
|
35
|
+
console.error(
|
|
36
|
+
'a corporate proxy that blocks the platform package). Reinstall with optionals enabled, or',
|
|
37
|
+
)
|
|
38
|
+
console.error('use the install.sh fallback: curl -fsSL https://api.repome.sh/install.sh | sh')
|
|
39
|
+
process.exit(1)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const { status, error } = spawnSync(binary, process.argv.slice(2), { stdio: 'inherit' })
|
|
43
|
+
if (error) {
|
|
44
|
+
console.error(`@repome/cli failed to spawn ${binary}:`, error.message)
|
|
45
|
+
process.exit(1)
|
|
46
|
+
}
|
|
47
|
+
process.exit(status ?? 0)
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@repome/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Agent-native, GitHub-shaped forge — CLI + TUI (single binary distributed per platform).",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"repome",
|
|
7
|
+
"git",
|
|
8
|
+
"agent",
|
|
9
|
+
"cli",
|
|
10
|
+
"tui",
|
|
11
|
+
"forge"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://repome.sh",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/grovemotorco/repome/issues"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/grovemotorco/repome.git",
|
|
20
|
+
"directory": "apps/repome"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"type": "module",
|
|
24
|
+
"bin": {
|
|
25
|
+
"repome": "bin/repome.js"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"bin",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"optionalDependencies": {
|
|
32
|
+
"@repome/cli-darwin-arm64": "0.1.0",
|
|
33
|
+
"@repome/cli-linux-x64": "0.1.0",
|
|
34
|
+
"@repome/cli-linux-arm64": "0.1.0",
|
|
35
|
+
"@repome/cli-win-x64": "0.1.0"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=24"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
}
|
|
43
|
+
}
|