@ait-co/console-cli 0.1.37 → 0.1.39
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.en.md +38 -29
- package/README.md +38 -29
- package/dist/cli.mjs +138 -371
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -45,7 +45,7 @@ aitcc --version # print the embedded version
|
|
|
45
45
|
aitcc login # interactive: prompts email/password/save target, then signs in
|
|
46
46
|
aitcc login --interactive # force the visible-browser flow (skip headless)
|
|
47
47
|
aitcc logout # delete the local session file
|
|
48
|
-
aitcc logout --purge # also delete saved
|
|
48
|
+
aitcc logout --purge # also delete saved credentials (replaces `auth clear`)
|
|
49
49
|
aitcc whoami # show the currently logged-in user + credential source
|
|
50
50
|
aitcc whoami --offline # use the cached identity without hitting the API
|
|
51
51
|
aitcc whoami --json # machine-readable output for scripts and agents
|
|
@@ -62,7 +62,7 @@ printf '%s' "$AITCC_PASSWORD" | aitcc login --email you@example.com --password-s
|
|
|
62
62
|
AITCC_EMAIL=you@example.com AITCC_PASSWORD=… aitcc login --json
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
Add `--save
|
|
65
|
+
Add `--save file` to persist the credentials to `~/.config/aitcc/credentials.json` so the next `aitcc login` runs without prompting.
|
|
66
66
|
|
|
67
67
|
`aitcc upgrade` respects `GITHUB_TOKEN` to avoid anonymous GitHub API rate limits.
|
|
68
68
|
|
|
@@ -105,7 +105,7 @@ aitcc app status # works with no flags — context comes from aitcc.yaml
|
|
|
105
105
|
|
|
106
106
|
### Login details
|
|
107
107
|
|
|
108
|
-
`aitcc login` resolves credentials from (in order) explicit `--email` + `--password` / `--password-stdin` flags, the `AITCC_EMAIL` + `AITCC_PASSWORD` environment, the
|
|
108
|
+
`aitcc login` resolves credentials from (in order) explicit `--email` + `--password` / `--password-stdin` flags, the `AITCC_EMAIL` + `AITCC_PASSWORD` environment, the file backend (`~/.config/aitcc/credentials.json`, perm 0600), or — on a TTY — an interactive prompt that asks for both fields plus where to save them. It then launches a Chrome-family browser via the Chrome DevTools Protocol, drives the sign-in headlessly when credentials are available, and waits for the main frame to reach the post-login workspace page. Once it does, the CLI dumps all cookies over CDP (including `HttpOnly` auth cookies that JavaScript can't see) and persists them to the local session file. The browser runs against a temporary, isolated `--user-data-dir` that is wiped on exit, so your everyday browser profile is never touched.
|
|
109
109
|
|
|
110
110
|
Pass `--interactive` to force the visible-browser flow even when credentials are configured (useful for switching accounts or working around step-up auth). The legacy `aitcc auth set` / `auth clear` / `auth status` commands still work but emit a deprecation warning — prefer `aitcc login` (interactive prompt offers a save option), `aitcc logout --purge`, and `aitcc whoami` instead. They will be removed in 1.0.
|
|
111
111
|
|
|
@@ -113,40 +113,27 @@ The CLI looks for Chrome in the standard OS install locations (Google Chrome, Ch
|
|
|
113
113
|
|
|
114
114
|
## Using aitcc in SSH / headless environments
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
**Option 1 — Export / import the session (recommended, requires a KR IP)**
|
|
119
|
-
|
|
120
|
-
Export the session on a desktop GUI Mac and inject it into the SSH environment:
|
|
116
|
+
Credentials are stored in `~/.config/aitcc/credentials.json` (perm 0600) and work the same way in SSH and GUI-less server environments. Plain-text storage is the same trade-off made by `gh`, `aws-cli`, and `gcloud`; disk encryption (FileVault, LUKS) is recommended.
|
|
121
117
|
|
|
122
118
|
```sh
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
# In the SSH environment:
|
|
127
|
-
AITCC_SESSION='...' aitcc app deploy ./bundle.ait --json
|
|
119
|
+
aitcc login --save=file --email you@example.com --password-stdin
|
|
120
|
+
# → stored in ~/.config/aitcc/credentials.json (perm 0600)
|
|
121
|
+
# subsequent aitcc login runs in SSH will read this file and sign in headlessly
|
|
128
122
|
```
|
|
129
123
|
|
|
130
|
-
|
|
124
|
+
Override the path with the `AITCC_CREDENTIAL_FILE` environment variable.
|
|
131
125
|
|
|
132
|
-
|
|
126
|
+
**Session export / import (requires a KR IP)**
|
|
133
127
|
|
|
134
|
-
|
|
135
|
-
security unlock-keychain ~/Library/Keychains/login.keychain-db
|
|
136
|
-
# (enter login password when prompted)
|
|
137
|
-
aitcc login --save keychain --email you@example.com --password-stdin
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**Option 3 — File backend**
|
|
141
|
-
|
|
142
|
-
Store credentials in a plain file instead of the keychain. Assumes a single-user machine; FileVault (full-disk encryption) is strongly recommended:
|
|
128
|
+
You can also export a session from a desktop machine and inject it into the SSH environment:
|
|
143
129
|
|
|
144
130
|
```sh
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
```
|
|
131
|
+
# On a desktop that is already logged in:
|
|
132
|
+
aitcc auth export --format env # outputs: AITCC_SESSION=...
|
|
148
133
|
|
|
149
|
-
|
|
134
|
+
# In the SSH environment:
|
|
135
|
+
AITCC_SESSION='...' aitcc app deploy ./bundle.ait --json
|
|
136
|
+
```
|
|
150
137
|
|
|
151
138
|
## Session storage
|
|
152
139
|
|
|
@@ -157,7 +144,7 @@ The local session lives at an XDG-compliant path with file mode `0600`:
|
|
|
157
144
|
|
|
158
145
|
The containing directory is created with mode `0700`. Cookies captured during login are **never** printed, logged, or attached to `--verbose` output — only `user.email`, `name`, and workspace summary surface through `whoami`.
|
|
159
146
|
|
|
160
|
-
See [CLAUDE.md](./CLAUDE.md) for the rationale behind using a plain `0600` file
|
|
147
|
+
See [CLAUDE.md](./CLAUDE.md) for the design rationale behind using a plain `0600` file.
|
|
161
148
|
|
|
162
149
|
## Continuous integration
|
|
163
150
|
|
|
@@ -236,6 +223,28 @@ The following command groups are implemented end-to-end:
|
|
|
236
223
|
|
|
237
224
|
`app logs` is deferred until the backend endpoint is available. See the [organization landing page](https://aitc.dev/) for the full roadmap.
|
|
238
225
|
|
|
226
|
+
## Issuing a Deploy Key
|
|
227
|
+
|
|
228
|
+
Issue a workspace-scoped credential (Deploy Key) for deploy automation:
|
|
229
|
+
|
|
230
|
+
```sh
|
|
231
|
+
aitcc keys create --name ci-deploy
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
The key is automatically saved to `~/.ait/credentials` under the `ci-deploy` profile as soon as it is issued — no separate `ait token add` step required:
|
|
235
|
+
|
|
236
|
+
```sh
|
|
237
|
+
ait deploy --profile ci-deploy ./bundle.ait
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Only the plaintext key is written to stdout (pipe-friendly). stderr confirms which profile was saved. If you are piping the key into an external secret manager and do not need a local profile, pass `--no-save-profile`:
|
|
241
|
+
|
|
242
|
+
```sh
|
|
243
|
+
aitcc keys create --name ci-deploy --no-save-profile | secret-tool store --label=… key password
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
To save the profile under a different name than `--name`, pass `--save-profile <other-name>`. The plaintext key is exposed once at issuance and cannot be retrieved later — if you lose it, revoke it with `aitcc keys revoke <id>` and issue a new one.
|
|
247
|
+
|
|
239
248
|
## Pre-commit hook
|
|
240
249
|
|
|
241
250
|
Optional but recommended. After cloning, activate the standard pre-commit hook (runs `biome check` on staged files):
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ aitcc --version # 임베드된 버전 출력
|
|
|
45
45
|
aitcc login # 인터랙티브: 이메일/비밀번호/저장 위치를 묻고 로그인
|
|
46
46
|
aitcc login --interactive # headless 대신 visible-browser 강제
|
|
47
47
|
aitcc logout # 로컬 세션 파일 삭제
|
|
48
|
-
aitcc logout --purge # 저장된
|
|
48
|
+
aitcc logout --purge # 저장된 자격증명도 함께 삭제 (`auth clear` 대체)
|
|
49
49
|
aitcc whoami # 현재 로그인된 사용자 + 자격증명 출처 표시
|
|
50
50
|
aitcc whoami --offline # API 호출 없이 캐시된 identity 사용
|
|
51
51
|
aitcc whoami --json # 스크립트·에이전트용 machine-readable 출력
|
|
@@ -62,7 +62,7 @@ printf '%s' "$AITCC_PASSWORD" | aitcc login --email you@example.com --password-s
|
|
|
62
62
|
AITCC_EMAIL=you@example.com AITCC_PASSWORD=… aitcc login --json
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
`--save
|
|
65
|
+
`--save file`을 붙이면 자격증명이 `~/.config/aitcc/credentials.json`에 저장돼 다음 `aitcc login`이 prompt 없이 실행됩니다.
|
|
66
66
|
|
|
67
67
|
`aitcc upgrade`는 GitHub API anonymous rate limit을 피하려고 `GITHUB_TOKEN`을 존중합니다.
|
|
68
68
|
|
|
@@ -105,7 +105,7 @@ aitcc app status # 플래그 없이 동작 — aitcc.yaml에서 컨텍
|
|
|
105
105
|
|
|
106
106
|
### 로그인 동작
|
|
107
107
|
|
|
108
|
-
`aitcc login`은 자격증명을 다음 순서로 찾습니다: `--email` + `--password` / `--password-stdin` 플래그 → `AITCC_EMAIL` + `AITCC_PASSWORD` 환경 변수 →
|
|
108
|
+
`aitcc login`은 자격증명을 다음 순서로 찾습니다: `--email` + `--password` / `--password-stdin` 플래그 → `AITCC_EMAIL` + `AITCC_PASSWORD` 환경 변수 → 파일 backend(`~/.config/aitcc/credentials.json`) → (TTY 환경에서만) 인터랙티브 prompt. 자격증명을 확보하면 Chrome DevTools Protocol로 Chrome 계열 브라우저를 띄워 가능하면 headless로 로그인을 진행하고, main frame이 로그인 후 workspace 페이지에 도달할 때까지 기다립니다. 도달하면 CDP로 모든 쿠키(JS로는 못 보는 `HttpOnly` 인증 쿠키 포함)를 덤프해 로컬 세션 파일에 저장합니다. 브라우저는 종료 시 삭제되는 임시 `--user-data-dir`에서 실행되므로 일상 브라우저 프로필은 절대 건드리지 않습니다.
|
|
109
109
|
|
|
110
110
|
자격증명이 설정돼 있어도 visible-browser flow를 강제하려면 `--interactive`를 사용합니다 (계정 전환, step-up 인증 우회). 레거시 `aitcc auth set` / `auth clear` / `auth status`는 여전히 동작하지만 deprecation 경고를 emit합니다 — `aitcc login`(인터랙티브 prompt가 저장 옵션 제공), `aitcc logout --purge`, `aitcc whoami`를 사용하세요. 1.0에서 제거됩니다.
|
|
111
111
|
|
|
@@ -113,40 +113,27 @@ CLI는 OS 표준 위치(Google Chrome, Chromium, Microsoft Edge)에서 Chrome을
|
|
|
113
113
|
|
|
114
114
|
## SSH / headless 환경에서 로그인
|
|
115
115
|
|
|
116
|
-
SSH 원격 세션이나 GUI가 없는
|
|
117
|
-
|
|
118
|
-
**방법 1 — 세션 export/import (권장, KR IP 필요)**
|
|
119
|
-
|
|
120
|
-
Desktop GUI Mac에서 세션을 export해 SSH 환경에 주입합니다:
|
|
116
|
+
SSH 원격 세션이나 GUI가 없는 서버에서도 자격증명 저장이 동작합니다. 자격증명은 `~/.config/aitcc/credentials.json` (perm 0600)에 저장되며 SSH/CI 환경에서도 동일하게 작동합니다. 평문 저장이므로 디스크 암호화(FileVault, LUKS) 사용을 권장합니다.
|
|
121
117
|
|
|
122
118
|
```sh
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
# SSH 환경에서:
|
|
127
|
-
AITCC_SESSION='...' aitcc app deploy ./bundle.ait --json
|
|
119
|
+
aitcc login --save=file --email you@example.com --password-stdin
|
|
120
|
+
# → ~/.config/aitcc/credentials.json (perm 0600)에 저장
|
|
121
|
+
# 이후 SSH 환경에서 aitcc login이 이 파일을 읽어 headless 로그인을 진행합니다.
|
|
128
122
|
```
|
|
129
123
|
|
|
130
|
-
|
|
124
|
+
경로를 바꾸려면 `AITCC_CREDENTIAL_FILE` env var를 지정합니다.
|
|
131
125
|
|
|
132
|
-
|
|
126
|
+
**세션 export/import (KR IP 필요)**
|
|
133
127
|
|
|
134
|
-
|
|
135
|
-
security unlock-keychain ~/Library/Keychains/login.keychain-db
|
|
136
|
-
# (login 비밀번호 입력)
|
|
137
|
-
aitcc login --save keychain --email you@example.com --password-stdin
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**방법 3 — 파일 backend**
|
|
141
|
-
|
|
142
|
-
Keychain 대신 평문 파일에 자격증명을 저장합니다. 단일 사용자 머신 전제이며 FileVault(디스크 암호화) 사용을 권장합니다:
|
|
128
|
+
Desktop에서 세션을 export해 SSH 환경에 주입하는 방법도 있습니다:
|
|
143
129
|
|
|
144
130
|
```sh
|
|
145
|
-
|
|
146
|
-
# →
|
|
147
|
-
```
|
|
131
|
+
# Desktop (이미 로그인된 상태):
|
|
132
|
+
aitcc auth export --format env # → AITCC_SESSION=... 출력
|
|
148
133
|
|
|
149
|
-
|
|
134
|
+
# SSH 환경에서:
|
|
135
|
+
AITCC_SESSION='...' aitcc app deploy ./bundle.ait --json
|
|
136
|
+
```
|
|
150
137
|
|
|
151
138
|
## 세션 저장
|
|
152
139
|
|
|
@@ -157,7 +144,7 @@ aitcc login --save=file --email you@example.com --password-stdin
|
|
|
157
144
|
|
|
158
145
|
상위 디렉토리는 mode `0700`으로 생성됩니다. 로그인 중 캡처된 쿠키는 **절대** 출력·로깅되지 않으며 `--verbose`에도 노출되지 않습니다 — `whoami`로 노출되는 건 `user.email`, `name`, workspace 요약뿐입니다.
|
|
159
146
|
|
|
160
|
-
|
|
147
|
+
plain `0600` 파일을 쓰는 설계 이유는 [CLAUDE.md](./CLAUDE.md) 참조.
|
|
161
148
|
|
|
162
149
|
## CI/CD 통합
|
|
163
150
|
|
|
@@ -236,6 +223,28 @@ aitcc telemetry tier0-on # Tier 0 다시 활성화
|
|
|
236
223
|
|
|
237
224
|
`app logs`는 백엔드 endpoint 확보 후 구현 예정입니다. 전체 로드맵은 [organization landing page](https://aitc.dev/) 참조.
|
|
238
225
|
|
|
226
|
+
## Deploy Key 발급
|
|
227
|
+
|
|
228
|
+
배포 자동화를 위한 워크스페이스-scope 자격증명(Deploy Key)을 발급합니다.
|
|
229
|
+
|
|
230
|
+
```sh
|
|
231
|
+
aitcc keys create --name ci-deploy
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
키 발급 즉시 `~/.ait/credentials`에 `ci-deploy` 프로파일로 저장되므로, 별도 `ait token add` 단계 없이 바로 사용할 수 있습니다:
|
|
235
|
+
|
|
236
|
+
```sh
|
|
237
|
+
ait deploy --profile ci-deploy ./bundle.ait
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
stdout에는 plaintext 키 한 줄만 나옵니다 (파이프 친화적). stderr는 저장된 프로파일 이름을 확인해줍니다. CI 파이프에서 키를 외부 secret manager에 직접 주입할 때처럼 로컬 저장이 필요 없다면 `--no-save-profile`로 저장을 건너뜁니다:
|
|
241
|
+
|
|
242
|
+
```sh
|
|
243
|
+
aitcc keys create --name ci-deploy --no-save-profile | secret-tool store --label=… key password
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
프로파일 이름을 `--name`과 다르게 지정하려면 `--save-profile <other-name>`을 사용합니다. plaintext 키는 발급 시 한 번만 노출되며 목록 endpoint에서 다시 확인할 수 없습니다 — 분실 시 `aitcc keys revoke <id>`로 무효화하고 재발급합니다.
|
|
247
|
+
|
|
239
248
|
## Pre-commit hook
|
|
240
249
|
|
|
241
250
|
선택 사항이지만 권장합니다. clone 후 표준 pre-commit hook을 활성화하면 staged 파일에 `biome check`가 자동으로 돕니다 (push 전 빠른 피드백):
|