TUI
OpenCode는 LLM과 협업하기 위한 대화형 터미널 사용자 인터페이스를 제공합니다. 프로젝트 디렉토리에서 opencode를 실행하여 시작합니다.
핵심 기능
파일 참조
메시지에서 파일을 참조하려면 @ 사용:
How is auth handled in @packages/functions/src/api/index.ts?Bash 명령어 실행
쉘 명령어를 실행하려면 메시지 앞에 ! 추가:
!ls -la슬래시 명령어
| 명령어 | 설명 | 키 바인딩 |
|---|---|---|
/connect | 프로바이더 및 API 키 추가 | — |
/compact | 세션 압축 | ctrl+x c |
/details | 도구 상세 정보 토글 | ctrl+x d |
/editor | 외부 에디터 열기 | ctrl+x e |
/exit | OpenCode 종료 | ctrl+x q |
/export | Markdown으로 내보내기 | ctrl+x x |
/help | 도움말 표시 | ctrl+x h |
/init | AGENTS.md 생성 | ctrl+x i |
/models | 모델 목록 | ctrl+x m |
/new | 새 세션 시작 | ctrl+x n |
/redo | 메시지 다시 실행 | ctrl+x r |
/sessions | 세션 전환 | ctrl+x l |
/share | 세션 공유 | ctrl+x s |
/themes | 테마 목록 | ctrl+x t |
/undo | 마지막 메시지 실행 취소 | ctrl+x u |
에디터 설정
EDITOR 환경 변수 설정:
# Linux/macOS
export EDITOR=nano
export EDITOR="code --wait"
# Windows PowerShell
$env:EDITOR = "code --wait"설정
opencode.json에서 TUI 동작 커스터마이징:
{
"tui": {
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": true
}
}
}옵션:
scroll_acceleration.enabled- macOS 스타일 스크롤 가속scroll_speed- 스크롤 속도 (최소: 1)