@minato-aqukin/autodl-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/LICENSE +21 -0
- package/README.md +415 -0
- package/README.zh-CN.md +383 -0
- package/dist/app-4E2WPQ3C.js +36151 -0
- package/dist/chunk-2TWWLI3Y.js +134 -0
- package/dist/chunk-5RZ4Q7T4.js +1458 -0
- package/dist/chunk-6QR4ZYQR.js +1432 -0
- package/dist/chunk-CWCG3MOC.js +433 -0
- package/dist/chunk-NBWWTYSL.js +46 -0
- package/dist/cli.js +1058 -0
- package/dist/index.d.ts +948 -0
- package/dist/index.js +188 -0
- package/dist/ink-devtools-QXLFHNC2.js +4 -0
- package/dist/tui-AARJCHRA.js +16 -0
- package/package.json +89 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __nodeCreateRequire } from "node:module";
|
|
3
|
+
const require = __nodeCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
assertBudget,
|
|
6
|
+
buildServer,
|
|
7
|
+
connectInteractive,
|
|
8
|
+
deployWorkflow,
|
|
9
|
+
formatSSHCommand,
|
|
10
|
+
listPrivateImages,
|
|
11
|
+
parseRepo,
|
|
12
|
+
parseUtilisation,
|
|
13
|
+
pull,
|
|
14
|
+
push,
|
|
15
|
+
redactCredentials,
|
|
16
|
+
resolveGitToken,
|
|
17
|
+
resolveMinBalance,
|
|
18
|
+
runWorkflow,
|
|
19
|
+
saveImage,
|
|
20
|
+
startMcpServer,
|
|
21
|
+
watchIdle,
|
|
22
|
+
withCredentials
|
|
23
|
+
} from "./chunk-5RZ4Q7T4.js";
|
|
24
|
+
import {
|
|
25
|
+
BASE_IMAGES,
|
|
26
|
+
DEFAULT_BASE_IMAGE,
|
|
27
|
+
GPU_SPECS,
|
|
28
|
+
REGIONS,
|
|
29
|
+
VERSION,
|
|
30
|
+
assertStockRegion,
|
|
31
|
+
chooseRegions,
|
|
32
|
+
findBaseImage,
|
|
33
|
+
findRegionsWithStock,
|
|
34
|
+
formatCudaVersion,
|
|
35
|
+
getBalance,
|
|
36
|
+
getRegionGpuStock,
|
|
37
|
+
getStockByRegion,
|
|
38
|
+
parseCudaVersion,
|
|
39
|
+
resolveGpuSpec,
|
|
40
|
+
resolveRegion,
|
|
41
|
+
setNfsMount,
|
|
42
|
+
specForStockName
|
|
43
|
+
} from "./chunk-CWCG3MOC.js";
|
|
44
|
+
import {
|
|
45
|
+
createContext
|
|
46
|
+
} from "./chunk-NBWWTYSL.js";
|
|
47
|
+
import {
|
|
48
|
+
AuthError,
|
|
49
|
+
AutoDLClient,
|
|
50
|
+
AutoDLError,
|
|
51
|
+
BudgetError,
|
|
52
|
+
DEFAULT_BASE_URL,
|
|
53
|
+
ExitCode,
|
|
54
|
+
NoStockError,
|
|
55
|
+
NotFoundError,
|
|
56
|
+
SSHError,
|
|
57
|
+
TimeoutError,
|
|
58
|
+
UsageError,
|
|
59
|
+
armTTLOverSSH,
|
|
60
|
+
buildTTLSnippet,
|
|
61
|
+
composeStartCommand,
|
|
62
|
+
createInstance,
|
|
63
|
+
disarmTTLOverSSH,
|
|
64
|
+
estimateCost,
|
|
65
|
+
execCommand,
|
|
66
|
+
execOnConnection,
|
|
67
|
+
findInstance,
|
|
68
|
+
formatDuration,
|
|
69
|
+
formatRate,
|
|
70
|
+
formatYuan,
|
|
71
|
+
getCredentials,
|
|
72
|
+
getInstanceSnapshot,
|
|
73
|
+
getInstanceStatus,
|
|
74
|
+
listAllInstances,
|
|
75
|
+
listInstancesPage,
|
|
76
|
+
milliToYuan,
|
|
77
|
+
normalizeBalance,
|
|
78
|
+
normalizeInstance,
|
|
79
|
+
normalizeSnapshot,
|
|
80
|
+
parseDuration,
|
|
81
|
+
powerOffInstance,
|
|
82
|
+
powerOnInstance,
|
|
83
|
+
readConfig,
|
|
84
|
+
recordTTL,
|
|
85
|
+
redactSnapshot,
|
|
86
|
+
redactToken,
|
|
87
|
+
releaseInstance,
|
|
88
|
+
resolveToken,
|
|
89
|
+
sweepExpired,
|
|
90
|
+
toAutoDLError,
|
|
91
|
+
updateConfig,
|
|
92
|
+
waitForRunning,
|
|
93
|
+
waitForShutdown,
|
|
94
|
+
waitForStatus,
|
|
95
|
+
withSSH,
|
|
96
|
+
writeConfig,
|
|
97
|
+
yuanToMilli
|
|
98
|
+
} from "./chunk-6QR4ZYQR.js";
|
|
99
|
+
export {
|
|
100
|
+
AuthError,
|
|
101
|
+
AutoDLClient,
|
|
102
|
+
AutoDLError,
|
|
103
|
+
BASE_IMAGES,
|
|
104
|
+
BudgetError,
|
|
105
|
+
DEFAULT_BASE_IMAGE,
|
|
106
|
+
DEFAULT_BASE_URL,
|
|
107
|
+
ExitCode,
|
|
108
|
+
GPU_SPECS,
|
|
109
|
+
NoStockError,
|
|
110
|
+
NotFoundError,
|
|
111
|
+
REGIONS,
|
|
112
|
+
SSHError,
|
|
113
|
+
TimeoutError,
|
|
114
|
+
UsageError,
|
|
115
|
+
VERSION,
|
|
116
|
+
armTTLOverSSH,
|
|
117
|
+
assertBudget,
|
|
118
|
+
assertStockRegion,
|
|
119
|
+
buildServer,
|
|
120
|
+
buildTTLSnippet,
|
|
121
|
+
chooseRegions,
|
|
122
|
+
composeStartCommand,
|
|
123
|
+
connectInteractive,
|
|
124
|
+
createContext,
|
|
125
|
+
createInstance,
|
|
126
|
+
deployWorkflow,
|
|
127
|
+
disarmTTLOverSSH,
|
|
128
|
+
estimateCost,
|
|
129
|
+
execCommand,
|
|
130
|
+
execOnConnection,
|
|
131
|
+
findBaseImage,
|
|
132
|
+
findInstance,
|
|
133
|
+
findRegionsWithStock,
|
|
134
|
+
formatCudaVersion,
|
|
135
|
+
formatDuration,
|
|
136
|
+
formatRate,
|
|
137
|
+
formatSSHCommand,
|
|
138
|
+
formatYuan,
|
|
139
|
+
getBalance,
|
|
140
|
+
getCredentials,
|
|
141
|
+
getInstanceSnapshot,
|
|
142
|
+
getInstanceStatus,
|
|
143
|
+
getRegionGpuStock,
|
|
144
|
+
getStockByRegion,
|
|
145
|
+
listAllInstances,
|
|
146
|
+
listInstancesPage,
|
|
147
|
+
listPrivateImages,
|
|
148
|
+
milliToYuan,
|
|
149
|
+
normalizeBalance,
|
|
150
|
+
normalizeInstance,
|
|
151
|
+
normalizeSnapshot,
|
|
152
|
+
parseCudaVersion,
|
|
153
|
+
parseDuration,
|
|
154
|
+
parseRepo,
|
|
155
|
+
parseUtilisation,
|
|
156
|
+
powerOffInstance,
|
|
157
|
+
powerOnInstance,
|
|
158
|
+
pull,
|
|
159
|
+
push,
|
|
160
|
+
readConfig,
|
|
161
|
+
recordTTL,
|
|
162
|
+
redactCredentials,
|
|
163
|
+
redactSnapshot,
|
|
164
|
+
redactToken,
|
|
165
|
+
releaseInstance,
|
|
166
|
+
resolveGitToken,
|
|
167
|
+
resolveGpuSpec,
|
|
168
|
+
resolveMinBalance,
|
|
169
|
+
resolveRegion,
|
|
170
|
+
resolveToken,
|
|
171
|
+
runWorkflow,
|
|
172
|
+
saveImage,
|
|
173
|
+
setNfsMount,
|
|
174
|
+
specForStockName,
|
|
175
|
+
startMcpServer,
|
|
176
|
+
sweepExpired,
|
|
177
|
+
toAutoDLError,
|
|
178
|
+
updateConfig,
|
|
179
|
+
waitForRunning,
|
|
180
|
+
waitForShutdown,
|
|
181
|
+
waitForStatus,
|
|
182
|
+
watchIdle,
|
|
183
|
+
withCredentials,
|
|
184
|
+
withSSH,
|
|
185
|
+
writeConfig,
|
|
186
|
+
yuanToMilli
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __nodeCreateRequire } from "node:module";
|
|
3
|
+
const require = __nodeCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
assertInteractive,
|
|
6
|
+
launchTui,
|
|
7
|
+
registerTuiCommand
|
|
8
|
+
} from "./chunk-2TWWLI3Y.js";
|
|
9
|
+
import "./chunk-NBWWTYSL.js";
|
|
10
|
+
import "./chunk-6QR4ZYQR.js";
|
|
11
|
+
export {
|
|
12
|
+
assertInteractive,
|
|
13
|
+
launchTui,
|
|
14
|
+
registerTuiCommand
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=tui-AARJCHRA.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@minato-aqukin/autodl-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Agent-friendly CLI, MCP server and SDK for managing AutoDL GPU instances — create, boot, SSH, run and auto-shutdown, all scriptable.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"autodl",
|
|
7
|
+
"gpu",
|
|
8
|
+
"cloud",
|
|
9
|
+
"cli",
|
|
10
|
+
"ssh",
|
|
11
|
+
"mcp",
|
|
12
|
+
"agent",
|
|
13
|
+
"llm",
|
|
14
|
+
"claude",
|
|
15
|
+
"model-context-protocol"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "Minato-Aqukin",
|
|
19
|
+
"homepage": "https://github.com/Minato-Aqukin/AutoDL-cli#readme",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/Minato-Aqukin/AutoDL-cli.git"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/Minato-Aqukin/AutoDL-cli/issues"
|
|
26
|
+
},
|
|
27
|
+
"type": "module",
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=22"
|
|
30
|
+
},
|
|
31
|
+
"bin": {
|
|
32
|
+
"autodl": "dist/cli.js"
|
|
33
|
+
},
|
|
34
|
+
"main": "./dist/index.js",
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"import": "./dist/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"!dist/**/*.map",
|
|
46
|
+
"README.md",
|
|
47
|
+
"README.zh-CN.md",
|
|
48
|
+
"LICENSE"
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup",
|
|
52
|
+
"dev": "tsup --watch",
|
|
53
|
+
"typecheck": "tsc --noEmit",
|
|
54
|
+
"lint": "biome check src tests",
|
|
55
|
+
"lint:fix": "biome check --write src tests",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"test:watch": "vitest",
|
|
58
|
+
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
59
|
+
"prepublishOnly": "npm run build",
|
|
60
|
+
"release": "changeset publish",
|
|
61
|
+
"pretest": "npm run build"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@clack/prompts": "^0.11.0",
|
|
65
|
+
"@modelcontextprotocol/sdk": "^1.20.0",
|
|
66
|
+
"cli-table3": "^0.6.5",
|
|
67
|
+
"commander": "^14.0.0",
|
|
68
|
+
"ink": "^7.1.1",
|
|
69
|
+
"picocolors": "^1.1.1",
|
|
70
|
+
"react": "^19.2.8",
|
|
71
|
+
"ssh2": "^1.17.0",
|
|
72
|
+
"zod": "^3.25.76"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@biomejs/biome": "^2.3.0",
|
|
76
|
+
"@changesets/changelog-github": "^1.0.0",
|
|
77
|
+
"@changesets/cli": "^2.29.0",
|
|
78
|
+
"@types/node": "^22.15.0",
|
|
79
|
+
"@types/react": "^19.2.18",
|
|
80
|
+
"@types/ssh2": "^1.15.5",
|
|
81
|
+
"ink-testing-library": "^4.0.0",
|
|
82
|
+
"tsup": "^8.5.0",
|
|
83
|
+
"typescript": "^5.9.0",
|
|
84
|
+
"vitest": "^3.2.0"
|
|
85
|
+
},
|
|
86
|
+
"allowScripts": {
|
|
87
|
+
"esbuild@0.27.7": true
|
|
88
|
+
}
|
|
89
|
+
}
|