aipctl 0.0.0-seed.0 → 2026.6.2
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 +60 -0
- package/binary.cjs +39 -0
- package/build/index.cjs +100071 -0
- package/docs/api-contract-inventory.md +91 -0
- package/docs/architecture.md +75 -0
- package/docs/desktop-cli-go-coding-guidelines.md +22 -0
- package/package.json +28 -5
- package/platforms.json +8 -0
- package/main.cjs +0 -3
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# aipctl
|
|
2
|
+
|
|
3
|
+
`aipctl`은 Duplo AIP API command와 기존 MCP native command를 하나로 통합한 CLI입니다.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js 24.18.0+
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g aipctl
|
|
13
|
+
npx aipctl --help
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## AIP setup
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
aipctl config set --app-url https://app.example.com
|
|
20
|
+
aipctl auth login
|
|
21
|
+
aipctl org list
|
|
22
|
+
aipctl org select
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
설정과 credentials 경로는 기존 `~/.config/aip`를 유지합니다.
|
|
26
|
+
|
|
27
|
+
## MCP native commands
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
aipctl install <presetName> <presetId> --key <apiKey>
|
|
31
|
+
aipctl run <config>
|
|
32
|
+
aipctl tunnel link <token>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`install`, `run`, `tunnel`, `logs`는 Go native binary로 lazy dispatch됩니다. `prod` build에서는 `logs` command가 help와 command tree에서 제외됩니다.
|
|
36
|
+
|
|
37
|
+
## Development
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
cd desktop
|
|
41
|
+
pnpm install
|
|
42
|
+
pnpm run cli:typecheck
|
|
43
|
+
pnpm run cli:lint
|
|
44
|
+
pnpm run cli:test:ts
|
|
45
|
+
pnpm run cli:test:wrapper
|
|
46
|
+
pnpm run cli:test:go
|
|
47
|
+
pnpm run cli:help:check
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Local run:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
mise run desktop:cli:local -- --help
|
|
54
|
+
mise run desktop:cli:local -- auth --help
|
|
55
|
+
mise run desktop:cli:local -- run --help
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Architecture
|
|
59
|
+
|
|
60
|
+
자세한 구조는 [`docs/architecture.md`](./docs/architecture.md)를 봅니다.
|
package/binary.cjs
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// 플랫폼에 맞는 Go 바이너리 경로를 해석한다.
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
|
|
7
|
+
const platforms = require("./platforms.json");
|
|
8
|
+
|
|
9
|
+
const PLATFORMS = {};
|
|
10
|
+
for (const p of platforms) {
|
|
11
|
+
PLATFORMS[`${p.os}-${p.cpu}`] = p.npm;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function resolveBinaryPackage(platform, arch) {
|
|
15
|
+
const key = `${platform}-${arch}`;
|
|
16
|
+
const pkg = PLATFORMS[key];
|
|
17
|
+
if (!pkg) {
|
|
18
|
+
throw new Error(
|
|
19
|
+
`Unsupported platform: ${key}. Supported: ${Object.keys(PLATFORMS).join(", ")}`,
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
return pkg;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function resolveBinaryPath(platform, arch) {
|
|
26
|
+
const pkg = resolveBinaryPackage(platform, arch);
|
|
27
|
+
const binName = platform === "win32" ? "aipctl.exe" : "aipctl";
|
|
28
|
+
const binPath = path.join(
|
|
29
|
+
path.dirname(require.resolve(`${pkg}/package.json`)),
|
|
30
|
+
"bin",
|
|
31
|
+
binName,
|
|
32
|
+
);
|
|
33
|
+
if (!fs.existsSync(binPath)) {
|
|
34
|
+
throw new Error(`Binary not found: ${binPath}. Try reinstalling the package.`);
|
|
35
|
+
}
|
|
36
|
+
return binPath;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = { resolveBinaryPackage, resolveBinaryPath, PLATFORMS };
|