본문 바로가기
C.W.K.
Stream
Lesson 02 of 11 · published

TUI 활용법 — @, !, /, Tab

~14 min · codex, tui, fuzzy-search, shell-injection

Level 0🌱 입문자
0 XP0/70 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

TUI는 대화와 도구 실행, diff를 한 화면에 모아

Codex TUI는 위쪽 대화 기록, 가운데 실시간 도구 호출, 아래 입력창으로 나뉘어. 입력창에서 @로 파일을 붙이고, !로 셸 명령을 실행하며, /로 정해진 명령을 불러. Tab은 자동 완성과 제안을 도와줘.

파일 변경은 색이 있는 unified diff로 바로 보여주고 승인·거부·수정·나머지 건너뛰기를 고를 수 있어. 다른 프로그램에 diff를 복사할 필요가 없지. !로 실행한 git status나 테스트 결과도 대화 기록에 남아 다음 판단의 문맥이 돼.

화면은 대화 기록·도구 실행·입력창의 3개 영역으로 나뉘고, 변경안은 1급 객체인 diff로 바로 다뤄.

직접 확인할 항목: [A]pprove [R]eject [E]dit [S]kip-all.

Code

입력창에서 쓰는 세 가지 접두사·text
# @ — fuzzy file search and attach
@ auth        → src/auth.ts, tests/auth.spec.ts, docs/auth-flow.md
              ↑/↓ to select, Enter to attach

# Compose attached files into a prompt:
@src/auth.ts @tests/ Refactor auth to JWT RS256

# ! — run a shell command, output appears in transcript
!git status
!npm test
!git diff HEAD~1
# Codex can reference the output in its next response

# / — open slash command popup
/permissions
/compact
/theme
/clear
Diff 승인에 쓰는 키·text
─── src/auth.ts ─────────────────────
@@ -12,7 +12,12 @@
-  function validateToken(token) {
-    return jwt.verify(token, SECRET);
+  async function validateToken(token: string): Promise<TokenPayload> {
+    try {
+      return await jwt.verify(token, SECRET) as TokenPayload;
+    } catch (err) {
+      throw new AuthError('Invalid token', 401);
+    }
+  }
─────────────────────────────────────
[A]pprove  [R]eject  [E]dit  [S]kip all

Exercise

TUI에서 실제 Codex 세션을 열어. @로 파일 2개를 첨부하고, !git diff HEAD~3를 실행한 다음, /permissions를 열어 봐. 세 가지 문맥을 모두 활용하는 지시문도 직접 작성해.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.