@bifos/nhncloud-cli 0.14.0 → 0.16.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/README.md CHANGED
@@ -25,7 +25,9 @@ npm install -g @bifos/nhncloud-cli
25
25
  ```
26
26
 
27
27
  `nhncloud configure` 가 profile 과 서비스별 자격증명을 대화형으로 받는다.
28
- 공통 UAK, Log & Crash appkey, iaas 자격증명, NCR appkey, NCS appkey 순으로 입력한다.
28
+ 공통 UAK, Log & Crash appkey, iaas 자격증명, NCR appkey, NCS appkey, Deploy appkey 순으로 입력한다.
29
+ appkey 는 명령 옵션으로 지정할 수 없고 profile 에만 둔다.
30
+ 여러 프로젝트를 다루려면 profile 을 나눠 `--profile` 로 전환한다.
29
31
  저장 전 연결 테스트를 자동으로 수행한다 (`--no-verify` 로 생략).
30
32
 
31
33
  ```bash
@@ -50,6 +52,7 @@ CI·자동화는 flag 로 비대화형 설정한다. 비밀번호는 환경변
50
52
  NHNCLOUD_IAAS_PASSWORD=<api-password> nhncloud configure \
51
53
  --uak-id <uak-id> --uak-secret <uak-secret> \
52
54
  --logncrash-appkey <appkey> \
55
+ [--deploy-appkey <appkey>] [--ncr-appkey <appkey>] [--ncs-appkey <appkey>] \
53
56
  --iaas-tenant-id <tenant-id> --iaas-username <iam-username> --iaas-region kr1 \
54
57
  --no-verify
55
58
  ```
@@ -61,7 +64,8 @@ nhncloud skills install
61
64
  nhncloud skills status
62
65
  ```
63
66
 
64
- 전역 설치 없이 `npx --yes @bifos/nhncloud-cli@latest skills install` 로도 설치된다 — 관리 저장소에 복사되므로 임시 패키지 경로가 사라져도 남는다.
67
+ 전역 설치 없이 `npx --yes @bifos/nhncloud-cli@latest skills install` 로도 설치된다.
68
+ 관리 저장소에 복사되므로 임시 패키지 경로가 사라져도 남는다.
65
69
  CLI 를 새 버전으로 올린 뒤에는 `nhncloud skills update` 를 실행해야 스킬도 갱신된다.
66
70
 
67
71
  상태는 `current`, `missing`, `outdated`, `broken`, `unmanaged`, `modified`, `corrupt` 중 하나이고, 출력에 딸린 복구 명령을 따르면 된다.
@@ -100,14 +104,16 @@ nhncloud loadbalancer list # 로드밸런서
100
104
  nhncloud ncr list # 컨테이너 레지스트리
101
105
  nhncloud nks cluster list # Kubernetes 클러스터
102
106
  nhncloud deploy artifacts # 배포 아티팩트
107
+ nhncloud logncrash available-token # 남은 조회 토큰과 추정 대기 시간
103
108
  nhncloud logncrash search --query '*' --from 1h --to now # 최근 1시간 로그
109
+ nhncloud logncrash export --query '<lucene>' --from 1h --to now --output logs.jsonl # 대량 로그 파일 저장
104
110
  nhncloud apigateway service list # API Gateway 서비스
105
111
  nhncloud apigateway stage update <service-id> <stage-id> --description "설명" --yes # API Gateway 스테이지 수정
106
112
  nhncloud apigateway stage import-resources <service-id> <stage-id> --yes # 리소스를 스테이지로 반영
107
113
  nhncloud apigateway stage deploy create <service-id> <stage-id> --yes # API Gateway 스테이지 배포
108
114
  ```
109
115
 
110
- 전체 명령과 옵션은 `--help` 로 본다. 현재 170개다.
116
+ 전체 명령과 옵션은 `--help` 로 본다.
111
117
 
112
118
  ```bash
113
119
  nhncloud --help
@@ -127,7 +133,7 @@ nhncloud commands --json | jq '.commands[] | select(.path=="nks cluster list")'
127
133
  | --- | --- | --- |
128
134
  | (없음) | 사람이 읽는 표 | 터미널 |
129
135
  | `--json` | JSON | 파싱, 명령 연결 |
130
- | `--quiet` | 식별자만 | 스크립트 |
136
+ | `--quiet` | 명령이 문서화한 핵심 값 한 줄 | 스크립트 |
131
137
 
132
138
  전역 옵션이라 모든 명령에 붙일 수 있다. `--no-color` 와 `--request-timeout <sec>` 도 같은 자리에서 쓴다.
133
139
  요청 타임아웃은 초 단위이며 기본값은 30초, 허용 범위는 1~3600초다.
@@ -139,6 +145,7 @@ nhncloud commands --json | jq '.commands[] | select(.path=="nks cluster list")'
139
145
 
140
146
  ```bash
141
147
  nhncloud instance get <instance-id> --json | jq -r '.status'
148
+ nhncloud logncrash available-token --json | jq -r '.availableToken'
142
149
  nhncloud logncrash search --query '*' --from 1h --to now --json | jq -r '.data[].logBody'
143
150
  ```
144
151
 
@@ -175,8 +182,8 @@ src/
175
182
  utils/ 에러, 스피너, 종료 코드
176
183
  ```
177
184
 
178
- 의존 방향은 `commands/` → `services/` → `api/` 이고, `utils/` 와 `formatters/` 는 그 아래에서 공유한다.
179
- `services/` 가 `commands/` 를 import 하지 않는다 — 역류는 금지다.
185
+ `commands/`는 `services/`, `api/`, `config/`의 기능을 조합한다.
186
+ `services/`가 `commands/`를 import하지 않는 경계와 상세 의존 방향은 `docs/code-architecture.md`를 기준으로 삼는다.
180
187
 
181
188
  | 문서 | 담는 것 |
182
189
  | --- | --- |
@@ -184,8 +191,8 @@ src/
184
191
  | [docs/flow.md](docs/flow.md) | 사용자 흐름 |
185
192
  | [docs/code-architecture.md](docs/code-architecture.md) | 디렉터리 트리, 레이어, 경계 |
186
193
  | [docs/data-schema.md](docs/data-schema.md) | 자격증명과 캐시 스키마 |
187
- | [docs/adr/INDEX.md](docs/adr/INDEX.md) | 기술 의사결정 기록 (27건) |
188
- | [docs/pitfalls/INDEX.md](docs/pitfalls/INDEX.md) | 반복해서 발견된 회피 패턴 (104건) |
194
+ | [docs/adr/INDEX.md](docs/adr/INDEX.md) | 기술 의사결정 기록 |
195
+ | [docs/pitfalls/INDEX.md](docs/pitfalls/INDEX.md) | 반복해서 발견된 회피 패턴 |
189
196
 
190
197
  ## 기여하기
191
198
 
@@ -222,7 +229,7 @@ HTTP 호출은 `ky` 만 쓰고, 사용자 오류는 `NhnCloudCliError` 와 `src/
222
229
  데이터는 stdout, 진행 상황·경고·오류는 stderr 로 분리한다.
223
230
 
224
231
  NHN Cloud API 가 문서와 다르거나 직관에 반하면 [docs/adr/](docs/adr/) 에 기록한다.
225
- 엔드포인트 버전 이중 prefix 나 200 응답 속 `isSuccessful: false` 처럼, 모르고 접근하면 다시 막히는 것들이 이미 27건 쌓여 있다.
232
+ 엔드포인트 버전 이중 prefix 나 200 응답 속 `isSuccessful: false`처럼 직관에 반하는 동작은 관련 ADR과 반복 함정 문서에서 확인한다.
226
233
 
227
234
  ### PR 을 낼 때
228
235