@dodo-planet/cli 0.1.4

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 ADDED
@@ -0,0 +1,90 @@
1
+ # @dodo-planet/cli
2
+
3
+ Dodo Planet 가족 여행 데이터에 터미널에서 접근하는 CLI.
4
+
5
+ ## 설치
6
+
7
+ ```bash
8
+ npm install -g @dodo-planet/cli
9
+ ```
10
+
11
+ ## 인증
12
+
13
+ 1. https://www.dodoplanet.space 로그인 → 설정 → **개발자 토큰**에서 PAT 발급
14
+ 2. 평문 토큰을 한 번만 표시하므로 즉시 복사
15
+ 3. CLI에 등록:
16
+
17
+ ```bash
18
+ dodo auth login --token dodo_pat_<your_token>
19
+ # 또는 환경변수
20
+ export DODO_TOKEN=dodo_pat_<your_token>
21
+ ```
22
+
23
+ ## 자주 쓰는 명령
24
+
25
+ ```bash
26
+ dodo trip list # 내 여행 목록
27
+ dodo trip switch "스페인 2026" # 활성 trip 전환
28
+ dodo expense list # 활성 trip의 경비
29
+ dodo expense add --amount 30000 --currency KRW \
30
+ --description "점심" --type shared
31
+ dodo flight search --from ICN --to BCN --date 2026-01-10
32
+ dodo chat "오늘 일정 알려줘" # AI 챗 (single-shot)
33
+ dodo chat # AI 챗 (멀티턴 REPL)
34
+ ```
35
+
36
+ ## 출력 모드
37
+
38
+ ```bash
39
+ dodo trip list --output json # 스크립트용
40
+ dodo trip list # TTY면 표, 파이프면 JSON 자동
41
+ dodo config set output json # 영구 기본값
42
+ NO_COLOR=1 dodo trip list # 색상 끄기
43
+ ```
44
+
45
+ ## 자동완성
46
+
47
+ ```bash
48
+ dodo completion bash >> ~/.bash_completion
49
+ dodo completion zsh > ~/.config/dodo/_dodo # fpath 추가 또는
50
+ echo 'eval "$(dodo completion zsh)"' >> ~/.zshrc
51
+ dodo completion fish > ~/.config/fish/completions/dodo.fish
52
+ ```
53
+
54
+ ## 명령 트리 (21개 카테고리, 43개 함수 매핑)
55
+
56
+ - `auth` — login/logout/whoami/tokens
57
+ - `config` — get/set/path
58
+ - `trip` — list/current/switch/create
59
+ - `expense` — list/add/update/delete
60
+ - `booking` — list/add/update/delete
61
+ - `itinerary` — show/add/remove/reorder
62
+ - `feed` — list/post/delete
63
+ - `baby` — list/info/add/update/status/note/delete
64
+ - `flight` / `hotel` / `activity` / `transfer` — search
65
+ - `place` — search/search-text/details
66
+ - `directions` / `weather` / `flight-status` / `web` — single
67
+ - `family` / `friend` / `invite`
68
+ - `chat` — AI 자연어 (서버 SSE 프록시)
69
+ - `raw <function_name> --data '{...}'` — escape hatch
70
+
71
+ `dodo <command> --help` 로 자세한 인자 확인.
72
+
73
+ ## Exit code
74
+
75
+ | 코드 | 의미 |
76
+ |------|------|
77
+ | 0 | 정상 |
78
+ | 1 | 일반 오류 |
79
+ | 2 | 잘못된 인자 |
80
+ | 3 | 네트워크/서버 오류 |
81
+ | 4 | 인증 실패 |
82
+ | 5 | 권한 없음 |
83
+ | 6 | confirm 누락 (destructive 명령) |
84
+
85
+ ## 환경변수
86
+
87
+ - `DODO_TOKEN` — PAT (credentials 파일 무시)
88
+ - `DODO_API_URL` — API 엔드포인트 (기본 https://www.dodoplanet.space)
89
+ - `DODO_CONFIG_HOME` — 설정 디렉토리 (기본 `~/.config/dodo`)
90
+ - `NO_COLOR` / `CI` — 색상 비활성화
package/bin/dodo.mjs ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import("../dist/index.js").then((mod) => mod.run()).catch((err) => {
3
+ console.error(err?.stack || err?.message || err);
4
+ process.exit(1);
5
+ });