opencode-cloud 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/LICENSE +21 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/package.json +52 -0
- package/src/index.ts +55 -0
- package/tsconfig.json +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Peter Ryszkiewicz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* opencode-cloud Node.js CLI
|
|
4
|
+
*
|
|
5
|
+
* This is a thin wrapper that calls into the Rust core library via NAPI bindings.
|
|
6
|
+
* The heavy lifting is done in Rust - this just provides npm/npx distribution.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* opencode-cloud Node.js CLI
|
|
4
|
+
*
|
|
5
|
+
* This is a thin wrapper that calls into the Rust core library via NAPI bindings.
|
|
6
|
+
* The heavy lifting is done in Rust - this just provides npm/npx distribution.
|
|
7
|
+
*/
|
|
8
|
+
import { getVersionJs } from "@opencode-cloud/core";
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
function printHelp() {
|
|
11
|
+
console.log(`
|
|
12
|
+
opencode-cloud - Manage your opencode cloud service
|
|
13
|
+
|
|
14
|
+
USAGE:
|
|
15
|
+
opencode-cloud [OPTIONS] [COMMAND]
|
|
16
|
+
|
|
17
|
+
OPTIONS:
|
|
18
|
+
-V, --version Print version information
|
|
19
|
+
-h, --help Print help information
|
|
20
|
+
|
|
21
|
+
COMMANDS:
|
|
22
|
+
(none yet - real commands coming in future phases)
|
|
23
|
+
|
|
24
|
+
For more information, see: https://github.com/pRizz/opencode-cloud
|
|
25
|
+
`);
|
|
26
|
+
}
|
|
27
|
+
function printVersion() {
|
|
28
|
+
const version = getVersionJs();
|
|
29
|
+
console.log(version);
|
|
30
|
+
}
|
|
31
|
+
function main() {
|
|
32
|
+
// Handle --version / -V
|
|
33
|
+
if (args.includes("--version") || args.includes("-V")) {
|
|
34
|
+
printVersion();
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
37
|
+
// Handle --help / -h
|
|
38
|
+
if (args.includes("--help") || args.includes("-h") || args.length === 0) {
|
|
39
|
+
printHelp();
|
|
40
|
+
process.exit(0);
|
|
41
|
+
}
|
|
42
|
+
// Unknown command
|
|
43
|
+
console.error(`Unknown command: ${args.join(" ")}`);
|
|
44
|
+
console.error('Run "opencode-cloud --help" for usage information.');
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
main();
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;CAcb,CAAC,CAAC;AACH,CAAC;AAED,SAAS,YAAY;IACnB,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAC/B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACvB,CAAC;AAED,SAAS,IAAI;IACX,wBAAwB;IACxB,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACtD,YAAY,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,qBAAqB;IACrB,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxE,SAAS,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,kBAAkB;IAClB,OAAO,CAAC,KAAK,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpD,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opencode-cloud",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CLI for managing opencode as a persistent cloud service",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "pRizz",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/pRizz/opencode-cloud.git",
|
|
11
|
+
"directory": "packages/cli-node"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/pRizz/opencode-cloud",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/pRizz/opencode-cloud/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"opencode",
|
|
19
|
+
"ai",
|
|
20
|
+
"cloud",
|
|
21
|
+
"docker",
|
|
22
|
+
"cli",
|
|
23
|
+
"service"
|
|
24
|
+
],
|
|
25
|
+
"bin": {
|
|
26
|
+
"opencode-cloud": "./dist/index.js",
|
|
27
|
+
"occ": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=20.0.0"
|
|
31
|
+
},
|
|
32
|
+
"os": [
|
|
33
|
+
"darwin",
|
|
34
|
+
"linux"
|
|
35
|
+
],
|
|
36
|
+
"cpu": [
|
|
37
|
+
"x64",
|
|
38
|
+
"arm64"
|
|
39
|
+
],
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@opencode-cloud/core": "0.1.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"typescript": "^5.7.3",
|
|
45
|
+
"@types/node": "^22.10.7"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsc",
|
|
49
|
+
"start": "node dist/index.js",
|
|
50
|
+
"postinstall": "npm run build"
|
|
51
|
+
}
|
|
52
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* opencode-cloud Node.js CLI
|
|
4
|
+
*
|
|
5
|
+
* This is a thin wrapper that calls into the Rust core library via NAPI bindings.
|
|
6
|
+
* The heavy lifting is done in Rust - this just provides npm/npx distribution.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { getVersionJs } from "@opencode-cloud/core";
|
|
10
|
+
|
|
11
|
+
const args = process.argv.slice(2);
|
|
12
|
+
|
|
13
|
+
function printHelp(): void {
|
|
14
|
+
console.log(`
|
|
15
|
+
opencode-cloud - Manage your opencode cloud service
|
|
16
|
+
|
|
17
|
+
USAGE:
|
|
18
|
+
opencode-cloud [OPTIONS] [COMMAND]
|
|
19
|
+
|
|
20
|
+
OPTIONS:
|
|
21
|
+
-V, --version Print version information
|
|
22
|
+
-h, --help Print help information
|
|
23
|
+
|
|
24
|
+
COMMANDS:
|
|
25
|
+
(none yet - real commands coming in future phases)
|
|
26
|
+
|
|
27
|
+
For more information, see: https://github.com/pRizz/opencode-cloud
|
|
28
|
+
`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function printVersion(): void {
|
|
32
|
+
const version = getVersionJs();
|
|
33
|
+
console.log(version);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function main(): void {
|
|
37
|
+
// Handle --version / -V
|
|
38
|
+
if (args.includes("--version") || args.includes("-V")) {
|
|
39
|
+
printVersion();
|
|
40
|
+
process.exit(0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Handle --help / -h
|
|
44
|
+
if (args.includes("--help") || args.includes("-h") || args.length === 0) {
|
|
45
|
+
printHelp();
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Unknown command
|
|
50
|
+
console.error(`Unknown command: ${args.join(" ")}`);
|
|
51
|
+
console.error('Run "opencode-cloud --help" for usage information.');
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
main();
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"declaration": true,
|
|
13
|
+
"declarationMap": true,
|
|
14
|
+
"sourceMap": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["src/**/*"],
|
|
17
|
+
"exclude": ["node_modules", "dist"]
|
|
18
|
+
}
|