명령어 레퍼런스
talkbridge <명령> [옵션]. 인증이 필요한 명령은 먼저 setup / login으로 키를 등록해야 합니다.
옵션 표기: --channel 대상 채널의 키 · --to(=--user) 대상 고객 키 · 대부분의 명령에서 --channel 은 필수입니다.
--channel 에 넣는 값은 Brand Key(채널 키)입니다. 톡브릿지 센터 개발자 모드 「연동 키 안내」 에서 확인하거나, talkbridge whoami 의 상담 가능 채널 목록에서 고릅니다. API 의 brandKey 와 같은 값입니다.
- 채널마다 키가 하나씩 있습니다. 한 브랜드에 카카오·LINE·네이버 채널을 연결했다면 키도 세 개입니다.
--channel은 CLI v1.2.0 부터 쓸 수 있습니다. 이전 이름--brand도 그대로 동작하므로, v1.1 이하 CLI 에서는--brand를 쓰면 됩니다.
전역 옵션 --json — 어느 명령에나 붙이면 사람이 읽는 텍스트 대신 한 줄 JSON 을 출력합니다(프로그램 연동용, JSON 출력 참고).
전체 명령
| 명령 | 동작 | 주요 옵션 |
|---|---|---|
setup [<키>] | 키 검증·저장 / 인자 없으면 TUI. 옵션 전체는 setup --help(부수효과 없음) | --endpoint, sink·CRM·AI 플래그, --dry-run |
login | 웹 OAuth 페어링으로 키 발급·저장 | --console, --endpoint |
whoami | 내 이름·권한·엔드포인트·상담 가능 채널(브랜드별) | — |
env | 이 실행파일의 채널·바라보는 서버·설정 경로·바이너리 경로 확인(인증 불필요) | --json → binaryPath·launcherPath |
history | 진행 중·최근 종료(24시간) 상담 이력(convId). 지난 대화 복원은 대화 이력 조회 | --channel |
rooms | 상담방 리스트 / 특정 방 메시지 | --channel(필수), --user, --max N |
send | 텍스트/리치/첨부 발송 | --channel, --to, --text, --rich-json <파일>, --file <경로>(반복 가능) |
delete | 보낸 메시지 삭제 — 발송 후 24시간 내 | --channel, --to, --serial <발신 번호> 또는 --text <본문> [--within <초>] |
profile | 발신프로필 조회 | --channel(필수) |
webhook-domain | 수신도메인 조회/설정 | get/set, --channel, --url |
chat | 채팅기능 토글 | activate/deactivate, --channel |
schedule | 상담시간 조회/설정 | get/set, --channel, --json <파일> |
block / unblock | 사용자 차단 / 해제 | --channel, --to |
end-with-bot | 종료 + 봇 전환(handoff) | --channel, --to, --event |
personal-info | 개인정보 제공 동의 요청(카카오) — 결과는 웹훅 personal_info | --channel, --to |
sysmsg | 시스템메시지 조회 | --channel(필수) |
upload | 멀티미디어 업로드 | image/file/audio/video, --channel, --file |
gateway | 아웃바운드 게이트웨이 데몬 | start/stop/restart/status → 게이트웨이 |
knowledge | 상담지식 온톨로지(그래프 RAG) → 아래 | status/install/build/search/query/view |
model | AI 모델 조회·선택 | list / set <id> |
chatbot | AI 상담 보조 대화형 TUI | (setup·model 선행) |
- 첨부 발송은 CLI
send --file(고객에게 바로 전달) 로, REST 는POST /api/agent/send/attachments로 합니다.upload는 URL 만 돌려줍니다. - 인사말만 보내고 종료(
POST /api/agent/end)는 REST 에만 있고 CLI 에는 없습니다 — CLI 는end-with-bot(종료+봇 전환)만 제공합니다. - 설정 변경 3종(
webhook-domain set,chat activate|deactivate,schedule set)은 Admin 스코프 키가 필요합니다. BrandWrite 키로는 조회만 됩니다(403 FORBIDDEN).
자주 쓰는 예시
내 정보 · 이력
talkbridge whoami
talkbridge history --channel mychannel
talkbridge rooms --channel mychannel --user Ab3d_x9Kq2Lm --max 20
whoami 는 이 키로 상담할 수 있는 채널을 브랜드별로 묶어 보여 줍니다. 가운데 열이 --channel 에 넣는 키입니다.
상담 가능 채널 (3): ← send·rooms 등의 --channel <채널키>
마이브랜드 (브랜드 mybrand-1a2b3c)
- 카카오 mychannel 상담톡 채널
- LINE ch-5d6e7f LINE 공식계정
- 네이버 ch-8a9b0c 네이버 톡톡
발신 (텍스트)
talkbridge send --channel mychannel --to Ab3d_x9Kq2Lm --text "안녕하세요"
발신 (리치)
리치 봉투 JSON 파일을 만들어 전달합니다. chat_bubble_type 는 필수이며, 발신 식별 필드는 서버가 채웁니다.
talkbridge send --channel mychannel --to Ab3d_x9Kq2Lm --rich-json rich.json
봉투 스키마와 예시 3종은 발신 API → 리치 봉투 스키마에 있습니다.
발신 (첨부)
이미지·파일을 고객에게 바로 보냅니다. 서버가 카카오에 업로드한 뒤 말풍선(이미지=리치 IMAGE, 파일=플레인 FILE)으로 조립합니다. --text 를 함께 주면 첫 말풍선에 실립니다.
talkbridge send --channel mychannel --to Ab3d_x9Kq2Lm --file ./photo.png --file ./manual.pdf --text "요청하신 자료입니다"
발신 취소(삭제)
send 결과에 표시된 발신번호(serial)로 지우거나, 번호를 모르면 보낸 본문으로 최근 발신을 찾아 지웁니다.
talkbridge delete --channel mychannel --to Ab3d_x9Kq2Lm --serial 1234567890
talkbridge delete --channel mychannel --to Ab3d_x9Kq2Lm --text "안녕하세요" --within 600
- 발송 후 24시간 안에만 삭제할 수 있습니다. 고객 채팅방에는 「메시지가 삭제되었습니다」 안내가 표시됩니다.
- 삭제해도 상담 건수는 되돌아오지 않습니다.
- 개인정보 제공 동의·카카오톡 인증 말풍선은 삭제할 수 없습니다.
--text는 본문이 정확히 일치해야 찾습니다. 못 찾으면--within(초, 10~86400)을 늘리거나--serial을 직접 지정하세요.
채널 설정
# 수신도메인
talkbridge webhook-domain set --channel mychannel --url https://hook.example.com
# 채팅기능 토글
talkbridge chat activate --channel mychannel
# 상담시간 (JSON 파일로)
talkbridge schedule set --channel mychannel --json schedule.json
고객 관리 · 핸드오프
talkbridge block --channel mychannel --to Ab3d_x9Kq2Lm
talkbridge unblock --channel mychannel --to Ab3d_x9Kq2Lm
talkbridge end-with-bot --channel mychannel --to Ab3d_x9Kq2Lm --event welcome
업로드
talkbridge upload image --channel mychannel --file photo.jpg
talkbridge upload file --channel mychannel --file manual.pdf
JSON 출력 (--json)
어느 명령에나 --json 을 붙이면 텍스트 대신 한 줄 JSON 을 stdout 으로 냅니다. 진단 메시지는 stderr 로 가고, 오류는 {"ok":false,"error":"…","code":"…"} 로 옵니다. 필드명은 REST 응답과 같은 이름(userKey·lastSeq·timestampUnixMs·kind·text …)이라, CLI 로 시작한 연동을 REST 로 옮겨도 모델이 같습니다.
talkbridge rooms --channel mychannel --json | jq '.[0].userKey'
talkbridge rooms --channel mychannel --user Ab3d_x9Kq2Lm --json # [{seq,userKey,sessionId,kind,text,timestampUnixMs}]
talkbridge history --channel mychannel --json # [{brand,conversations:[{convId,userKey,ended,count,last,lastActivity,…}]}]
talkbridge send --channel mychannel --to Ab3d_x9Kq2Lm --text "안녕하세요" --json # {"ok":true,"brandKey":…,"userKey":…,"serial":"bw-…"}
talkbridge whoami --json · env --json · gateway status --json · knowledge status --json
텍스트 모드의 시각 표기도 연도를 포함합니다(2026-09-08 10:28) — 텍스트를 파싱하던 기존 코드가 연말 경계를 추정할 필요가 없습니다.