@rigsmith/clauderig 1.0.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/clauderig.js +27 -0
- package/package.json +21 -0
package/bin/clauderig.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict'
|
|
3
|
+
const { spawnSync } = require('node:child_process')
|
|
4
|
+
const path = require('node:path')
|
|
5
|
+
|
|
6
|
+
function binaryPath() {
|
|
7
|
+
const os = process.platform // darwin | linux | win32
|
|
8
|
+
const arch = process.arch // x64 | arm64
|
|
9
|
+
const exe = 'clauderig' + (os === 'win32' ? '.exe' : '')
|
|
10
|
+
let pkgJson
|
|
11
|
+
try {
|
|
12
|
+
pkgJson = require.resolve('@rigsmith/clauderig-' + os + '-' + arch + '/package.json')
|
|
13
|
+
} catch {
|
|
14
|
+
throw new Error(
|
|
15
|
+
'clauderig: no prebuilt binary for ' + os + '-' + arch + '. ' +
|
|
16
|
+
"Install from https://rigsmith.dev or 'go install github.com/rigsmith/rigsmith/cmd/clauderig@latest'."
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
return path.join(path.dirname(pkgJson), 'bin', exe)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const res = spawnSync(binaryPath(), process.argv.slice(2), { stdio: 'inherit' })
|
|
23
|
+
if (res.error) {
|
|
24
|
+
console.error(String(res.error.message || res.error))
|
|
25
|
+
process.exit(1)
|
|
26
|
+
}
|
|
27
|
+
process.exit(res.status === null ? 1 : res.status)
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rigsmith/clauderig",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Sync your Claude Code setup across machines, path-correct on restore",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://rigsmith.dev",
|
|
7
|
+
"bin": {
|
|
8
|
+
"clauderig": "bin/clauderig.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin"
|
|
12
|
+
],
|
|
13
|
+
"optionalDependencies": {
|
|
14
|
+
"@rigsmith/clauderig-darwin-arm64": "1.0.0",
|
|
15
|
+
"@rigsmith/clauderig-darwin-x64": "1.0.0",
|
|
16
|
+
"@rigsmith/clauderig-linux-arm64": "1.0.0",
|
|
17
|
+
"@rigsmith/clauderig-linux-x64": "1.0.0",
|
|
18
|
+
"@rigsmith/clauderig-win32-arm64": "1.0.0",
|
|
19
|
+
"@rigsmith/clauderig-win32-x64": "1.0.0"
|
|
20
|
+
}
|
|
21
|
+
}
|