# CLI 명령어

> Clawdbot의 모든 CLI 명령어와 사용법

---

## 📋 명령어 목록

| 명령 | 설명 | 카테고리 |
| --- | --- | --- |
| `gateway` | Gateway 데몬 제어 | 운영 |
| `agent` | 에이전트 직접 실행 | 에이전트 |
| `send` | 메시지 전송 | 채팅 |
| `onboard` | 온보딩 위저드 | 설정 |
| `doctor` | 시스템 진단 | 진단 |
| `status` | 상태 확인 | 상태 |
| `channels` | 채널 관리 | 채널 |
| `config` | 설정 관리 | 설정 |
| `skills` | 스킬 관리 | 스킬 |
| `logs` | 로그 조회 | 로깅 |
| `memory` | 메모리 관리 | 메모리 |
| `sessions` | 세션 관리 | 세션 |
| `plugins` | 플러그인 관리 | 플러그인 |
| `pairing` | 페어링 관리 | 보안 |
| `approvals` | 승인 관리 | 보안 |
| `health` | 건강 체크 | 진단 |
| `reset` | 시스템 리셋 | 유지보수 |

---

## 🚀 Gateway 명령어

### `clawdbot gateway start`

```javascript
# Gateway 데몬 시작
clawdbot gateway start

# 포그라운드로 실행
clawdbot gateway start --background

# 로그 디렉토리 지정
clawdbot gateway start --log-dir ~/logs
```

### `clawdbot gateway stop`

```javascript
# Gateway 데몬 중지
clawdbot gateway stop

# 강제 중지
clawdbot gateway stop --force
```

### `clawdbot gateway restart`

```javascript
# Gateway 데몬 재시작
clawdbot gateway restart
```

### `clawdbot gateway run`

```javascript
# 포그라운드로 실행 (개발용)
clawdbot gateway run

# 상세 로그 출력
clawdbot gateway run --verbose

# 디버그 모드
clawdbot gateway run --debug

# 포트 지정
clawdbot gateway run --port 18790

# 바인드 주소 지정
clawdbot gateway run --bind 0.0.0.0

# Tailscale Serve 모드
clawdbot gateway run --tailscale serve
```

---

## 🤖 에이전트 명령어

### `clawdbot agent`

```javascript
# 기본 실행 (메시지 입력)
clawdbot agent

# 메시지 직접 지정
clawdbot agent --message "안녕하세요!"

# 사고 레벨 지정
clawdbot agent --thinking high

# 모델 지정
clawdbot agent --model anthropic/claude-opus-4-5

# 워크스페이스 지정
clawdbot agent --workspace ~/clawd-personal

# JSON 출력
clawdbot agent --json

# 스트리밍 출력
clawdbot agent --stream
```

### `clawdbot agents add`

```javascript
# 새로운 에이전트 추가
clawdbot agents add personal \
  --workspace ~/clawd-personal \
  --model anthropic/claude-sonnet-4-5 \
  --thinking medium

# 에이전트 설명
clawdbot agents add work \
  --workspace ~/clawd-work \
  --model openai/gpt-5.1 \
  --thinking low \
  --description "Work용 에이전트"
```

### `clawdbot agents list`

```javascript
# 모든 에이전트 목록
clawdbot agents list

# JSON 출력
clawdbot agents list --json

# 워크스페이스만 표시
clawdbot agents list --workspaces
```

---

## 📨 전송 명령어

### `clawdbot send`

```javascript
# 기본 사용 (대화형)
clawdbot send

# 채널 및 수신자 지정
clawdbot send --to whatsapp:+1234567890 \
  --message "테스트 메시지"

# 멘션으로 그룹 전송
clawdbot send --to discord:server:123456789 \
  --message "@username 이 작업을 해줘"

# 첨부 파일
clawdbot send --to telegram:@username \
  --message "파일 첨부" \
  --attach ~/Downloads/file.pdf

# 리플 지정
clawdbot send --to slack:channel:U1234567890 \
  --message "답변입니다" \
  --reply-to msg-id
```

---

## ⚙ 설정 명령어

### `clawdbot config get`

```javascript
# 모든 설정 조회
clawdbot config get

# 특정 설정 조회
clawdbot config get agent.model

# 중첩 설정 조회
clawdbot config get channels.whatsapp.enabled

# 스키마 조회
clawdbot config get --schema
```

### `clawdbot config set`

```javascript
# 설정 변경
clawdbot config set agent.model "anthropic/claude-opus-4-5"

# 중첩 설정 변경
clawdbot config set channels.whatsapp.dmPolicy "open"

# 복수 설정 변경
clawdbot config set gateway.auth.mode password

# 설정 삭제
clawdbot config set channels.whatsapp.dmPolicy null
```

### `clawdbot config edit`

```javascript
# 설정 편집기 열기
clawdbot config edit

# 특정 파일 편집
clawdbot config edit channels
```

---

## 📱 채널 명령어

### `clawdbot channels login`

```javascript
# WhatsApp 로그인
clawdbot channels login whatsapp

# QR 코드 가져오기
clawdbot channels login whatsapp --qr-import

# Telegram 로그인
clawdbot channels login telegram

# Slack 로그인
clawdbot channels login slack

# Discord 로그인
clawdbot channels login discord

# Google Chat 로그인
clawdbot channels login googlechat
```

### `clawdbot channels status`

```javascript
# 채널 상태 확인
clawdbot channels status

# 특정 채널 상태
clawdbot channels status whatsapp

# 채널 탐색
clawdbot channels status --probe

# JSON 출력
clawdbot channels status --json
```

### `clawdbot channels logout`

```javascript
# 채널 로그아웃
clawdbot channels logout whatsapp

# 모든 채널 로그아웃
clawdbot channels logout --all
```

---

## 🎯 스킬 명령어

### `clawdbot skills list`

```javascript
# 설치된 스킬 목록
clawdbot skills list

# 사용 가능한 스킬 검색
clawdbot skills list --search notion

# 설치되지 않은 스킬 표시
clawdbot skills list --uninstalled
```

### `clawdbot skills install`

```javascript
# 스킬 설치
clawdbot skills install notion

# 특정 버전 설치
clawdbot skills install notion@1.2.0

# 개발 모드로 설치
clawdbot skills install --dev /path/to/skill

# GitHub에서 설치
clawdbot skills install github:user/repo
```

### `clawdbot skills remove`

```javascript
# 스킬 제거
clawdbot skills remove notion

# 강제 제거
clawdbot skills remove notion --force
```

---

## 📊 상태 명령어

### `clawdbot status`

```javascript
# 전체 상태 확인
clawdbot status

# 채널 상태만
clawdbot status --channels

# 에이전트 상태만
clawdbot status --agent

# 세션 상태만
clawdbot status --sessions

# JSON 출력
clawdbot status --json

# 심플 출력
clawdbot status --simple
```

**예시 출력:**

```javascript
🦞 Clawdbot Status

Gateway:
  Status: Running
  Uptime: 2h 34m
  Port: 18789

Channels:
  WhatsApp: ✅ Connected (+1234567890)
  Telegram: ✅ Connected (@clawdbot_bot)
  Slack: ❌ Disconnected
  Discord: ✅ Connected (server)

Agent:
  Model: anthropic/claude-opus-4-5
  Status: Ready
  Active Sessions: 3
```

---

## 🔍 진단 명령어

### `clawdbot doctor`

```javascript
# 기본 진단
clawdbot doctor

# 자동 수정 시도
clawdbot doctor --fix

# 상세한 진단
clawdbot doctor --verbose

# 특정 카테고리만
clawdbot doctor --only channels

# 카테고리 제외
clawdbot doctor --except dependencies
```

**진단 카테고리:**

| 카테고리 | 검사 항목 |
| --- | --- |
| **dependencies** | Node.js, pnpm, 필수 의존성 |
| **channels** | 채널 연결 상태 |
| **agent** | 에이전트 런타임 상태 |
| **gateway** | Gateway 실행 상태 |
| **browser** | 브라우저 설치 상태 |
| **workspace** | 워크스페이스 구조 |
| **config** | 설정 파일 상태 |
| **sandbox** | 샌드박스 설치 상태 |

---

## 📝 로그 명령어

### `clawdbot logs`

```javascript
# 모든 로그 추적
clawdbot logs

# Gateway 로그만
clawdbot logs gateway

# 에이전트 로그만
clawdbot logs agent

# 특정 세션 로그
clawdbot logs sessions --session whatsapp:+1234567890

# 실시간 로그 추적
clawdbot logs --follow

# 마지막 N줄만
clawdbot logs --tail 100

# 오류만 필터
clawdbot logs --filter error

# JSON 출력
clawdbot logs --json
```

---

## 🔒 보안 명령어

### `clawdbot pairing approve`

```javascript
# 페어링 승인
clawdbot pairing approve whatsapp pairing-code-ABC123

# 페어링 목록
clawdbot pairing list

# 페어링 거부
clawdbot pairing deny whatsapp +9876543210

# 모든 페어링 청소
clawdbot pairing clear
```

### `clawdbot approvals list`

```javascript
# 보류 중인 승인 목록
clawdbot approvals list

# 특정 세션의 승인 목록
clawdbot approvals list --session whatsapp:+1234567890

# 모두 승인
clawdbot approvals approve --all

# 모두 거부
clawdbot approvals deny --all
```

---

## 🔄 리셋 명령어

### `clawdbot reset`

```javascript
# 모든 리셋
clawdbot reset

# 채널만 리셋
clawdbot reset --channels

# 에이전트만 리셋
clawdbot reset --agent

# 세션만 리셋
clawdbot reset --sessions

# 특정 세션만 리셋
clawdbot reset --sessions whatsapp:+1234567890

# 확인 없이 강제 리셋
clawdbot reset --force
```

---

## 📱 채널별 명령어

### WhatsApp

```javascript
# WhatsApp QR 코드 재생성
clawdbot channels whatsapp regenerate-qr

# 연결 해제
clawdbot channels whatsapp disconnect

# 연결 상태 확인
clawdbot channels whatsapp status
```

### Telegram

```javascript
# Telegram Bot 설정 업데이트
clawdbot channels telegram set-webhook

# 인라인 모드 활성화
clawdbot channels telegram set-inline

# 업데이트 허용 목록
clawdbot channels telegram update-allowlist
```

### Discord

```javascript
# Discord 서버 목록
clawdbot channels discord servers

# 특정 서버 정보
clawdbot channels discord server-info 1234567890123456789

# 채널 목록
clawdbot channels discord channels

# 역할 관리
clawdbot channels discord roles
```

---

## 🔗 관련 문서

- [설정 시스템](https://configuration.md)

- [워크스페이스](https://workspace.md)

- [채널 시스템](https://../channels/README.md)

- [보안](https://../security/README.md)

For the site tree, see the [root Markdown](https://slashpage.com/techkwon.md).
